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)
 Name, City and State in Author box
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

b4rm4n
New Member

73 Posts

Posted - 29 August 2002 :  17:50:29  Show Profile
I had this on the last version of snitz that I was running. The code in the topic.asp file has changed in 3.4.01. What do I need to do different in the new one to get those back. My users really seemed to like that. Thanks.

www.regalgs.org
Owner/Administrator
Snitz 3.4.03 & SQL2000
Active Users 4.0.17, Smiles Manager Plus, Poll Mod 3.4, Private Message 3.4 MODs

Hamlin
Advanced Member

United Kingdom
2386 Posts

Posted - 29 August 2002 :  18:25:56  Show Profile
When you say name do you mean the First Name?

Edited by - Hamlin on 29 August 2002 18:27:05
Go to Top of Page

Hamlin
Advanced Member

United Kingdom
2386 Posts

Posted - 29 August 2002 :  18:54:41  Show Profile
Ok you never said but this is how to do it

Line 97-102


strSql = "SELECT M.M_NAME, M.M_RECEIVE_EMAIL, M.M_AIM, M.M_ICQ, M.M_MSN, M.M_YAHOO" & _
", M.M_TITLE, M.M_HOMEPAGE, M.MEMBER_ID, M.M_LEVEL, M.M_POSTS, M.M_COUNTRY" & _
", T.T_DATE, T.T_SUBJECT, T.T_AUTHOR, T.TOPIC_ID, T.T_STATUS, T.T_LAST_EDIT" & _
", T.T_LAST_EDITBY, T.T_LAST_POST, T.T_SIG, T.T_REPLIES" & _
", C.CAT_STATUS, C.CAT_ID, C.CAT_NAME, C.CAT_SUBSCRIPTION, C.CAT_MODERATION" & _
", F.F_STATUS, F.FORUM_ID, F.F_SUBSCRIPTION, F.F_SUBJECT, F.F_MODERATION, T.T_MESSAGE"


To (change the line in red)


strSql = "SELECT M.M_NAME, M.M_RECEIVE_EMAIL, M.M_AIM, M.M_ICQ, M.M_MSN, M.M_YAHOO" & _
", M.M_TITLE, M.M_HOMEPAGE, M.MEMBER_ID, M.M_LEVEL, M.M_POSTS, M.M_COUNTRY, M.M_FirstName, M.M_CITY, M.M_STATE" & _
", T.T_DATE, T.T_SUBJECT, T.T_AUTHOR, T.TOPIC_ID, T.T_STATUS, T.T_LAST_EDIT" & _
", T.T_LAST_EDITBY, T.T_LAST_POST, T.T_SIG, T.T_REPLIES" & _
", C.CAT_STATUS, C.CAT_ID, C.CAT_NAME, C.CAT_SUBSCRIPTION, C.CAT_MODERATION" & _
", F.F_STATUS, F.FORUM_ID, F.F_SUBSCRIPTION, F.F_SUBJECT, F.F_MODERATION, T.T_MESSAGE"


Line 129-131


Member_Level = rsTopic("M_LEVEL")
Member_Posts = rsTopic("M_POSTS")
Member_Country = rsTopic("M_COUNTRY")


Add the following directly under that code


Member_FirstName = rsTopic("M_FirstName")
Member_City = rsTopic("M_City")
Member_State = rsTopic("M_State")


Line 309-312


strSql = "SELECT M.M_NAME, M.M_RECEIVE_EMAIL, M.M_AIM, M.M_ICQ, M.M_MSN, M.M_YAHOO"
strSql = strSql & ", M.M_TITLE, M.MEMBER_ID, M.M_HOMEPAGE, M.M_LEVEL, M.M_POSTS, M.M_COUNTRY"
strSql = strSql & ", R.REPLY_ID, R.FORUM_ID, R.R_AUTHOR, R.TOPIC_ID, R.R_MESSAGE, R.R_LAST_EDIT"
strSql = strSql & ", R.R_LAST_EDITBY, R.R_SIG, R.R_STATUS, R.R_DATE"


To (change the line in red)


strSql = "SELECT M.M_NAME, M.M_RECEIVE_EMAIL, M.M_AIM, M.M_ICQ, M.M_MSN, M.M_YAHOO"
strSql = strSql & ", M.M_TITLE, M.MEMBER_ID, M.M_HOMEPAGE, M.M_LEVEL, M.M_POSTS, M.M_COUNTRY, M.M_FirstName, M.M_CITY, M.M_STATE"
strSql = strSql & ", R.REPLY_ID, R.FORUM_ID, R.R_AUTHOR, R.TOPIC_ID, R.R_MESSAGE, R.R_LAST_EDIT"
strSql = strSql & ", R.R_LAST_EDITBY, R.R_SIG, R.R_STATUS, R.R_DATE"


Line 514-538 - the numbers here need to be changed to reflect changes made above.


rM_NAME = 0
rM_RECEIVE_EMAIL = 1
rM_AIM = 2
rM_ICQ = 3
rM_MSN = 4
rM_YAHOO = 5
rM_TITLE = 6
rMEMBER_ID = 7
rM_HOMEPAGE = 8
rM_LEVEL = 9
rM_POSTS = 10
rM_COUNTRY = 11
rREPLY_ID = 12
rFORUM_ID = 13
rR_AUTHOR = 14
rTOPIC_ID = 15
rR_MESSAGE = 16
rR_LAST_EDIT = 17
rR_LAST_EDITBY = 18
rR_SIG = 19
rR_STATUS = 20
rR_DATE = 21
if CanShowSignature = 1 then
rM_SIG = 22
end if


To - basically the red code was added and the numbers after the red code increased by 1.


rM_NAME = 0
rM_RECEIVE_EMAIL = 1
rM_AIM = 2
rM_ICQ = 3
rM_MSN = 4
rM_YAHOO = 5
rM_TITLE = 6
rMEMBER_ID = 7
rM_HOMEPAGE = 8
rM_LEVEL = 9
rM_POSTS = 10
rM_COUNTRY = 11
rM_FirstName = 12
rM_City = 13
rm_State = 14
rREPLY_ID = 15
rFORUM_ID = 16
rR_AUTHOR = 17
rTOPIC_ID = 18
rR_MESSAGE = 19
rR_LAST_EDIT = 20
rR_LAST_EDITBY = 21
rR_SIG = 22
rR_STATUS = 23
rR_DATE = 24
if CanShowSignature = 1 then
rM_SIG = 25
end if



Line 554-556


Reply_MemberLevel = arrReplyData(rM_LEVEL, iForum)
Reply_MemberPosts = arrReplyData(rM_POSTS, iForum)
Reply_MemberCountry = arrReplyData(rM_COUNTRY, iForum)


Add the following code directly under it


ReplyFirstName = arrReplyData(rM_FirstName, iForum)
ReplyMemberCity = arrReplyData(rM_City, iForum)
ReplyMemberState = arrReplyData(rm_State, iForum)


Then find this code line 588-591


Response.Write " </p>" & vbNewLine & _
" <p><font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Reply_MemberCountry & "</small></font><br />" & vbNewLine & _
" <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Reply_MemberPosts & " Posts</small></font></p></td>" & vbNewLine & _
" <td bgcolor=""" & CColor & """ height=""100%"" width=""" & strTopicWidthRight & """"


Add the red bits


Response.Write " </p>" & vbNewLine & _
" <p><font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Reply_MemberCountry & "</small></font><br />" & vbNewLine & _
" <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & ReplyFirstName & "</small></font><br />" & vbNewLine & _
" <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & ReplyMemberCity & "</small></font><br />" & vbNewLine & _
" <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & ReplyMemberState & "</small></font><br />" & vbNewLine & _
" <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Reply_MemberPosts & " Posts</small></font></p></td>" & vbNewLine & _
" <td bgcolor=""" & CColor & """ height=""100%"" width=""" & strTopicWidthRight & """"


Then find this code line 797-800


Response.Write " </p>" & vbNewLine & _
" <p><font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Member_Country & "</small></font><br />" & vbNewLine & _
" <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Member_Posts & " Posts</small></font></p></td>" & vbNewLine & _
" <td bgcolor=""" & strForumFirstCellColor & """ width=""" & strTopicWidthRight & """"


Add the red bits


Response.Write " </p>" & vbNewLine & _
" <p><font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Member_Country & "</small></font><br />" & vbNewLine & _
" <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Member_FirstName & "</small></font><br />" & vbNewLine & _
" <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Member_City & "</small></font></p><br />" & vbNewLine & _
" <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Member_State & "</small></font></p><br />" & vbNewLine & _
" <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Member_Posts & " Posts</small></font></p></td>" & vbNewLine & _
" <td bgcolor=""" & strForumFirstCellColor & """ width=""" & strTopicWidthRight & """"


That should be it, you may want to play with hows its displayed, but it did work when I tested it

Edited by - Hamlin on 30 August 2002 13:17:36
Go to Top of Page

b4rm4n
New Member

73 Posts

Posted - 30 August 2002 :  09:16:21  Show Profile
Thank you so much. Looks like there is a lot more code to change in this version that in the last.

www.regalgs.org
Owner/Administrator
Snitz 3.4.03 & SQL2000
Active Users 4.0.17, Smiles Manager Plus, Poll Mod 3.4, Private Message 3.4 MODs
Go to Top of Page

Hamlin
Advanced Member

United Kingdom
2386 Posts

Posted - 30 August 2002 :  10:09:43  Show Profile
Your welcome

There are only really 6 changes to make, but I managed to make it look very long
Go to Top of Page

b4rm4n
New Member

73 Posts

Posted - 30 August 2002 :  12:40:02  Show Profile
Let me make a contribution to this mod. In the last set of modifications you posted you need to take out the "Posts" in the three lines in read. That way it doesn't say "Name""Posts" etc. But thanks for the code.

www.regalgs.org
Owner/Administrator
Snitz 3.4.03 & SQL2000
Active Users 4.0.17, Smiles Manager Plus, Poll Mod 3.4, Private Message 3.4 MODs
Go to Top of Page

Hamlin
Advanced Member

United Kingdom
2386 Posts

Posted - 30 August 2002 :  13:15:48  Show Profile
quote:
Originally posted by b4rm4n

Let me make a contribution to this mod. In the last set of modifications you posted you need to take out the "Posts" in the three lines in read. That way it doesn't say "Name""Posts" etc. But thanks for the code.



hehe thats what I get for copy and pasting some code
Go to Top of Page

CoreyGmaN
Starting Member

USA
35 Posts

Posted - 09 September 2002 :  23:05:59  Show Profile  Visit CoreyGmaN's Homepage  Send CoreyGmaN an AOL message  Send CoreyGmaN an ICQ Message  Send CoreyGmaN a Yahoo! Message
quote:
Originally posted by Hamlin

Ok you never said but this is how to do it


Then find this code line 797-800


 	Response.Write	"                </p>" & vbNewLine & _
			"                <p><font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Member_Country & "</small></font><br />" & vbNewLine & _
			"                <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Member_Posts & " Posts</small></font></p></td>" & vbNewLine & _
			"                <td bgcolor=""" & strForumFirstCellColor & """ width=""" & strTopicWidthRight & """"


Add the red bits


 	Response.Write	"                </p>" & vbNewLine & _
			"                <p><font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Member_Country & "</small></font><br />" & vbNewLine & _
			"                <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Member_FirstName & "</small></font><br />" & vbNewLine & _
			"                <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Member_City & "</small></font></p><br />" & vbNewLine & _
			"                <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Member_State & "</small></font></p><br />" & vbNewLine & _
			"                <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Member_Posts & " Posts</small></font></p></td>" & vbNewLine & _
			"                <td bgcolor=""" & strForumFirstCellColor & """ width=""" & strTopicWidthRight & """"


That should be it, you may want to play with hows its displayed, but it did work when I tested it




all my code matched up tell I got to the last 2 parts, in my topic.asp it looked like this (the next 7 lines) and im not sure where to add what you have, since it does not match up. Could you help me out please.
Thanks


Response.Write	"                </p>" & vbNewLine & _
					"                <p>" & vbNewLine
			if strCountry = "1" and trim(Reply_MemberCountry) <> "" then
				Response.Write	"<font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Reply_MemberCountry & "</small></font><br />" & vbNewLine
			end if
			Response.Write	"                <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Reply_MemberPosts & " Posts</small></font></p></td>" & vbNewLine & _
					"                <td bgcolor=""" & CColor & """ height=""100%"" width=""" & strTopicWidthRight & """"

MySpace -- GmanS WorlD -- I GOTTA have more COWBELL! (right click save as) -- MY WISHLIST

check out my forums at www.warpreality.com
Go to Top of Page

CoreyGmaN
Starting Member

USA
35 Posts

Posted - 14 September 2002 :  14:47:55  Show Profile  Visit CoreyGmaN's Homepage  Send CoreyGmaN an AOL message  Send CoreyGmaN an ICQ Message  Send CoreyGmaN a Yahoo! Message
bump, to see if I can get some help

MySpace -- GmanS WorlD -- I GOTTA have more COWBELL! (right click save as) -- MY WISHLIST

check out my forums at www.warpreality.com
Go to Top of Page

DoraMoon
Average Member

Taiwan
661 Posts

Posted - 14 September 2002 :  15:30:24  Show Profile
try this....

Response.Write	"                </p>" & vbNewLine & _
					"                <p>" & vbNewLine
			if strCountry = "1" and trim(Reply_MemberCountry) <> "" then
				Response.Write	"<font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Reply_MemberCountry & "</small></font><br />" & vbNewLine
			end if
			Response.Write	"                <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Member_FirstName & "</small></font><br />" & vbNewLine & _
			"                <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Member_City & "</small></font></p><br />" & vbNewLine & _
			"                <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Member_State & "</small></font></p><br />" & vbNewLine
			Response.Write	"                <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Reply_MemberPosts & " Posts</small></font></p></td>" & vbNewLine & _
					"                <td bgcolor=""" & CColor & """ height=""100%"" width=""" & strTopicWidthRight & """"

make sure the added/inserted section begin with
Response.Write "..........
and end with
......." & vbNewLine (NO & _ !!)

~......~.~~
Go to Top of Page

CoreyGmaN
Starting Member

USA
35 Posts

Posted - 26 September 2002 :  00:45:11  Show Profile  Visit CoreyGmaN's Homepage  Send CoreyGmaN an AOL message  Send CoreyGmaN an ICQ Message  Send CoreyGmaN a Yahoo! Message
ok DoraMoon, I tried that, and I ran it as a test on my board, and it put in the name, city and state, in the first persons post, and in the second persons post, it put in the same info from the first person, and then through this error:

Microsoft VBScript runtime error '800a000d'
Type mismatch: '[string: "http://zero.westcoas"]'

/forums/topic.asp, line 694

which I did not even edit line 694.

here is a text link to my topic.asp as a text file, before I tried the changes, can anybody take a look at it and tell me what you think I can do to get it to work? All I want it the city and the state to show up also in the post, I don't need there name. Thanks so much for the help.

http://warpreality.com/forums/topic.txt

MySpace -- GmanS WorlD -- I GOTTA have more COWBELL! (right click save as) -- MY WISHLIST

check out my forums at www.warpreality.com
Go to Top of Page

DoraMoon
Average Member

Taiwan
661 Posts

Posted - 26 September 2002 :  02:10:35  Show Profile
hi~ CoreyGmaN,
if it just work on topic(first post), and got some problem on replies..
usually this just mean you mess up some code modified...

the show topic and show replies is separate section in topic.asp..
but there are almost the similar code and also the similar modded change.
so you must be careful to do this coding, they maybe just a small difference..
like Reply_MemberCity with Member_City....etc.

here is a fixed file... Corey_topic.asp.txt
i tested it, it should be can work no problem...
please check it with Hamlin's code, almost the same modification.
(coz you seem add M_PHOTO_URL query by yourself, so there are a
little different with Hamlin's... and also v3.4.03 the line show
COUNTRY have a small change... but what i modified just the same
places that Hamlin show you, and it's the same rule to modded..)

sorry! i found this too late...
update the .txt file, now you don't want to show FirstName...
so i just comma three line to prevent it display....
you can remove the useless code related FirstName by yourself..

Edited by - DoraMoon on 26 September 2002 02:16:40
Go to Top of Page

CoreyGmaN
Starting Member

USA
35 Posts

Posted - 26 September 2002 :  21:48:30  Show Profile  Visit CoreyGmaN's Homepage  Send CoreyGmaN an AOL message  Send CoreyGmaN an ICQ Message  Send CoreyGmaN a Yahoo! Message
quote:
Originally posted by DoraMoon

hi~ CoreyGmaN,
if it just work on topic(first post), and got some problem on replies..
usually this just mean you mess up some code modified...

the show topic and show replies is separate section in topic.asp..
but there are almost the similar code and also the similar modded change.
so you must be careful to do this coding, they maybe just a small difference..
like Reply_MemberCity with Member_City....etc.

here is a fixed file... Corey_topic.asp.txt
i tested it, it should be can work no problem...
please check it with Hamlin's code, almost the same modification.
(coz you seem add M_PHOTO_URL query by yourself, so there are a
little different with Hamlin's... and also v3.4.03 the line show
COUNTRY have a small change... but what i modified just the same
places that Hamlin show you, and it's the same rule to modded..)

sorry! i found this too late...
update the .txt file, now you don't want to show FirstName...
so i just comma three line to prevent it display....
you can remove the useless code related FirstName by yourself..




you are the women!!! tahnks so much that worked great!, if you would like to check it out go to www.warpreality.com

thanks again! I owe an ice cold one!

MySpace -- GmanS WorlD -- I GOTTA have more COWBELL! (right click save as) -- MY WISHLIST

check out my forums at www.warpreality.com
Go to Top of Page

b4rm4n
New Member

73 Posts

Posted - 03 October 2002 :  17:39:46  Show Profile
Well I took the code up above and modified it a little. I put the City and State on the same line and put a comma between them. Well not all of my users put in the State or either of them and I get just a comma or a City with a comma and no state in some of the posts. So I came up with this IF statement... doesn't seem to work though. Should, but it doesn't... can someone spot something I am missing?

Thanks

If ReplyMemberState = "" then
Response.Write " <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & ReplyMemberCity & "</small></font><br />" & vbNewLine
else
Response.Write " <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & ReplyMemberCity & ", " & ReplyMemberState & "</small></font><br />" & vbNewLine
end if

BTW it doesn't work in either post or reply. This just happends to be the Reply IF statement.

www.regalgs.org
Owner/Administrator
Snitz 3.4.03 & SQL2000
Active Users 4.0.17, Smiles Manager Plus, Poll Mod 3.4, Private Message 3.4 MODs

Edited by - b4rm4n on 03 October 2002 17:42:17
Go to Top of Page

DoraMoon
Average Member

Taiwan
661 Posts

Posted - 03 October 2002 :  19:02:00  Show Profile
at first, you must add M.M_CITY, M.M_STATE to the SQL statement..
you can refer to above Hamlin's post..
there are total 3 place need to add/modify additional lines..
# M.M_COUNTRY, M.M_FirstName, M.M_CITY, M.M_STATE
# rM_COUNTRY = 11, rM_CITY = 12, rM_STATE = 13..14..15..16....
(make sure above these two place have the same "sequence" !)
# Reply_MemberCountry = arrReplyData(rM_COUNTRY, iForum)
Reply_MemberCity = arrReplyData(rM_CITY, iForum)
Reply_MemberState = arrReplyData(rM_STATE, iForum)


and then...... you know where to insert code.
try this..
if strCity = "1" and trim(Reply_MemberCity) <> "" then
	Response.Write	"<font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Reply_MemberCity & "</small></font>"
	if strState = "1" and trim(Reply_MemberState) <> "" then
		Response.Write	"<font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>, " & Reply_MemberState & "</small></font><br />" & vbNewLine
	else
		Response.Write	"<br />" & vbNewLine
	end if
elseif strState = "1" and trim(Reply_MemberState) <> "" then
	Response.Write	"<font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Reply_MemberState & "</small></font><br />" & vbNewLine
end if

~......~.~~
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.34 seconds. Powered By: Snitz Forums 2000 Version 3.4.07