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

Brett Alcock
New Member

65 Posts

Posted - 04 December 2002 :  07:23:47  Show Profile
quote:
Originally posted by StephenD

Anyone get this one working on Active.asp yet?


Ok topic tooltip in Active.asp;

1. Add T.T_MESSAGE to the sql string around line 261:

So
	 "T.T_SUBJECT, " & _
	 "T.T_AUTHOR, " & _

Becomes
	 "T.T_SUBJECT, " & _
	 "T.T_MESSAGE, " & _
	 "T.T_AUTHOR, " & _

2. Then adjust the array indexes accordingly around line 452;

So
	fT_SUBJECT = 11
	fT_AUTHOR = 12
	fT_REPLIES = 13
	fT_UREPLIES = 14
	fM_NAME = 15
	fT_LAST_POST_AUTHOR = 16
	fT_LAST_POST = 17
	fT_LAST_POST_REPLY_ID = 18
	fLAST_POST_AUTHOR_NAME = 19
	fF_PRIVATEFORUMS = 20
	fF_PASSWORD_NEW = 21

Becomes
	fT_SUBJECT = 11
	fT_MESSAGE = 12
	fT_AUTHOR = 13
	fT_REPLIES = 14
	fT_UREPLIES = 15
	fM_NAME = 16
	fT_LAST_POST_AUTHOR = 17
	fT_LAST_POST = 18
	fT_LAST_POST_REPLY_ID = 19
	fLAST_POST_AUTHOR_NAME = 20
	fF_PRIVATEFORUMS = 21
	fF_PASSWORD_NEW = 22


3. Add the Topic_Message variable around line 480
(Missing from original posting, added on 05/12/02)

so
		Topic_Subject = allActiveTopics(fT_SUBJECT,RowCount)
		Topic_Author = allActiveTopics(fT_AUTHOR,RowCount)
becomes
		Topic_Subject = allActiveTopics(fT_SUBJECT,RowCount)
		Topic_Message = allActiveTopics(fT_MESSAGE,RowCount)
		Topic_Author = allActiveTopics(fT_AUTHOR,RowCount)


4. Now insert the tooltip in the topic title around line 596;

Find line beginning;
Response.Write	"<span class=""spnMessageText"">
And replace with;
strToolTip = RemoveForumCode(RemoveHTML(Topic_Message))
if RTrim(Len(strToolTip)) > 500 then
	strToolTip = Left(strToolTip, 500) & "..."
end if		
Response.Write	"<span class=""spnMessageText""><a href=""topic.asp?TOPIC_ID=" & Topic_ID & """><acronym title=""" & ChkString(strToolTip, "tooltip") & """>" & ChkString(Topic_Subject,"title") & "</acronym></a></span> </font>" & vbNewLine

Note; my call to ChkString on strToolTip comes after I have limited its length to 500 because I replace certain characters like ' and " with #39; and #34; respectively (rather than remove them).
fString = Replace(fString, """", "#34;")
fString = Replace(fString, "'", "#39;")
So I must then ensure I don't cut these terms in half when the string is truncated.

Think that's it, works for me.

Edited by - Brett Alcock on 07 December 2002 09:48:52
Go to Top of Page

mortioli
Average Member

United Kingdom
898 Posts

Posted - 04 December 2002 :  16:28:53  Show Profile  Visit mortioli's Homepage  Send mortioli an AOL message  Send mortioli a Yahoo! Message
Cheers

Is there anyway of changing the tooltip colour, by any chance?
Go to Top of Page

StephenD
Senior Member

Australia
1044 Posts

Posted - 04 December 2002 :  17:24:29  Show Profile  Send StephenD a Yahoo! Message
I made these changes and I get the tooltip box come up on active.asp but it is empty .. not grabbing any message test.
Go to Top of Page

StephenD
Senior Member

Australia
1044 Posts

Posted - 04 December 2002 :  18:02:08  Show Profile  Send StephenD a Yahoo! Message
Nearly got it by inserting..
		Topic_Message = allActiveTopics(fT_MESSAGE, iTopic)


@ line 460 between Topic_Subject & Topic_Author.

Only it shows the same tooltip message for all the active topics.

Edited by - StephenD on 04 December 2002 18:04:42
Go to Top of Page

Brett Alcock
New Member

65 Posts

Posted - 05 December 2002 :  12:56:12  Show Profile
Sorry my mistake, I missed out the following, have adjusted original posting accordingly.

Around line 479 change this:
		Topic_Subject = allActiveTopics(fT_SUBJECT,RowCount)
		Topic_Author = allActiveTopics(fT_AUTHOR,RowCount)
to this:
		Topic_Subject = allActiveTopics(fT_SUBJECT,RowCount)
		Topic_Message = allActiveTopics(fT_MESSAGE,RowCount)
		Topic_Author = allActiveTopics(fT_AUTHOR,RowCount)
Hope that helps.
Go to Top of Page

StephenD
Senior Member

Australia
1044 Posts

Posted - 05 December 2002 :  16:09:48  Show Profile  Send StephenD a Yahoo! Message
Excellent, thanks Brett.
Go to Top of Page

user_99
Starting Member

Austria
10 Posts

Posted - 08 December 2002 :  08:44:26  Show Profile
... works perfekt!

thy
Go to Top of Page

mortioli
Average Member

United Kingdom
898 Posts

Posted - 13 December 2002 :  15:56:24  Show Profile  Visit mortioli's Homepage  Send mortioli an AOL message  Send mortioli a Yahoo! Message
My active.asp page fell apart when I got to many Active Topics!

I undid the above changes, and it was ok again.

Maybe somethings up with code !?
Go to Top of Page

8minus1
Starting Member

USA
11 Posts

Posted - 24 December 2002 :  13:16:04  Show Profile  Visit 8minus1's Homepage
i have found out that if the topic has html or ubb code that if totaly screws up the subject and does not display with mouse over. I have no clue how to fix it just wanted to let all know.
Go to Top of Page

Dave.
Senior Member

USA
1037 Posts

Posted - 24 December 2002 :  15:40:58  Show Profile
I just get "0" what did I do wrong?
Go to Top of Page

Brett Alcock
New Member

65 Posts

Posted - 26 December 2002 :  14:02:49  Show Profile
quote:
Originally posted by 8minus1

i have found out that if the topic has html or ubb code that if totaly screws up the subject and does not display with mouse over. I have no clue how to fix it just wanted to let all know.

Ez4arab is probably the best person to answer this but it sounds to me as if you should look at the functions RemoveHTML and RemoveForumCode (specific to this mod) ensure that they are filtering out the offending html/ubb from your subject string, then also look at ChkString which appears to be used widely to avoid such problems.

This may not help at all but I noticed in the original mod by Ez4arab that there was a bit of code in inc_func_common.asp that does nothing (just after the definition of RemoveHTML):
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
I believe this was supposed to go in the ChkString function so I put it (or something similar) as a last case in it's select statement:
		Case "tooltip"
			fString = Replace(fString, """", "#34;")
			fString = Replace(fString, "'", "#39;")
			chkString = fString

If you want to use the original code that will strip out carriage returns etc then it would look something like like this:
	Case "tooltip"
		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

Don't think it will fix your problem but worth a mention.

Personally I don't allow HTML in postings but I do allow forum code which seems to be stripped from the string ok.
Go to Top of Page

Brett Alcock
New Member

65 Posts

Posted - 26 December 2002 :  14:32:39  Show Profile
quote:
Originally posted by mortioli

My active.asp page fell apart when I got to many Active Topics!

I undid the above changes, and it was ok again.

Maybe somethings up with code !?

Certainly sounds like it, how many was too many? mine works fine with about 40 active topics (I am using MySQL), if your not sure play with 'Active Topics Since' to establish just where things give up. Note the active.asp mod should be no different to the forum.asp mod in this respect. Might also be worth limiting the length of the tooltip to a couple of characters to see if that makes any difference. Perhaps it is not to do with the number of topics but something in a particular posting, maybe 8minus1 and yourself have the same problem?
Go to Top of Page

skogizz
Starting Member

Sweden
25 Posts

Posted - 21 February 2003 :  06:56:14  Show Profile
Are there anyone that could help me with the code for this MOD with Snitz 3.3.03?

I have found this one
http://forum.snitz.com/forum/topic.asp?ARCHIVE=true&TOPIC_ID=23313#106567

But I don't wanna use some javascript or so just "acronym title" to let the users read 150-200 chr. of the topic.
Go to Top of Page

Locnar
New Member

89 Posts

Posted - 05 July 2003 :  15:42:57  Show Profile  Visit Locnar's Homepage
EZ4arab: I cannot seem to get this mod working for my active.asp page. Nothing shows up in the hover box and it also disables another mod I have there that shows when the thread was begun. I've tried jacking with the code every-which way, but I cannot get it to work.

Here is my active.asp in text format if you care to take a look.

active.txt

Thanks!!

Locnar
Just your basic forums ---> www.duncanet.com/forums
Star Wars Galaxies ---> www.duncanet.com/forum/sitenews.asp
Go to Top of Page

eauxvives
Junior Member

Bhutan
145 Posts

Posted - 19 July 2003 :  05:33:43  Show Profile
works great for me! and my users are really happy about this addition
Now what would me them even happier and would be extremely useful would be to do the same for the 'jump to last post' link...
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Previous Page | 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.24 seconds. Powered By: Snitz Forums 2000 Version 3.4.07