Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 more info on auther
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

skwak
Starting Member

25 Posts

Posted - 16 July 2003 :  14:29:23  Show Profile
how can i include my occupation and city and some information? in left side of user name?
now i have like starting member and number of posts i put it on the forum..

Edited by - skwak on 16 July 2003 14:37:06

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 17 July 2003 :  07:36:48  Show Profile  Visit MarcelG's Homepage
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

portfolio - linkshrinker - oxle - twitter
Go to Top of Page

skwak
Starting Member

25 Posts

Posted - 17 July 2003 :  13:53:13  Show Profile
marcelgoertz, thank you so much..
i also want to put m_city, M_state.
is that the same step as you decribed above?
thanks..
Go to Top of Page

Ryan
Average Member

USA
858 Posts

Posted - 17 July 2003 :  15:06:32  Show Profile  Visit Ryan's Homepage
If you would like to add the state you may want to install the MOD I created. You may look at it here

To view a demo click here.
Hope this helps!

The Poultry Link - "Serving the best of the fancy with the best of the web"
Forum Setup Help
Go to Top of Page

skwak
Starting Member

25 Posts

Posted - 17 July 2003 :  16:24:51  Show Profile
the reason why i want to put city and state is that..
i stored organization and sub org name instead of city and state...
i don't know what this number does in
whenever i put more then 22 (last number in there) gave me out of range error..

rM_name=0
rM_Receive_email=1
.
.
.
.
.

any idea?

thanks
Go to Top of Page

skwak
Starting Member

25 Posts

Posted - 18 July 2003 :  11:13:37  Show Profile
i just get around the sql script.

instead of M_Title
M_City +', '+M_state as M_title..
that means..i can control the some of the profile not touching any asp code but sql script..
let me know if you guys have better idea..
thanks

Edited by - skwak on 18 July 2003 13:55:09
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.25 seconds. Powered By: Snitz Forums 2000 Version 3.4.07