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)
 First Post info
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

mortioli
Average Member

United Kingdom
898 Posts

Posted - 18 February 2003 :  04:56:35  Show Profile  Visit mortioli's Homepage  Send mortioli an AOL message  Send mortioli a Yahoo! Message
Hiya!

Just wondered if anyone has done this on their forum...

The Last Post column shows the date/time/author of the Last Post, but would it be possible to do the same for the author column?

Thanks for your time!

mortioli
Average Member

United Kingdom
898 Posts

Posted - 12 March 2003 :  14:11:13  Show Profile  Visit mortioli's Homepage  Send mortioli an AOL message  Send mortioli a Yahoo! Message
Anyone [:d]
Go to Top of Page

DoraMoon
Average Member

Taiwan
661 Posts

Posted - 13 March 2003 :  09:07:55  Show Profile
hi~ mortioli,

we just need to add T_DATE in sql query to get the Topic/First Post date/time info.
i always made this passing implement when i changed something in forum.asp & active.asp page.
and it's very easy to add these modified code....

you may want to take a look this small mod: Last Post Info
in the forum.asp modified example file, find these lines..
'##### Last Post Info 2-x(optional):
2-1,2-2,2-3: it almost the same formula to add one more data field to strSql...
2-4: output the topic date somewhere...
you can use chkDate function here to get what date/time format you prefer.
(e.g. chkDate(Topic_Date,"<br />",true)....)

hope this helpful for you.
Go to Top of Page

cripto9t
Average Member

USA
881 Posts

Posted - 14 March 2003 :  08:37:06  Show Profile
Thanks DoraMoon, this is something I wanted to do 2. I got it working no problem , getting it to look good took a little longer though .

    _-/Cripto9t\-_
Go to Top of Page

mortioli
Average Member

United Kingdom
898 Posts

Posted - 14 March 2003 :  10:43:26  Show Profile  Visit mortioli's Homepage  Send mortioli an AOL message  Send mortioli a Yahoo! Message
Thanks DoraMoon!

cripto9t do you have the code changes that you made Saves me from struggling with the code

Cheers
Go to Top of Page

cripto9t
Average Member

USA
881 Posts

Posted - 15 March 2003 :  07:47:34  Show Profile
Sure, it's very easy.

In forum.asp

find these lines additions are in red.

'## Forum_SQL - Get all topics from DB
strSql ="SELECT T.T_STATUS, T.CAT_ID, T.FORUM_ID, T.TOPIC_ID, T.T_VIEW_COUNT, T.T_SUBJECT, T.T_DATE, T.T_MESSAGE,  " 
strSql = strSql & "T.T_AUTHOR, T.T_STICKY, T.T_REPLIES, T.T_UREPLIES, T.T_LAST_POST, 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, T.T_MSGICON "


And further down,

tT_STATUS = 0
	tCAT_ID = 1
	tFORUM_ID = 2
	tTOPIC_ID = 3
	tT_VIEW_COUNT = 4
	tT_SUBJECT = 5
        tT_DATE = 6  'don't forget to change the number sequence below
        tT_MESSAGE =7
	tT_AUTHOR = 8
	tT_STICKY = 9
	tT_REPLIES = 10
	tT_UREPLIES = 11
	tT_LAST_POST = 12
	tT_LAST_POST_AUTHOR = 13
	tT_LAST_POST_REPLY_ID = 14
	tM_NAME = 15
	tLAST_POST_AUTHOR_NAME = 16
        tT_MSGICON = 17
        tT_NOTELET_STATUS = 18
	tT_NOTELET_LAST_DATE = 19
	tT_NOTELET_EDITBY = 20
	tT_NOTELET_MESSAGE = 21

	rec = 1
	for iTopic = 0 to iTopicCount
		if (rec = strPageSize + 1) then exit for

		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_Date = arrTopicData(tT_DATE, iTopic)
                Topic_Message = arrTopicData(tT_MESSAGE, iTopic)
		Topic_Author = arrTopicData(tT_AUTHOR, iTopic)
		Topic_Sticky = arrTopicData(tT_STICKY, iTopic)
		Topic_Replies = arrTopicData(tT_REPLIES, iTopic)



And now add it where you want it. This might help, I put mine above the subject.


if Topic_Sticky and strStickyTopic = "1" then Response.Write("Sticky:  ")
                  strToolTip = ChkString(RemoveForumCode(RemoveHTML(Topic_Message)), "tooltip")
               if RTrim(Len(strToolTip)) > 150 then
                  strToolTip = Left(strToolTip, 150) & "..."
               end if

                Response.Write  "  <span class=""post"">Posted on " & chkDate(Topic_Date," at ",true) & "</span><br />" & vbNewline & _
                                "<hr color=""#bdb76b"" width=""225px"">" & vbNewline & _
		        	"<span class=""spnMessageText""><a href=""topic.asp?" & ArchiveLink & "TOPIC_ID=" & Topic_ID & """><acronym title=""" & strToolTip & """>" & formatStr(ChkString(Topic_Subject,"title")) & "</acronym></a></span> </font>" & vbNewLine



I also gave it a CSS class in the inc_header.asp

".post {" & vbNewline & _
                        "font-size: 10px;" & vbNewline & _
                        "font-weight: bold;" & vbNewline & _
                        "display: inline;" & vbNewline & _
                       "}" & vbNewline & _


Hope this helps



    _-/Cripto9t\-_
Go to Top of Page

mortioli
Average Member

United Kingdom
898 Posts

Posted - 16 March 2003 :  05:50:42  Show Profile  Visit mortioli's Homepage  Send mortioli an AOL message  Send mortioli a Yahoo! Message
Cheers

I changed it a bit, and this is the outcome...

http://www.ckyalliance.co.uk/forum/forum.asp?FORUM_ID=2
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 1 seconds. Powered By: Snitz Forums 2000 Version 3.4.07