Skwak,
this can be done by retrieving the info from the DB, and presenting it in the correct place.
This is done in topic.asp
The original topic is retrieved around line 111.
'## Forum_SQL - Get original topic and check for the Category, Forum or Topic Status and existence
strSql = "SELECT M.M_NAME, M.M_RECEIVE_EMAIL, M.M_AIM, M.M_ICQ, M.M_MSN, M.M_YAHOO, M.M_PMRECEIVE" & _
", M.M_TITLE, M.M_HOMEPAGE, M.MEMBER_ID, M.M_LEVEL, M.M_POSTS, M.M_COUNTRY, M.M_AVATAR_URL" & _
", T.T_DATE, T.T_SUBJECT, T.T_AUTHOR, T.TOPIC_ID, T.T_STATUS, T.T_ISPOLL, T.T_POLLSTATUS, T.T_LAST_EDIT" & _
", T.T_LAST_EDITBY, T.T_LAST_POST, T.T_SIG, T.T_REPLIES" & _
", T_EVENT_DATE, T.T_ISEVENT" & _
", C.CAT_STATUS, C.CAT_ID, C.CAT_NAME, C.CAT_SUBSCRIPTION, C.CAT_MODERATION" & _
", F.F_STATUS, F.F_POLLS, F.FORUM_ID, F.F_SUBSCRIPTION, F.F_SUBJECT, F.F_MODERATION, T.T_MESSAGE"
if CanShowSignature = 1 then
strSql = strSql & ", M.M_SIG"
end if
strSql = strSql & " FROM " & strActivePrefix & "TOPICS T, " & strTablePrefix & "FORUM F, " & _
strTablePrefix & "CATEGORY C, " & strMemberTablePrefix & "MEMBERS M " & _
" WHERE T.TOPIC_ID = " & Topic_ID & _
" AND F.FORUM_ID = T.FORUM_ID " & _
" AND C.CAT_ID = T.CAT_ID " & _
" AND M.MEMBER_ID = T.T_AUTHOR "
A few lines below you'll see things like this:
Member_Avatar = rsTopic("M_AVATAR_URL")
Topic_Date = rsTopic("T_DATE")
Topic_Subject = rsTopic("T_SUBJECT")
Topic_Author = rsTopic("T_AUTHOR")
If you want to get the occupation, retrieve the correct info.
So, add M_OCCUPATION to the first part.
So,
strSql = "SELECT M.M_NAME, M.M_RECEIVE_EMAIL, M.M_AIM, M.M_ICQ, M.M_MSN, M.M_YAHOO, M.M_PMRECEIVE" & _
becomes
strSql = "SELECT M.M_NAME, M.M_OCCUPATION, M.M_RECEIVE_EMAIL, M.M_AIM, M.M_ICQ, M.M_MSN, M.M_YAHOO, M.M_PMRECEIVE" & _
Be sure to check that it is not already listed!!!
Then, add the line
Member_Occupation = rsTopic("M_OCCUPATION")
Do the same for the replies.
This is done in virtually the same way from line 370 on.
Here you need to add the value also to the list around line 688
rM_NAME = 0
rM_RECEIVE_EMAIL = 1
rM_AIM = 2
rM_ICQ = 3
rM_MSN = 4
rM_YAHOO = 5
rM_PM = 6
rM_TITLE = 7
rMEMBER_ID = 8
rM_HOMEPAGE = 9
rM_LEVEL = 10
rM_POSTS = 11
rM_COUNTRY = 12
rM_Avatar = 13
rREPLY_ID = 14
rFORUM_ID = 15
rR_AUTHOR = 16
rTOPIC_ID = 17
rR_MESSAGE = 18
rR_LAST_EDIT = 19
rR_LAST_EDITBY = 20
rR_SIG = 21
rR_STATUS = 22
rR_DATE = 23
if CanShowSignature = 1 then
rM_SIG = 24
end if
rR_OCCUPATION = 25
Make sure the numbers are unique and add up!
Some lines below, also add this to the list!
Reply_MemberName = arrReplyData(rM_NAME, iForum)
Reply_MemberReceiveEmail = arrReplyData(rM_RECEIVE_EMAIL, iForum)
Reply_MemberAIM = arrReplyData(rM_AIM, iForum)
Reply_MemberICQ = arrReplyData(rM_ICQ, iForum)
Reply_MemberMSN = arrReplyData(rM_MSN, iForum)
Reply_MemberYAHOO = arrReplyData(rM_YAHOO, iForum)
Reply_MemberPM = arrReplyData(rM_PM, iForum)
Reply_MemberTitle = arrReplyData(rM_TITLE, iForum)
Reply_MemberID = arrReplyData(rMEMBER_ID, iForum)
Reply_MemberHomepage = arrReplyData(rM_HOMEPAGE, iForum)
Reply_MemberLevel = arrReplyData(rM_LEVEL, iForum)
Reply_MemberPosts = arrReplyData(rM_POSTS, iForum)
Reply_MemberCountry = arrReplyData(rM_COUNTRY, iForum)
Reply_MemberAvatar = arrReplyData(rM_Avatar, iForum)
Reply_ReplyID = arrReplyData(rREPLY_ID, iForum)
Reply_ForumID = arrReplyData(rFORUM_ID, iForum)
Reply_Author = arrReplyData(rR_AUTHOR, iForum)
Reply_TopicID = arrReplyData(rTOPIC_ID, iForum)
Reply_Content = arrReplyData(rR_MESSAGE, iForum)
Reply_LastEdit = arrReplyData(rR_LAST_EDIT, iForum)
Reply_LastEditBy = arrReplyData(rR_LAST_EDITBY, iForum)
Reply_Sig = arrReplyData(rR_SIG, iForum)
Reply_Status = arrReplyData(rR_STATUS, iForum)
Reply_Date = arrReplyData(rR_DATE, iForum)
if CanShowSignature = 1 then
Reply_MemberSig = trim(arrReplyData(rM_SIG, iForum))
end if
Reply_Occupation = arrReplyData(rR_OCCUPATION, iForum)
Ok, now you've retrieved the appropriate info, now let's get busy displaying the info where you want.
For the original topic: search for profileLink(ChkString(Member_Name, (around line 974)
Here, the original author's membername is displayed.
If you know your way around, simply add the same for Member_Occupation, in the format you want.
For the reply, search for profileLink(ChkString(Reply_MemberName,"display"), (around line 750)
Do the same exercise there.
Good luck, and be sure to backup your files before you make any changes