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/Code)
 MOD: Topic Preview in Forum
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 3

Ez4arab
Junior Member

479 Posts

Posted - 30 October 2002 :  13:47:47  Show Profile  Visit Ez4arab's Homepage
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


Ez4arab web site Ez4arab |

PeeWee.Inc
Senior Member

United Kingdom
1893 Posts

Posted - 30 October 2002 :  13:50:18  Show Profile  Visit PeeWee.Inc's Homepage
Have you got a Demo?

De Priofundus Calmo Ad Te Damine
Go to Top of Page

Ez4arab
Junior Member

479 Posts

Posted - 30 October 2002 :  14:28:22  Show Profile  Visit Ez4arab's Homepage
i have test this mod in my computer i will try to show you demo within one day.

Ez4arab web site Ez4arab |
Go to Top of Page

Ez4arab
Junior Member

479 Posts

Posted - 30 October 2002 :  16:13:56  Show Profile  Visit Ez4arab's Homepage
DEMO:http://www.ez4arab.com/demo/forum.asp?FORUM_ID=1

Ez4arab web site Ez4arab |
Go to Top of Page

PeeWee.Inc
Senior Member

United Kingdom
1893 Posts

Posted - 30 October 2002 :  16:17:37  Show Profile  Visit PeeWee.Inc's Homepage
it's a nice mod, i will install this tomoro.

De Priofundus Calmo Ad Te Damine
Go to Top of Page

Kent
Junior Member

United States
193 Posts

Posted - 30 October 2002 :  18:06:49  Show Profile
Does it display the entire text of the topic, or a specific number of characters?
Go to Top of Page

ajhvdb
Junior Member

Netherlands
392 Posts

Posted - 30 October 2002 :  18:33:55  Show Profile
150 chars
Go to Top of Page

goldfish
New Member

82 Posts

Posted - 31 October 2002 :  07:28:51  Show Profile
quote:
Originally posted by ajhvdb

150 chars



Looks good, but would it be possible to add an ellipsis ('...') automatically at the text cut off point, to make it clear that the text continues....?

Cheers,

Simon
Go to Top of Page

ajhvdb
Junior Member

Netherlands
392 Posts

Posted - 31 October 2002 :  15:10:51  Show Profile
change:

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


to:


strToolTip = ChkString(RemoveForumCode(RemoveHTML(Topic_Message)), "tooltip")
if RTrim(Len(strToolTip)) > 150 then
    strToolTip = Left(strToolTip, 150) & "..."
end if
Response.Write	"<span class=""spnMessageText""><a href=""topic.asp?" & ArchiveLink & "TOPIC_ID=" & Topic_ID & """><acronym title=""" & strToolTip & """>" & ChkString(Topic_Subject,"title") & "</acronym></a></span> </font>" & vbNewLine
Go to Top of Page

kirgy
New Member

Germany
95 Posts

Posted - 31 October 2002 :  15:36:08  Show Profile  Visit kirgy's Homepage
Not bad at all,
but anyone checked the performance with more than just 2 entries in a forum?

Kirgy
-------------
http://www.kirgy-web.de
Go to Top of Page

StephenD
Senior Member

Australia
1044 Posts

Posted - 31 October 2002 :  19:17:35  Show Profile  Send StephenD a Yahoo! Message
I'm using it now, although I changed it to display 250 characters and to display smilies in topic too. Works great.
Go to Top of Page

Lunaticta
Starting Member

1 Posts

Posted - 02 November 2002 :  16:26:17  Show Profile
Wow, works great!

It would be nice to have this functionality in the active topics as well, any idea on how to get that working?

Thanks.
Go to Top of Page

mortioli
Average Member

United Kingdom
898 Posts

Posted - 09 November 2002 :  09:24:52  Show Profile  Visit mortioli's Homepage  Send mortioli an AOL message  Send mortioli a Yahoo! Message
Any way of changing the back ground colour of the tooltip?

Have you ever thought of using OverLib instead of normal tooltips? http://www.bosrup.com/web/overlib/
Go to Top of Page

StephenD
Senior Member

Australia
1044 Posts

Posted - 21 November 2002 :  02:08:33  Show Profile  Send StephenD a Yahoo! Message
Anyone get this one working on Active.asp yet?
Go to Top of Page

mortioli
Average Member

United Kingdom
898 Posts

Posted - 25 November 2002 :  12:22:14  Show Profile  Visit mortioli's Homepage  Send mortioli an AOL message  Send mortioli a Yahoo! Message
Is it possible to do the same, except to show the last post when mouseover on the last post icon?
Go to Top of Page

mortioli
Average Member

United Kingdom
898 Posts

Posted - 29 November 2002 :  02:14:04  Show Profile  Visit mortioli's Homepage  Send mortioli an AOL message  Send mortioli a Yahoo! Message
*bump*
Go to Top of Page
Page: of 3 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.21 seconds. Powered By: Snitz Forums 2000 Version 3.4.07