Description:
This MOD updated to the new version of Snitz v3.4.03 forum. It allow user to preview topics from the forum, when you mouseover the link. it shows some a preview of the message.
Compatability:
Snitz v3.4.03
File need to change:
- inc_func_common.asp
- forum.asp
In file inc_func_common.asp
add this code
Find this code
function HTMLDecode(pString)
fString = trim(pString)
if fString = "" then
fString = " "
else
fString = replace(fString, ">", ">")
fString = replace(fString, "<", "<")
end if
HTMLDecode = fString
end function
Add this code after it
Function RemoveForumCode( strText )
Dim mPos1
Dim mPos2
mPos1 = InStr(strText, "[")
Do While mPos1 > 0
mPos2 = InStr(mPos1 + 1, strText, "]")
If mPos2 > 0 Then
strText = Left(strText, mPos1 - 1) & Mid(strText, mPos2 + 1)
Else
Exit Do
End If
mPos1 = InStr(strText, "[")
Loop
RemoveForumCode = strText
End Function
Function RemoveHTML( strText )
Dim nPos1
Dim nPos2
nPos1 = InStr(strText, "<")
Do While nPos1 > 0
nPos2 = InStr(nPos1 + 1, strText, ">")
If nPos2 > 0 Then
strText = Left(strText, nPos1 - 1) & Mid(strText, nPos2 + 1)
Else
Exit Do
End If
nPos1 = InStr(strText, "<")
Loop
RemoveHTML = strText
End Function
if fField_Type = "tooltip" then
fString = Replace(fString, """", "")
fString = Replace(fString, "'", "")
fString = Replace(fString, CHR(13), "")
fString = Replace(fString, CHR(10) & CHR(10), ".")
fString = Replace(fString, CHR(10), ".")
chkString = fString
end if
In the file Forum.asp
line 236 add the red color
strSql ="SELECT T.T_STATUS, T.CAT_ID, T.FORUM_ID, T.TOPIC_ID, T.T_VIEW_COUNT, T.T_SUBJECT, T.T_MESSAGE, "
line 441 find this code
tT_STATUS = 0
tCAT_ID = 1
tFORUM_ID = 2
tTOPIC_ID = 3
tT_VIEW_COUNT = 4
tT_SUBJECT = 5
tT_AUTHOR = 6
tT_STICKY = 7
tT_REPLIES = 8
tT_UREPLIES = 9
tT_LAST_POST = 10
tT_LAST_POST_AUTHOR = 11
tT_LAST_POST_REPLY_ID = 12
tM_NAME = 13
tLAST_POST_AUTHOR_NAME = 14
Replcae with this code
tT_STATUS = 0
tCAT_ID = 1
tFORUM_ID = 2
tTOPIC_ID = 3
tT_VIEW_COUNT = 4
tT_SUBJECT = 5
tT_MESSAGE =6
tT_AUTHOR = 7
tT_STICKY = 8
tT_REPLIES = 9
tT_UREPLIES = 10
tT_LAST_POST = 11
tT_LAST_POST_AUTHOR = 12
tT_LAST_POST_REPLY_ID = 13
tM_NAME = 14
tLAST_POST_AUTHOR_NAME = 15
In line 467 add this code
Topic_Message = arrTopicData(tT_MESSAGE, iTopic)
it will be like this
Topic_Subject = arrTopicData(tT_SUBJECT, iTopic)
Topic_Message = arrTopicData(tT_MESSAGE, iTopic)
Topic_Author = arrTopicData(tT_AUTHOR, iTopic)
At line 534 find this code
Response.Write "<span class=""spnMessageText""><a href=""topic.asp?" & ArchiveLink & "TOPIC_ID=" & Topic_ID & """>" & ChkString(Topic_Subject,"title") & "</a></span> </font>" & vbNewLine
Replcae with this one
Response.Write "<span class=""spnMessageText""><a href=""topic.asp?" & ArchiveLink & "TOPIC_ID=" & Topic_ID & """><acronym title=""" & ChkString(left(RemoveForumCode(RemoveHTML(Topic_Message)), 150), "tooltip") & """>" & ChkString(Topic_Subject,"title") & "</acronym></a></span> </font>" & vbNewLine
hope you like it