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)
 Show only first five and last page of topic
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

kyodai
New Member

Azerbaijan
74 Posts

Posted - 20 December 2009 :  08:39:48  Show Profile  Reply with Quote
Well now that some topics have reached over 50 pages on my forum it made it very irritating to have the numbers 1-50 all lined up under the topic title. After like 5 rows it started looking ridiculous so i decided to change it to look like

1 2 3 4 5 ... 51


it also places the "jump to last post" arrow above the page links.


Here is an example:



Here's the code i changed in Forum.asp


You must replace the whole TopicPaging() with my version.

Find the block that starts with:

sub TopicPaging()
mxpages = (Topic_Replies / strPageSize)
if mxPages <> cLng(mxPages) then


and ends with

end sub



Replace it with this:
-----------------------------------------------------------------




sub TopicPaging()
	mxpages = (Topic_Replies / strPageSize)
	if mxPages <> cLng(mxPages) then
		mxpages = int(mxpages) + 1
	end if
	if mxpages > 1 then
		Response.Write("                  <table border=""0"" cellspacing=""0"" cellpadding=""0"">" & vbNewLine)
		Response.Write("                    <tr>" & vbNewLine)
		Response.Write("                      <td valign=""bottom""><font face=""" & strDefaultFontFace & """ size=""" & "2" & """>" & getCurrentIcon(strIconPosticon,"","") & "</font></td>" & vbNewLine)
		for counter = 1 to mxpages
if counter < 6 then



			ref = "                      <td align=""right"" valign=""bottom"" bgcolor=""" & strForumCellColor  & """><font face=""" & strDefaultFontFace & """ size=""" & "2" & """>" 
			

			if ((mxpages > 9) and (mxpages > 9)) or ((counter > 9) and (mxpages < strPageNumberSize)) then
				ref = ref & " "
			end if		
			ref = ref & widenum(counter) & "<span class=""spnMessageText""><a href=""topic.asp?"
			ref = ref & ArchiveLink
		        ref = ref & "TOPIC_ID=" & Topic_ID
			ref = ref & "&whichpage=" & counter
			ref = ref & """>" & counter & "</a></span></font></td>"
			Response.Write ref & vbNewLine
			if counter mod strPageNumberSize = 0 and counter < mxpages then
				Response.Write("                    </tr>" & vbNewLine)
				Response.Write("                    <tr>" & vbNewLine)
				Response.Write("                      <td> </td>" & vbNewLine)
			end if
else
	if counter = 6 then
	
		PageLink = "whichpage=-1&"
		AnchorLink = "&REPLY_ID="
		Response.write("<a href=""topic.asp?" & ArchiveLink & PageLink & "TOPIC_ID=" & Topic_ID & AnchorLink 		& Topic_LastPostReplyID & """>" & getCurrentIcon(strIconLastpost,"Jump to Last Post","align=""absmiddle""") & "</a>")

		end if	
if counter = mxpages then
ref = "                      <td align=""right"" valign=""bottom"" bgcolor=""" & strForumCellColor  & """><font face=""" & strDefaultFontFace & """ size=""" & "2" & """>" 
			

			if ((mxpages > 9) and (mxpages > 9)) or ((counter > 9) and (mxpages < strPageNumberSize)) then
				ref = ref & " "
			end if		
			ref = ref & widenum(counter) & "<span class=""spnMessageText"">... <a href=""topic.asp?"
			ref = ref & ArchiveLink
		        ref = ref & "TOPIC_ID=" & Topic_ID
			ref = ref & "&whichpage=" & counter
			ref = ref & """>" & counter & "</a></span></font></td>"
			Response.Write ref & vbNewLine
			if counter mod strPageNumberSize = 0 and counter < mxpages then
				Response.Write("                    </tr>" & vbNewLine)
				Response.Write("                    <tr>" & vbNewLine)
				Response.Write("                      <td> </td>" & vbNewLine)
			end if
end if
end if		



next	
		
        Response.Write("                    </tr>" & vbNewLine)
        Response.Write("                  </table>" & vbNewLine)
	end if
end sub

Edited by - kyodai on 20 December 2009 08:49:32

Etymon
Advanced Member

United States
2385 Posts

Posted - 17 January 2010 :  09:16:37  Show Profile  Visit Etymon's Homepage  Reply with Quote
Thank you kyodai for this MOD!
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.11 seconds. Powered By: Snitz Forums 2000 Version 3.4.07