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

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Classic ASP versions(v3.4.XX)
 Site Stats Board - Last Post time
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 07 February 2009 :  06:23:13  Show Profile
I notice that when you are moderating the replies, when the admin comes round to approve the entries, the Statistics board shows the last post at the time of approval. Looking into at topic, the time of member posting the reply time shows. Is there a way to align the
17910 of 31433 Members have made 32057 posts in 45 forums, with the last post on 07 February 2009 02:57:32 by: HuwR with the date time of the posting reply.
<

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 07 February 2009 :  07:12:08  Show Profile
Sure. At the beginning of code in "inc_statistics.asp" (appx line 35), insert the following lines:
strSql="SELECT F_LAST_POST FROM " & strTablePrefix & "FORUM ORDER BY F_LAST_POST"
set rsLP = my_Conn.Execute(strSql)
if not rsLP.BOF and not rsLP.EOF then
	LastPostDate = rsLP("F_LAST_POST")
	rsLP.close
end if
set rsLP=Nothing


That should do it.<

Edited by - Carefree on 07 February 2009 07:32:45
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 07 February 2009 :  07:27:45  Show Profile
Thank you CF, just searched my forum files and I do not have a "inc_statistics.asp" ??? Is there another place where this code should go?<

Edited by - Andy Humm on 07 February 2009 07:34:12
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 07 February 2009 :  07:30:59  Show Profile
Any time.<
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 07 February 2009 :  07:47:38  Show Profile
CF, I Think your reply was posted before my edit of "just searched my forum files and I do not have a "inc_statistics.asp" ??? Is there another place where this code should go?"
rgds andy<
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 07 February 2009 :  13:02:59  Show Profile
Sorry, had wrong file name, it should have been "inc_forumstatistics.asp".<

Edited by - Carefree on 07 February 2009 13:05:57
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 07 February 2009 :  14:28:20  Show Profile
CF, that seems strange, I do not even have that file name. Searching through the default.asp there is some reference to the
17910 of 31433 Members have made 32057 posts in 45 forums, with the last post on 07 February 2009 02:57:32 by: HuwR but its knowing which part of the code to pull the very last post date time
rgds andy<
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 07 February 2009 :  14:38:22  Show Profile
In default.asp line 1027 there is the following:
Response.Write ", with the last post <span class=""spnMessageText"">" & LastPostLink & LastPostDate & "</a></span>"<
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 07 February 2009 :  15:02:05  Show Profile
In "default.asp", appx lines 940-949, look for the following:
		if (LastPostDate = "" or LastPostLink = "" or intPostCount = 0) then 
			Response.Write	"." 
		else
			Response.Write	", with the last post on <span class=""spnMessageText"">" & LastPostLink & LastPostDate & "</a></span>"
			if  LastPostAuthorLink <> "" then
				Response.Write	LastPostAuthorLink & "."
			else
				Response.Write	"."
			end if
		end if

Immediately before this routine, insert this:

strSql="SELECT T_LAST_POST FROM " & strTablePrefix & "TOPICS ORDER BY T_LAST_POST"
set rsLP = my_Conn.Execute(strSql)
if not rsLP.BOF and not rsLP.EOF then
	LastPostDate = rsLP("T_LAST_POST")
	rsLP.close
end if
set rsLP=Nothing
<

Edited by - Carefree on 07 February 2009 16:06:02
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 07 February 2009 :  15:58:12  Show Profile
Hi CF, I have inserted the suggested code and tested it on the forum. I have the follwing observations:
1. Added a reply to a post as a member 'Lyne' about 12 minutes ago. Log out
2. As moderator, logged in, approved entry and the posted time has stated 10-11 minutes ago in topic.asp.

3. However, when going back out to default.asp the last reply time in the stats board is saying the time the moderator approved reply and not the time that was the last post ie 12 minutes ago

When the moderator approves a reply what datestamp is inserted into the forum database? Should the approval yes be a mater of changing a state from unapproved to approved and leave the original member posting time as the last post time?<

Edited by - Andy Humm on 07 February 2009 16:32:11
Go to Top of Page

modifichicci
Average Member

Italy
787 Posts

Posted - 07 February 2009 :  16:40:40  Show Profile  Visit modifichicci's Homepage
I think that the real post time is when a moderator approve the post, and it is so visible to all the users, as it was posted at that time.
But this only my idea...<

Ernia e Laparocele
Forum di Ernia e Laparocele
Acces - MySql Migration Tutorial
Adamantine forum
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 07 February 2009 :  16:51:02  Show Profile
This seems to work. Let me know if not.

strSql="SELECT T.T_DATE, R.R_DATE FROM " & strTablePrefix & "TOPICS T, " & strTablePrefix & "REPLY R ORDER BY R.R_DATE DESC, T.T_DATE DESC"
set rsLP = my_Conn.Execute(strSql)
if not rsLP.BOF and not rsLP.EOF then
	LastPostDate = rsLP("T_DATE")
else	
	if rsLP("R_DATE") > rsLP("T_DATE") then
		LastPostDate = rsLP("R_DATE")
	else
		LastPostDate = rsLP("T_DATE")
	end if
	rsLP.close
end if
set rsLP=Nothing
LastPostDate=StrToDate(LastPostDate)
<
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 07 February 2009 :  17:49:29  Show Profile
Hi CF, thank you for your input. When putting this new code in , the default.asp page takes well over 30secs to open/display and when it does eventually open it shows a date of 4th Feb and no poster link??? I have reverted back to original default.asp file and the page opens very quickly as before..The plot thickens
here is my original default file default.txt
thanking u
andy
<
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 07 February 2009 :  19:07:37  Show Profile
I tested your file (with my little change) and it opens in less than a second on my server. Here's a link in .txt format: Andy's Default.asp<
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 08 February 2009 :  05:21:42  Show Profile
CF Thank you everso much its seems a little slower that pre-change but it works.
I have adjusted the last line to:
LastPostDate=ChkDate(LastPostDate,"",true)
so it shows the same date format I have.
Cheers pal<
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.27 seconds. Powered By: Snitz Forums 2000 Version 3.4.07