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
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 04 June 2008 :  17:59:09  Show Profile
Microsoft VBScript runtime error '800a000d'
Type mismatch: ' [string: ""] '
/forum /inc_func_common.asp, line 820<
Go to Top of Page

Carefree
Advanced Member

Philippines
4222 Posts

Posted - 05 June 2008 :  00:41:33  Show Profile
quote:
Originally posted by Andy Humm

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


There is nothing wrong with your post_history file. The error you refer to is from inc_func_common. Maybe you should post a link to a txt version of it instead.<
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 05 June 2008 :  03:43:04  Show Profile
Carefree, here is my inc_func_common.asp txt link
inc_func_common.asp line 820 is
case "dmmmy"
chkDate = Mid(fDate,7,2) & " " & _
Monthname(Mid(fDate,5,2),0) & " " & _
Mid(fDate,1,4)


The chkdate is part of function chkDate(fDate,separator,fTime)

What format is the date in Post_history.asp?<
Go to Top of Page

Carefree
Advanced Member

Philippines
4222 Posts

Posted - 05 June 2008 :  04:06:08  Show Profile
Your time routines are heavily modified in func_common. If there was any clues as to which mods made them, it would help.

I looked at your post_history file again. You moved the dim and value assignment of PHD to the top of the file. The dim can be there but not the value assignment line. For it to have an actionable value, it must come immediately after these lines:

			intI  = intI + 1
			if intI = 2 then
				intI = 0
			end if
		next


Try moving it there and see if that resolves your error.<
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 05 June 2008 :  04:32:07  Show Profile
Looking at what has been done so far, with the suggested code, the first block there are two occasions of: (line 57 and 161) I inserted the block at line 161
If Request.QueryString("T_ID") <> "" Then
T_ID = cLng(Request.QueryString("T_ID"))


Likewise the last block
Response.Write " " & getCurrentIcon(strIconPosticon.......... there is two occasions line 204 and 137. I inserted the new code at line 204. I think line 137 controls the dates for any previous post history changes.

What I have so far

We notice the topic.asp last edited time 23.16 (yellow) is not mirrored on post_history.asp current version time ie they should match each other as they are the last edit times. You will also notice that the current version time is earlier than previous post history line entries..


The line in topic.asp that uses the last edit is
"Edited by - " & Reply_LastEditByName & " on " & chkDate(Reply_LastEdit, " " ,true) & "</font></td>" & vbNewLine & _ could we somehow extract the Reply_LastEdit





<
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 05 June 2008 :  05:02:14  Show Profile
Carefree thank you for the help so far.. The assignment of PHD i have is as you suggested directly after next..
intI = intI + 1
if intI = 2 then
intI = 0
end if
next
'##lastedit
dim PHD
PHD = phHistory_Date
'##lastedit


The time functions of the inc_func_common were adjusted to allow the chkdate to display dates today as text 'Today', yesterday as 'Yesterday' and any prior dates as the date it is ie 3 May 2008 . It works on all the other chkdate scenarios of the forum. It was not a mod just some 'shaggy' code http://forum.snitz.com/forum/topic.asp?TOPIC_ID=64078<
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 05 June 2008 :  05:20:42  Show Profile
Probably clutching at straws, but this routine:
End If
phHistory_Message = phRS2("phMsg")
phHistory_Author = phRS2("phAuth")
phHistory_LastEditBy = phRS2("phLastEditBy")
phHistory_Date = phRS2("phDate")
'##lastedit
if phRS2("phLastEditBy") > PHD then
PHD = phRS2("phLastEditBy")
end if
'##lastedit


Your suggested code in red. I don't know what the phLastEditBy outputs, but is this a member name or a date?

I tried this and no difference
End If
phHistory_Message = phRS2("phMsg")
phHistory_Author = phRS2("phAuth")
phHistory_LastEditBy = phRS2("phLastEditBy")
phHistory_Date = phRS2("phDate")
'##lastedit
if phRS2("phLastEditBy") > PHD then
PHD = phRS2("phLastEditBy")
end if

dim PHD
PHD = phHistory_Date

'##lastedit

<

Edited by - Andy Humm on 05 June 2008 05:36:10
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 05 June 2008 :  06:13:22  Show Profile
Finger scratching me head, the old logic triggers the grey matter, why the last edit date is not working.

I have finally solved the problem - with this driving the grey brain cells into overdrive - "Your suggested code in red. I don't know what the phLastEditBy outputs, but is this a member name or a date?" I changed a few lines to:

dim PHD
PHD = phHistory_Date
'##lastedit
If Request.QueryString("T_ID") <> "" Then
T_ID = cLng(Request.QueryString("T_ID"))
strSQL = "SELECT TOPIC_ID, T_SUBJECT, T_MESSAGE AS phMsg, T_AUTHOR AS phAuth, T_LAST_EDITBY AS phLastEditBy, T_DATE AS phDate FROM " & strActivePrefix & "TOPICS WHERE TOPIC_ID = " & T_ID
End If
If Request.QueryString("R_ID") <> "" Then
R_ID = cLng(Request.QueryString("R_ID"))
strSQL = "SELECT REPLY_ID, R_AUTHOR AS phAuth, R_MESSAGE AS phMsg, R_LAST_EDIT AS phLastEdit, R_DATE AS phDate FROM " & strActivePrefix & "REPLY WHERE REPLY_ID = " & R_ID
End If

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_LastEdit = phRS2("phLastEdit")
phHistory_Date = phRS2("phDate")
'##lastedit
if phRS2("phLastEdit") > PHD then
PHD = phRS2("phLastEdit")
end if
'##lastedit


the old code is where the 'by' have been removed

dim PHD
PHD = phHistory_Date
'##lastedit
If Request.QueryString("T_ID") <> "" Then
T_ID = cLng(Request.QueryString("T_ID"))
strSQL = "SELECT TOPIC_ID, T_SUBJECT, T_MESSAGE AS phMsg, T_AUTHOR AS phAuth, T_LAST_EDITBY AS phLastEditBy, T_DATE AS phDate FROM " & strActivePrefix & "TOPICS WHERE TOPIC_ID = " & T_ID
End If
If Request.QueryString("R_ID") <> "" Then
R_ID = cLng(Request.QueryString("R_ID"))
strSQL = "SELECT REPLY_ID, R_AUTHOR AS phAuth, R_MESSAGE AS phMsg, R_LAST_EDITBY AS phLastEditby, R_DATE AS phDate FROM " & strActivePrefix & "REPLY WHERE REPLY_ID = " & R_ID
End If

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")
'##lastedit
if phRS2("phLastEditby") > PHD then
PHD = phRS2("phLastEditby")
end if
'##lastedit

Final result:
<
Go to Top of Page

Carefree
Advanced Member

Philippines
4222 Posts

Posted - 05 June 2008 :  06:22:39  Show Profile
If you're going to remove all the "by"s from the code, you skipped the ones for the topic date check.

		If Request.QueryString("T_ID") <> "" Then
			T_ID = cLng(Request.QueryString("T_ID"))
			strSQL = "SELECT TOPIC_ID, T_SUBJECT, T_MESSAGE AS phMsg, T_AUTHOR AS phAuth, T_LAST_EDITBY AS phLastEditBy, T_DATE AS phDate FROM " & strActivePrefix & "TOPICS WHERE TOPIC_ID = " & T_ID
		End If
<

Edited by - Carefree on 05 June 2008 06:24:45
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 05 June 2008 :  06:56:49  Show Profile
Thanks good spot, I did edit that out after I posted above..

Lon, Here is my final post_history.asp Text File
regards Andy<

Edited by - Andy Humm on 05 June 2008 08:16:08
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Previous 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.94 seconds. Powered By: Snitz Forums 2000 Version 3.4.07