Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 Show only first five and last page of topic

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
kyodai Posted - 20 December 2009 : 08:39:48
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
1   L A T E S T    R E P L I E S    (Newest First)
Etymon Posted - 17 January 2010 : 09:16:37
Thank you kyodai for this MOD!

Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.07 seconds. Powered By: Snitz Forums 2000 Version 3.4.07