Author |
Topic |
Brett Alcock
New Member
65 Posts |
Posted - 04 December 2002 : 07:23:47
|
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 |
|
|
mortioli
Average Member
United Kingdom
898 Posts |
Posted - 04 December 2002 : 16:28:53
|
Cheers
Is there anyway of changing the tooltip colour, by any chance? |
|
|
StephenD
Senior Member
Australia
1044 Posts |
Posted - 04 December 2002 : 17:24:29
|
I made these changes and I get the tooltip box come up on active.asp but it is empty .. not grabbing any message test. |
|
|
StephenD
Senior Member
Australia
1044 Posts |
Posted - 04 December 2002 : 18:02:08
|
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 |
|
|
Brett Alcock
New Member
65 Posts |
Posted - 05 December 2002 : 12:56:12
|
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.
|
|
|
StephenD
Senior Member
Australia
1044 Posts |
Posted - 05 December 2002 : 16:09:48
|
Excellent, thanks Brett. |
|
|
user_99
Starting Member
Austria
10 Posts |
Posted - 08 December 2002 : 08:44:26
|
... works perfekt!
thy |
|
|
mortioli
Average Member
United Kingdom
898 Posts |
Posted - 13 December 2002 : 15:56:24
|
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 !? |
|
|
8minus1
Starting Member
USA
11 Posts |
Posted - 24 December 2002 : 13:16:04
|
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. |
|
|
Dave.
Senior Member
USA
1037 Posts |
Posted - 24 December 2002 : 15:40:58
|
I just get "0" what did I do wrong? |
|
|
Brett Alcock
New Member
65 Posts |
Posted - 26 December 2002 : 14:02:49
|
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. |
|
|
Brett Alcock
New Member
65 Posts |
Posted - 26 December 2002 : 14:32:39
|
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? |
|
|
skogizz
Starting Member
Sweden
25 Posts |
|
Locnar
New Member
89 Posts |
Posted - 05 July 2003 : 15:42:57
|
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
|
|
|
eauxvives
Junior Member
Bhutan
145 Posts |
Posted - 19 July 2003 : 05:33:43
|
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... |
|
|
Topic |
|