MOD Function: make it easier for your visitors, moderators and of course yourself to check more than one
topic at the same time by adding an icon to open the topics in a new window.
As seen on: FrutZle.com -=- Forums
Made by: FrutZle
Made on: July 10th 2002
Revised on: July 12th 2002 - added topic paging
Files to change: 1 (active.asp)
Number of changes: 6
Files needed:
Instructions: based on active.asp for version 3.3.05
Open active.asp and go to line 304:
else
Response.Write " </td>" & vbNewline
end if
Response.Write " <td align=""center"" bgcolor=""" & strHeadCellColor & """>" & vbNewline & _
" <b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>Topic</font></b>" & vbNewline & _
" </td>" & vbNewline & _
Change that to this:
else
Response.Write " </td>" & vbNewline
end if
Response.Write " <td align=""center"" bgcolor=""" & strHeadCellColor & """> </td>" & vbNewline & _
" <td align=""center"" bgcolor=""" & strHeadCellColor & """>" & vbNewline & _
" <b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>Topic</font></b>" & vbNewline & _
" </td>" & vbNewline & _
Go to line 326:
if rs.EOF or rs.BOF then
Response.Write " <tr>" & vbNewline & _
" <td colspan=""7"" bgcolor=""" & strForumCellColor & """>" & vbNewline & _
Change the 7 to 8
Go to line 373
" <td height=""20"" colspan=""6"" bgcolor=""" & strCategoryCellColor & _
Change the 6 to 7
Go to line 427:
Response.Write " </td>" & vbNewline
Response.Write " <td bgcolor=""" & strForumCellColor & """ valign=""center"">" & vbNewline & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & _
"""><a href=""topic.asp?TOPIC_ID=" & Topic_ID & """>" & _
ChkString(left(Topic_Subject, 50),"display") & _
"</a> </font>" & vbNewline
Change it to this:
Response.Write " </td>" & vbNewline & _
" <td bgcolor=""" & strForumCellColor & """ valign=""center"" align=""center"">" & vbNewline & _
"<a href=""topic.asp?TOPIC_ID=" & Topic_ID & """ target=""_blank""><img src=""icon_newwin.gif"" width=""15"" height=""15""" & vbNewline & _
"border=""0"" alt=""Open Topic In A New Window"" title=""Open Topic In A New Window""></a>" & vbNewline
if strShowPaging = "1" then
newWindowTopicPaging()
end if
Response.Write " </td>" & vbNewline
Response.Write " <td bgcolor=""" & strForumCellColor & """ valign=""center"">" & vbNewline & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & _
"""><a href=""topic.asp?TOPIC_ID=" & Topic_ID & """>" & _
ChkString(left(Topic_Subject, 50),"display") & _
"</a> </font>" & vbNewline
Go to line 478:
" <td colspan=""6"" bgcolor=""" & strForumCellColor & """>" & vbNewline & _
Change the 6 to 7
Add the following to the very bottom of active.asp right before the %> :
sub newWindowTopicPaging()
mxpages = (Topic_Replies / strPageSize)
if mxPages <> cint(mxPages) then
mxpages = int(mxpages) + 1
end if
if mxpages > 1 then
Response.Write "<table border=0 cellspacing=0 cellpadding=0><tr><td valign=""center"">" & _
"<font face=" & strDefaultFontFace & " size=" & strFooterFontSize & ">" & _
"<img src=""images/icon_posticon.gif"" border=""0""></font></td>"
for counter = 1 to mxpages
ref = "<td align=right valign=""center"" bgcolor=" & strForumCellColor & ">" & _
"<font face=" & strDefaultFontFace & " size=" & strFooterFontSize & ">"
if ((mxpages > 9) and (mxpages > strPageNumberSize)) or _
((counter > 9) and (mxpages < strPageNumberSize)) then
ref = ref & " "
end if
ref = ref & widenum(counter) & "<a target=""_blank"" href='topic.asp?"
ref = ref & "TOPIC_ID=" & Topic_ID
ref = ref & "&whichpage=" & counter
ref = ref & "'>" & counter & "</a></font></td>"
Response.Write ref
if counter mod strPageNumberSize = 0 then
Response.Write("</tr><tr><td> </td>")
end if
next
Response.Write("</tr></table>")
end if
end sub
That ought to be it
I'm using this on my own forums but have that file changed quite a bit so I couldn't use that file to
get the changes. I think I've got everything, but if I haven't or if you have a problem, please post about
it in this forum and use a descriptive name as the subject for your topic.
<edit> Changed the topic subject because it was wrong... Teaches me to copy & paste from another topic </edit>
<edit> If you can't get it working and would like the file that already has the changes made, please reply to this topic so I know I won't be uploading it for no reason </edit>
<edit> This file, together with the image, a version of forum.asp with the same functionality and a readme file can now be downloaded from http://www.ls3k.com/snitz/mods.asp?action=details&ID=114
Please read the readme1st.txt file before you use the files!</edit>
Roland
http://www.frutzle.com
Snitz Exchange | Do's and Dont's
Edited by - FrutZle on 12 July 2002 13:23:27
Edited by - FrutZle on 12 July 2002 16:47:30