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/O Code)
 editing "sub TopicPaging()" ?
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

filo_2k
Starting Member

Italy
37 Posts

Posted - 25 December 2003 :  10:46:14  Show Profile  Visit filo_2k's Homepage
i'm looking for a mod that change the funcion TopicPaging() in forum.asp

i'd like to have something like this:
1 2 3 4 ... 14 15 16 17
instead of
1 2 3 4 5 6 7 8 9 10
11 12 13 15 16 17


anyone has done it or know where this can be found?

filo_2k
Admin @ FastWeb-Italia-NetworK
http://www.fin2k.net

dayve
Forum Moderator

USA
5820 Posts

Posted - 25 December 2003 :  17:01:44  Show Profile  Visit dayve's Homepage
I have this mod installed at my forum, not sure where it is, but I know it exists here. Try fishing through the MOD W/Code section.

Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 25 December 2003 :  17:36:03  Show Profile  Visit dayve's Homepage
this is the function you will need for forum.asp


Function DoLastPostLinkText()
	if Topic_Replies < 1 or Topic_LastPostReplyID = 0 then
		DoLastPostLinkText = "<a href=""topic.asp?" & ArchiveLink & "TOPIC_ID=" & Topic_ID & """>..Last #187;</a>"
	elseif Topic_LastPostReplyID <> 0 then
		PageLink = "whichpage=-1&"
		AnchorLink = "&REPLY_ID="
		DoLastPostLinkText = "<a href=""topic.asp?" & ArchiveLink & PageLink & "TOPIC_ID=" & Topic_ID & AnchorLink & Topic_LastPostReplyID & """>..Last #187;</a>"
	else
		DoLastPostLinkText = ""
	end if
end function


and this..

sub TopicPaging2()
	page_limit  = 5
	first_pages  = 5
	last_pages = 0
	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=""" & strFooterFontSize & """>" & getCurrentIcon(strIconPosticon,"","") & "</font></td>" & vbNewLine)
                if mxpages > page_limit then
                        ref = "                      <td align=""left"" valign=""bottom"" bgcolor=""" & strForumCellColor  & """><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>" 
  			ref = ref & " Pages ("& mxpages & "): </font></td>" 
  			for counter = 1 to first_pages
  			  ref = ref & "<td align=""right"" valign=""bottom"" bgcolor=""" & strForumCellColor  & """><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>" 
                          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>"  			  
                       next
                        ref = ref & "<td align=""left"" valign=""bottom"" bgcolor=""" & strForumCellColor  & """><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>" 
  			ref = ref & "</font></td>" 
                       if last_pages = 0 then
			  
			  ref = ref & "<td align=""left"" valign=""bottom"" bgcolor=""" & strForumCellColor  & """><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>" 
			  ref = ref & widenum(counter) & "<span class=""spnMessageText"">"
			  ref = ref & DoLastPostLinkText()
			  ref = ref & "</span></font></td>"
  			  'ref = ref & "<td align=""left"" valign=""bottom"" bgcolor=""" & strForumCellColor  & """><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>" 
              'ref = ref & widenum(counter) & "<span class=""spnMessageText""> <a href=""topic.asp?"
			  'ref = ref & ArchiveLink
		      'ref = ref & "TOPIC_ID=" & Topic_ID
			  'ref = ref & "&whichpage=" & mxpages
			  'ref = ref & """>..Last »</a></span></font></td>"                            
  		       else
                          for counter = (mxpages-last_pages+1) to mxpages
  			    ref = ref & "                      <td align=""left"" valign=""bottom"" bgcolor=""" & strForumCellColor  & """><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>" 
                            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>"  			  
                          next		       
        	        end if
			Response.Write ref & vbNewLine
              else
		for counter = 1 to mxpages
			ref = "                      <td align=""right"" valign=""bottom"" 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) & "<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
		next				
              end if
        Response.Write("                    </tr>" & vbNewLine)
        Response.Write("                  </table>" & vbNewLine)
	end if
end sub


and then search for this:


		if strShowPaging = "1" then 
			Call TopicPaging() 
		end if


and replace it with this:

		if strShowPaging = "1" then 
			Call TopicPaging2() 
		end if



Go to Top of Page

filo_2k
Starting Member

Italy
37 Posts

Posted - 25 December 2003 :  18:06:34  Show Profile  Visit filo_2k's Homepage
thank you very much
i did also a little change... now my sub looks like this (does exatly what i requested at the top)


sub TopicPaging()
	page_limit  = 8
	first_pages  = 4
	last_pages = 4
	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=""" & strFooterFontSize & """>" & getCurrentIcon(strIconPosticon,"","") & "</font></td>" & vbNewLine)
                if mxpages > page_limit then
                        ref = "                      <td align=""left"" valign=""bottom"" bgcolor=""" & strForumCellColor  & """><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>" 
  			ref = ref & "</font></td>" 
  			for counter = 1 to first_pages
  			  ref = ref & "<td align=""right"" valign=""bottom"" bgcolor=""" & strForumCellColor  & """><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>" 
                          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>"  			  
                       next
                        ref = ref & "<td align=""left"" valign=""bottom"" bgcolor=""" & strForumCellColor  & """><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>" 
  			ref = ref & "</font></td>" 
  		       
  		         ref = ref & "<td align=""left"" valign=""bottom"" bgcolor=""" & strForumCellColor  & """><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>  . . .</font></td>"
  
                          for counter = (mxpages-last_pages+1) to mxpages
  			    ref = ref & "                      <td align=""left"" valign=""bottom"" bgcolor=""" & strForumCellColor  & """><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>" 
                            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>"  			  
                          next	
                          	       
        	 ref = ref & "<td align=""left"" valign=""bottom"" bgcolor=""" & strForumCellColor  & """><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>" 
			  ref = ref & widenum(counter) & "<span class=""spnMessageText""> "
			  ref = ref & DoLastPostLinkText()
			  ref = ref & "</span></font></td>"
			  
			Response.Write ref & vbNewLine
              else
		for counter = 1 to mxpages
			ref = "                      <td align=""right"" valign=""bottom"" 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) & "<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
		next	
				ref = "<td align=""left"" valign=""bottom"" bgcolor=""" & strForumCellColor  & """><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>" 
			  ref = ref & widenum(counter) & "<span class=""spnMessageText"">"
			  ref = ref & DoLastPostLinkText()
			  ref = ref & "</span></font></td>"		
			  Response.Write ref	
              end if
        Response.Write("                    </tr>" & vbNewLine)
        Response.Write("                  </table>" & vbNewLine)
	end if
end sub

filo_2k
Admin @ FastWeb-Italia-NetworK
http://www.fin2k.net

Edited by - filo_2k on 25 December 2003 18:09:12
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 26 December 2003 :  01:31:07  Show Profile  Visit dayve's Homepage
yeah, I tweaked mine, glad you were able to use it. i can not remember the original
author so if someone remembers please post a link to the original code.


Edited by - dayve on 26 December 2003 01:31:26
Go to Top of Page

wii
Free ASP Hosts Moderator

Denmark
2632 Posts

Posted - 26 December 2003 :  07:54:50  Show Profile
http://www.onewaymule.org/onewayscripts/forums/topic.asp?TOPIC_ID=30
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 26 December 2003 :  12:53:26  Show Profile  Visit dayve's Homepage
thanks wii.

Go to Top of Page

wii
Free ASP Hosts Moderator

Denmark
2632 Posts

Posted - 26 December 2003 :  14:38:31  Show Profile
No problem, I knew exactly where it is, since I´ve used this miniMOD for a long time.
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.3 seconds. Powered By: Snitz Forums 2000 Version 3.4.07