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)
 Mini MOD: open topics in new window (active.asp)
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Roland
Advanced Member

Netherlands
9335 Posts

Posted - 10 July 2002 :  16:04:49  Show Profile
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 " &nbsp;</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 " &nbsp;</td>" & vbNewline
end if
Response.Write " <td align=""center"" bgcolor=""" & strHeadCellColor & """>&nbsp;</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

Massimo
Junior Member

Italy
125 Posts

Posted - 10 July 2002 :  17:01:34  Show Profile  Visit Massimo's Homepage
modify:

<code removed>

Please do not post the entire contents of a file here, post a link to a text version of it instead

And as it clearly states in Frutzle's post, any questions or problems should be posted in the Help: MOD Implementation forum, NOT as a reply to this post

Thanks

Massimo Farieri
===============
http://www.superdeejay.net/
Go to Top of Page

Classicmotorcycling
Development Team Leader

Australia
2084 Posts

Posted - 12 July 2002 :  06:59:31  Show Profile
Roland,

Nice and easy mod to implement, thanks heaps. I was going to do this as it was a pain to hold the shift key and click on it or right click all the time. Good work...

Cheers,

David

P.S. Put it in at the forums at www.davidgreening.com
Go to Top of Page

Roland
Advanced Member

Netherlands
9335 Posts

Posted - 12 July 2002 :  07:25:42  Show Profile
Cool. I guess my "revision" of the codes in the original post helped and it's working. I'm glad you find it useful too


Roland

http://www.frutzle.com

Snitz Exchange | Do's and Dont's
Go to Top of Page

Roland
Advanced Member

Netherlands
9335 Posts

Posted - 12 July 2002 :  13:25:39  Show Profile
As per request, I added topic paging that opens the topic in a new window. The codes have changed a bit and it doesn't look as nice as it does without topic paging, but it's useful to have

Roland

http://www.frutzle.com

Snitz Exchange | Do's and Dont's
Go to Top of Page

Etymon
Advanced Member

United States
2385 Posts

Posted - 13 July 2002 :  12:49:33  Show Profile  Visit Etymon's Homepage
Nice MOD, Frutzle. Thanks!

I had to change the valign=""center" to valign=""middle""

valign (vertical align) values are top, middle, and bottom
align (horizontal align) values are left, center, and right

Also, in your first edit, I replaced the non-breaking space with the word Jump (for lack of better terminology ... I needed a short word).

Here is a screen-shot of what mine looks like now:



Thanks again for the great MOD. I multi-task with multiple windows, and this is just perfect for me!

Etymon


Edited by - Etymon on 13 July 2002 12:55:45
Go to Top of Page

Roland
Advanced Member

Netherlands
9335 Posts

Posted - 13 July 2002 :  13:18:07  Show Profile
quote:

Nice MOD, Frutzle. Thanks!

I had to change the valign=""center" to valign=""middle""

valign (vertical align) values are top, middle, and bottom
align (horizontal align) values are left, center, and right


Well, that's a problem in the Snitz base code, not bad coding from my side. I noticed that too but didn't bother fixing the problem to prevent inconsistant coding in that file. The alignment should actually be align="center" seeing that vertical alignment is, by default, in the middle

quote:

Also, in your first edit, I replaced the non-breaking space with the word Jump (for lack of better terminology ... I needed a short word).

Here is a screen-shot of what mine looks like now:



Thanks again for the great MOD. I multi-task with multiple windows, and this is just perfect for me!



I'm glad you like it.
I chose not to enter a name for the icon's column because of the alt and title tags that I added to the icons themselves, not to mention the little space and lack of decent wording that'll fit in there


Roland

http://www.frutzle.com

Snitz Exchange | Do's and Dont's
Go to Top of Page
  Previous Topic Topic Next Topic  
 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.33 seconds. Powered By: Snitz Forums 2000 Version 3.4.07