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/Code)
 MOD - Topic Post Date
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

jfitz
Junior Member

USA
345 Posts

Posted - 31 May 2003 :  13:53:44  Show Profile
Corrected 6 Jun 2003

We have found it useful to show the original topic post date when topics are listed, as shown below:



This requires changes to FORUM.ASP in four places, and (optionally) changes to ACTIVE.ASP in four places. The line numbers given are for a forum with several mods, so your line numbers may be different.

===== START OF MOD CHANGE LIST =====

FORUM.ASP

Around line 240

Where the SQL Select statement is built, add the T.T_DATE field between T.T_LAST_POST and T.T_LAST_POST_AUTHOR as shown in red (note: I also have the Poll mod installed so your code may not match mine exactly)


'## Forum_SQL - Get all topics from DB
'################### Poll Mod - Added T.T_ISPOLL to next line ###################
strSql ="SELECT T.T_STATUS, T.CAT_ID, T.FORUM_ID, T.TOPIC_ID, T.T_VIEW_COUNT, T.T_SUBJECT, T.T_ISPOLL," 
'## MOD TOPIC POST DATE - added T.T_DATE
strSql = strSql & "T.T_AUTHOR, T.T_STICKY, T.T_REPLIES, T.T_UREPLIES, T.T_LAST_POST, T.T_DATE, T.T_LAST_POST_AUTHOR, "  
strSql = strSql & "T.T_LAST_POST_REPLY_ID, M.M_NAME, MEMBERS_1.M_NAME AS LAST_POST_AUTHOR_NAME "


Around line 465

Assign a field sequence number to the variable tT_TOPIC_POST and renumber the subsequent entries. Note that your field numbers may vary, and that you must increment all the field numbers following the inserted field so that the definitions are all sequential and consecutive


	tT_AUTHOR = 7
	tT_STICKY = 8
	tT_REPLIES = 9
	tT_UREPLIES = 10
	tT_LAST_POST = 11
'## MOD TOPIC POST DATE	
	tT_TOPIC_POST = 12
	tT_LAST_POST_AUTHOR = 13
	tT_LAST_POST_REPLY_ID = 14
	tM_NAME = 15
	tLAST_POST_AUTHOR_NAME = 16



Around line 480, find the code indicated, and add the two lines in red:


		Topic_Status = arrTopicData(tT_STATUS, iTopic)
		Topic_CatID = arrTopicData(tCAT_ID, iTopic)
		Topic_ForumID = arrTopicData(tFORUM_ID, iTopic)
		Topic_ID = arrTopicData(tTOPIC_ID, iTopic)
		Topic_ViewCount = arrTopicData(tT_VIEW_COUNT, iTopic)
		Topic_Subject = arrTopicData(tT_SUBJECT, iTopic)
		Topic_Author = arrTopicData(tT_AUTHOR, iTopic)
		Topic_Sticky = arrTopicData(tT_STICKY, iTopic)
		Topic_Replies = arrTopicData(tT_REPLIES, iTopic)
		Topic_UReplies = arrTopicData(tT_UREPLIES, iTopic)
		Topic_LastPost = arrTopicData(tT_LAST_POST, iTopic)
    '## MOD TOPIC POST DATE		
		Topic_TopicPost = arrTopicData(tT_TOPIC_POST, iTopic)
		Topic_LastPostAuthor = arrTopicData(tT_LAST_POST_AUTHOR, iTopic)
		Topic_LastPostReplyID = arrTopicData(tT_LAST_POST_REPLY_ID, iTopic)
		Topic_MName = arrTopicData(tM_NAME, iTopic)
		Topic_LastPostAuthorName = arrTopicData(tLAST_POST_AUTHOR_NAME, iTopic)


Around line 565, find the line indicated and replace it with the three lines in red



	Response.Write	"<span class=""spnMessageText""><a href=""topic.asp?" & ArchiveLink & "TOPIC_ID=" & Topic_ID & """>" & ChkString(Topic_Subject,"title") & "</a></span> </font>" & vbNewLine

is replaced by 

'## MOD TOPIC POST DATE
  	    Response.Write	"<span class=""spnMessageText""><a href=""topic.asp?" & ArchiveLink & "TOPIC_ID=" & Topic_ID & """>" & ChkString(Topic_Subject,"title") & "</a><br />" & vbNewline & _
				"<font size=""" & strFooterFontSize & """> Begun " & ChkDate(Topic_TopicPost,"",false) & "</font></span> </font>" & vbNewLine


ACTIVE.ASP

Around line 248 add the lines indicated in red, in the positions shown


'## MOD TOPIC POST DATE added T.T_DATE
strSql = "SELECT F.FORUM_ID, " & _
         "F.F_SUBJECT, " & _
	 "F.F_SUBSCRIPTION, " & _
	 "F.F_STATUS, " & _
         "C.CAT_ID, " & _
	 "C.CAT_NAME, " & _
	 "C.CAT_SUBSCRIPTION, " & _
	 "C.CAT_STATUS, " & _
	 "T.T_STATUS, " & _
	 "T.T_VIEW_COUNT, " & _
	 "T.TOPIC_ID, " & _
	 "T.T_ISPOLL, " &_
	 "T.T_SUBJECT, " & _
	 "T.T_AUTHOR, " & _
	 "T.T_REPLIES, " & _
	 "T.T_UREPLIES, " & _
	 "M.M_NAME, " & _
	 "T.T_LAST_POST_AUTHOR, " & _
	 "T.T_LAST_POST, " & _
	 "T.T_DATE, " & _
	 "T.T_LAST_POST_REPLY_ID, " & _
	 "MEMBERS_1.M_NAME AS LAST_POST_AUTHOR_NAME, " & _
	 "F.F_PRIVATEFORUMS, " & _
	 "F.F_PASSWORD_NEW " & _
	 "FROM " & strMemberTablePrefix & "MEMBERS M, " & _
	 strTablePrefix & "FORUM F, " & _
	 strTablePrefix & "TOPICS T, " & _
	 strTablePrefix & "CATEGORY C, " & _
	 strMemberTablePrefix & "MEMBERS MEMBERS_1 " & _
	 "WHERE T.T_LAST_POST_AUTHOR = MEMBERS_1.MEMBER_ID "


Around line 444, find the code indicated, and add the code in red. Note that your field numbers may vary, and that you must increment all the field numbers following the inserted field so that the definitions are all sequential and consecutive:


	fT_SUBJECT = 12
	fT_AUTHOR = 13
	fT_REPLIES = 14
	fT_UREPLIES = 15
	fM_NAME = 16
	fT_LAST_POST_AUTHOR = 17
	fT_LAST_POST = 18
'## MOD TOPIC POST DATE
	fT_POST_DATE = 19
	fT_LAST_POST_REPLY_ID = 20
	fLAST_POST_AUTHOR_NAME = 21
	fF_PRIVATEFORUMS = 22
	fF_PASSWORD_NEW = 23


Around line 480, add the lines shown in red:


                Topic_Last_Post_Author = allActiveTopics(fT_LAST_POST_AUTHOR,RowCount)
		Topic_Last_Post = allActiveTopics(fT_LAST_POST,RowCount)
'## MOD TOPIC POST DATE
		Topic_Post_Date = allActiveTopics(fT_POST_DATE,RowCount)
		Topic_Last_Post_Reply_ID = allActiveTopics(fT_LAST_POST_REPLY_ID,RowCount)


Finally, around line 599, find the code indicated and replace it with the three lines in red:



			Response.Write	"<span class=""spnMessageText""><a href=""topic.asp?TOPIC_ID=" & Topic_ID & """>" & ChkString(Topic_Subject,"title") & "</a></span> </font>" & vbNewline


is replaced by


		'## MOD TOPIC POST DATE
			Response.Write	"<span class=""spnMessageText""><a href=""topic.asp?TOPIC_ID=" & Topic_ID & """>" & ChkString(Topic_Subject,"title") & "</a><br />" & vbNewline & _
							"<font size=""" & strFooterFontSize & """> Begun " & ChkDate(Topic_Post_Date,"",false) & "</font></span> </font>" & vbNewLine


===== END OF MOD CHANGE LIST =====

Edited 31 May by author to add line 480 change to ACTIVE.ASP omitted in original post.
Edited 6 Jun by author to add line 240 and line 465 changes to FORUM.ASP omitted in original post.
Edited 9 Jun by author to change misleading reference (TOPIC.ASP) to FORUM.ASP in 6 Jun correction footnote.


--Jördan
It's a wasted day if you don't spend at least part of it flying upside down.

Edited by - jfitz on 09 June 2003 20:53:53

Etymon
Advanced Member

United States
2385 Posts

Posted - 31 May 2003 :  23:06:20  Show Profile  Visit Etymon's Homepage

Thank you for the post, jfitz.

Just never know when I'll need something like this.

Cheers,

Etymon
Go to Top of Page

The Impact
Junior Member

Australia
398 Posts

Posted - 05 June 2003 :  04:56:46  Show Profile
I have not been to sucessful with this MOD... Sure your not missing some changes in the topic.asp file ?
Go to Top of Page

hayleypink
Junior Member

Haiti
145 Posts

Posted - 05 June 2003 :  06:13:03  Show Profile
thanks i will give that a go
Go to Top of Page

Classicmotorcycling
Development Team Leader

Australia
2084 Posts

Posted - 05 June 2003 :  17:40:20  Show Profile
I was thinking the same thing. The active.asp chanes work fine, but not the forum.asp changes. There are only 2 changes listed in forum.asp, yet in active.asp there are 4 changes.
quote:
Originally posted by The Impact

I have not been to sucessful with this MOD... Sure your not missing some changes in the topic.asp file ?

jfitz,

can you share the other bits that need to be altered, please?


Cheers,

David Greening
Go to Top of Page

jfitz
Junior Member

USA
345 Posts

Posted - 05 June 2003 :  23:27:20  Show Profile
I'll go check it out -- sorry if I missed a bit of the code.

--Jördan
It's a wasted day if you don't spend at least part of it flying upside down.
Go to Top of Page

jfitz
Junior Member

USA
345 Posts

Posted - 06 June 2003 :  00:19:23  Show Profile
You guys are exactly correct - I somehow missed the added entries in FORUM.ASP.

Here they are, and I'll also modify the original post to include the correction.

Humblest apologies for the mistake!

Around line 240

Where the SQL Select statement is built, add the T.T_DATE field between T.T_LAST_POST and T.T_LAST_POST_AUTHOR as shown in red (note: I also have the Poll mod installed so your code may not match mine exactly)


'## Forum_SQL - Get all topics from DB
'################### Poll Mod - Added T.T_ISPOLL to next line ###################
strSql ="SELECT T.T_STATUS, T.CAT_ID, T.FORUM_ID, T.TOPIC_ID, T.T_VIEW_COUNT, T.T_SUBJECT, T.T_ISPOLL," 
'## MOD TOPIC POST DATE - added T.T_DATE
strSql = strSql & "T.T_AUTHOR, T.T_STICKY, T.T_REPLIES, T.T_UREPLIES, T.T_LAST_POST, T.T_DATE, T.T_LAST_POST_AUTHOR, "  
strSql = strSql & "T.T_LAST_POST_REPLY_ID, M.M_NAME, MEMBERS_1.M_NAME AS LAST_POST_AUTHOR_NAME "


Around line 465

Assign a field sequence number to the variable tT_TOPIC_POST and renumber the subsequent entries. Every field number must be unique.


	tT_AUTHOR = 7
	tT_STICKY = 8
	tT_REPLIES = 9
	tT_UREPLIES = 10
	tT_LAST_POST = 11
'## MOD TOPIC POST DATE	
	tT_TOPIC_POST = 12
	tT_LAST_POST_AUTHOR = 13
	tT_LAST_POST_REPLY_ID = 14
	tM_NAME = 15
	tLAST_POST_AUTHOR_NAME = 16


That should do it. Again, my apologies for my original incomplete posting.

--Jördan
It's a wasted day if you don't spend at least part of it flying upside down.
Go to Top of Page

blues
Starting Member

26 Posts

Posted - 07 June 2003 :  07:02:27  Show Profile
i have this problem

07 June 2003 12:03:08
by: 0 <------ this is my error because there is a number and not the member name

the rest works good
Go to Top of Page

jfitz
Junior Member

USA
345 Posts

Posted - 07 June 2003 :  09:02:25  Show Profile
quote:
Originally posted by blues

i have this problem

07 June 2003 12:03:08
by: 0 <------ this is my error because there is a number and not the member name

the rest works good



Double check your field assignment numbers and make sure that they are all unique, consecutive, and contiguous (i.e., numbered from 1 to whatever with no duplicates and no skips). You should have made changes in both files (FORUM.ASP around line 465) and (ACTIVE.ASP around line 444).

Your numbers may not correspond exactly to the ones in the MOD because of other MODS you may or not have.

--Jördan
It's a wasted day if you don't spend at least part of it flying upside down.
Go to Top of Page

blues
Starting Member

26 Posts

Posted - 09 June 2003 :  03:53:53  Show Profile
thanks my friend
Go to Top of Page

pbo
Starting Member

Denmark
19 Posts

Posted - 09 June 2003 :  05:55:56  Show Profile
So which lines do I have to add in TOPIC.asp?
Go to Top of Page

jfitz
Junior Member

USA
345 Posts

Posted - 09 June 2003 :  14:09:14  Show Profile
There are no changes to TOPIC.ASP...only to FORUM.ASP and ACTIVE.ASP. The entire MOD is in the first post.

--Jördan
It's a wasted day if you don't spend at least part of it flying upside down.
Go to Top of Page

jfitz
Junior Member

USA
345 Posts

Posted - 09 June 2003 :  14:10:44  Show Profile
quote:
Originally posted by blues

thanks my friend



You're quite welcome.

--Jördan
It's a wasted day if you don't spend at least part of it flying upside down.
Go to Top of Page

pbo
Starting Member

Denmark
19 Posts

Posted - 09 June 2003 :  15:19:18  Show Profile
quote:
Originally posted by jfitz

There are no changes to TOPIC.ASP...only to FORUM.ASP and ACTIVE.ASP. The entire MOD is in the first post.



right, but what do you mean by Edited 6 Jun by author to add line 240 and line 465 changes to TOPIC.ASP omitted in original post. in the end of the first post
Go to Top of Page

jfitz
Junior Member

USA
345 Posts

Posted - 09 June 2003 :  20:50:39  Show Profile
I added those comments so that anyone reading the original post would know that it had been changed since it's first posting and why it had been changed. I managed to omit the referenced changes in the orginal post. Be editing the original post, the all of the code for the mod would appear in one location and there would be a lower likelihood that someone would fail to pick up the corrections than if the corrections were only posted separately. The reference to TOPIC.ASP is a typo which I missed when I added it...it should be FORUM.ASP. I'll go fix it right now. Thanks for pointing it out.

--Jördan
It's a wasted day if you don't spend at least part of it flying upside down.
Go to Top of Page

pbo
Starting Member

Denmark
19 Posts

Posted - 10 June 2003 :  09:21:33  Show Profile
I just got a bit confused since other members mentioned something might bee missing i TOPIC.ASP just wanted to be sure.
Anyway, i works fine now - I'v only "modded" Forum.asp. Are there any pacticulary reason also
to do the mod in ACTIVE.ASP
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 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.51 seconds. Powered By: Snitz Forums 2000 Version 3.4.07