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: MOD Implementation
 Post History Mod - times?
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 15 May 2008 :  05:24:03  Show Profile
Installed the Post History Mod and noticed when a member edits the thread the recorded times are back to front.
I tested the mod by
1. Member makes post at Time +0 mins
2. Moderator/Admin approves/moderates reply at Time +2mins
3. Member edits post at Time +4 mins
4. Moderator/Admin checks post history of reply and the times are recorded as it seems back to front

How can the previous version post time be smaller in value than the current version?
The lines which extract times in post_history.asp
Previous version line 138
" " & getCurrentIcon(strIconPosticon,"","hspace=""3""") & "<font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>Posted - " & ChkDate(phHistory_Date, " : " ,true) & "</font>" & vbNewline
Current Version line 197
Response.Write " " & getCurrentIcon(strIconPosticon,"","hspace=""3""") & "<font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>Posted - " & ChkDate(phHistory_Date, " : " ,true) & "</font>" & vbNewline

Surely the post history previous time should be larger in value?

On topic.asp, the edited time is smaller in value that the original post time

So we could assume that the submitted times of edit and posting are working, just the post history mod is not extracting the right times.

<

Edited by - Andy Humm on 15 May 2008 05:35:38

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 15 May 2008 :  05:41:39  Show Profile
Further to above
The code for the times:
arrPostData = phRS.GetRows(adGetRowsRest)
iHistCount = UBound(arrPostData, 2)

intI = 0

phH_ID = 0
phT_ID = 1
phT_SUBJECT = 2
phR_ID = 3
phP_MESSAGE = 4
phP_AUTHOR = 5
phP_LAST_EDITBY = 6
phP_DATE = 7

for iForum = 0 to iHistCount
phHistory_ID = arrPostData(phH_ID, iForum)
phHistory_TopicID = arrPostData(phT_ID, iForum)
phHistory_TopicSub = arrPostData(phT_SUBJECT, iForum)
phHistory_ReplyID = arrPostData(phR_ID, iForum)
phHistory_Message = arrPostData(phP_MESSAGE, iForum)
phHistory_Author = arrPostData(phP_AUTHOR, iForum)
phHistory_LastEditBy = arrPostData(phP_LAST_EDITBY, iForum)
phHistory_Date = arrPostData(phP_DATE, iForum)

Code for Current Version:
Set phRS2 = Server.CreateObject("ADODB.RecordSet")
phRS2.Open strSQL, my_Conn

If Request.QueryString("T_ID") <> "" Then
phHistory_TopicID = phRS2("TOPIC_ID")
phHistory_TopicSub = phRS2("T_SUBJECT")
End If
If Request.QueryString("R_ID") <> "" Then
phHistory_ReplyID = phRS2("REPLY_ID")
End If
phHistory_Message = phRS2("phMsg")
phHistory_Author = phRS2("phAuth")
phHistory_LastEditBy = phRS2("phLastEditBy")
phHistory_Date = phRS2("phDate")

phRS2.Close
Set phRS2 = Nothing
<

Edited by - Andy Humm on 15 May 2008 05:42:19
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 15 May 2008 :  05:59:27  Show Profile
Access database records for above:

FORUM_REPLY table
R_Last_Edit 20080515100402
R_Date 20080515100030

FORUM_POST_HISTORY table
P_Date 20080515100206<
Go to Top of Page

Carefree
Advanced Member

Philippines
4222 Posts

Posted - 15 May 2008 :  07:17:53  Show Profile
Line 195
Change "Current" to "Original"...done.<
Go to Top of Page

Carefree
Advanced Member

Philippines
4222 Posts

Posted - 15 May 2008 :  07:20:39  Show Profile
While on the subject of the Post History mod, did anyone else try to have a numerical list parsed? It does a regular [ list ] fine, but when it tries to interpret a [ list=1 ] , it renders the following:

< ol type="1" >
< li > < /li >
....
< /ol id="1" ><
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 15 May 2008 :  08:01:16  Show Profile  Visit AnonJr's Homepage
quote:
Originally posted by Carefree

While on the subject of the Post History mod, did anyone else try to have a numerical list parsed? It does a regular [ list ] fine, but when it tries to interpret a [ list=1 ] , it renders the following:

< ol type="1" >
< li > < /li >
....
< /ol id="1" >

If memory serves, that's a known issue that hasn't been fixed by the MOD Author yet... search for the thread here that announces the creation of the MOD just to double-check.<
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 15 May 2008 :  08:02:20  Show Profile
quote:
Originally posted by Carefree

Line 195 Change "Current" to "Original"...done.


The text posted in the 'current version' is the latest text and the 'previous version' was the original script written. Its the date extraction from the database which seems wrong.<
Go to Top of Page

Carefree
Advanced Member

Philippines
4222 Posts

Posted - 15 May 2008 :  10:55:20  Show Profile
I just looked at some of the topic times in the database itself. The date/time string in forum_topics & forum_reply are the original dates & times for the posts. The date/time strings in the history file are LATER. So my supposition was correct, the title of the bottom row should have been "Original Version" vs "Current Version". The latest "History" version should actually be the current message.

Are you sure about which message is later? Because something isn't adding up.<
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 15 May 2008 :  11:41:51  Show Profile
From my initial post above and image supplied, the current version is the latest text that shows in the topic and the previous version is the text prior to the edit. Hence the concern over the times recorded are back to front. Even when you do a second edit, the current version time is later than the first edit. i.e., 10 mins ago and the first edit says 4 mins ago, and initial post was over 10mins ago.<
Go to Top of Page

Lon
Starting Member

USA
47 Posts

Posted - 16 May 2008 :  10:58:43  Show Profile
I have to agree with Andy Humm. This is what I got...

<
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 16 May 2008 :  11:12:47  Show Profile
It appears the Post History mod is recording edits in the database, indicated by the changes as Leon has illustrated. Firstly, each edit, does this get recorded in the FORUM_POST_HISTORY table as a separate line entry and linked to an unique Reply ID no. If so, this ReplyID number must be stored in the FORUM_REPLY table. Looking at the topic.asp the Posted Time of the reply seems different from any of the post history displayed times. The very last edit time is recorded (browny colour on image)and this time stamp should be utilised as the Current Version time/date. Topic.asp line 717 "Edited by - " & Reply_LastEditByName & " on " & chkDate(Reply_LastEdit, " " ,true) & "</font></td>" & vbNewLine & _ provides the last edit display in the reply.

Image from Topic.asp

The current version time below,(red) is taken from the from the posted time above.

Image from Post History.asp


Hopefully we can solve this inaccuracy.<

Edited by - Andy Humm on 16 May 2008 12:14:54
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 19 May 2008 :  04:56:09  Show Profile
Is there a possibility to use the 'chkDate(Reply_LastEdit, " " ,true)' from the 'last edited' data, to provide the Current Version Posted time/date?<

Edited by - Andy Humm on 19 May 2008 08:35:12
Go to Top of Page

Lon
Starting Member

USA
47 Posts

Posted - 30 May 2008 :  15:10:51  Show Profile
Andy, did you ever figure this out?<
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 30 May 2008 :  18:16:17  Show Profile
I am still waiting for some help, but I believe the error lies with not using 'chkDate(Reply_LastEdit, " " ,true)' instead of what looks like original post date. See my reply Posted - 16 May 2008 : 11:12:47 all the areas circled in brown indicates the last edit date as 16.28 instead of the initial posted time 16.21 circled in red..

It would be nice to put this one to bed...<
Go to Top of Page

Carefree
Advanced Member

Philippines
4222 Posts

Posted - 30 May 2008 :  20:49:20  Show Profile
Sorry, Andy. I forgot about this thread.

Here you go:

Search for the following lines


		If Request.QueryString("T_ID") <> "" Then
			T_ID = cLng(Request.QueryString("T_ID"))

Above them, add the following:

		dim PHD
		PHD = phHistory_Date


Search for the following lines

		phHistory_LastEditBy = phRS2("phLastEditBy")
		phHistory_Date = phRS2("phDate")

After them, add the following:

		if phRS2("phLastEditBy") > PHD then 
			PHD = phRS2("phLastEditBy")
		end if


Finally, search for the following:

Response.Write " " & getCurrentIcon(strIconPosticon,"","hspace=""3""") & "<font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>Posted - " & ChkDate(phHistory_Date, " : " ,true) & "</font>" & vbNewline

Change it to say:

		Response.Write  "                      " & getCurrentIcon(strIconPosticon,"","hspace=""3""") & "<font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize  & """>Posted - " & ChkDate(PHD, " : " ,true) & "</font>" & vbNewline
<
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 04 June 2008 :  17:57:51  Show Profile
Apologies for the delay in getting back, but finally I have tried the code above and received the following error (in next post)

Confusion has set in, I noticed there was two line with your last change (Response.Write " " & getCurrentIcon(strIconPosticon,"","hspace=""3""") & "<font .......)

I wonder if you would be kind to peruse my text file and see where the mismatch/error might be..
Thanks andy<

Edited by - Andy Humm on 04 June 2008 17:58:54
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.37 seconds. Powered By: Snitz Forums 2000 Version 3.4.07