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)
 Paging For forum.asp
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 3

animedj
Junior Member

USA
190 Posts

Posted - 06 August 2000 :  22:42:59  Show Profile  Visit animedj's Homepage  Send animedj an ICQ Message
Geez, if i had so much free time this weekend. Anyways, another add-on. This will show the paging from the forums.asp (not in the topics.asp) so one can click right away in other pages without need to go to read old messages first. As always Suggestions, bugs, fixes are welcome.

D/L : http://animedj.com/community/forums/hacks/paging.zip

Demo : http://www.animedj.com/community/forums/FORUM.asp?FORUM_ID=4&CAT_ID=4

smiddy
New Member

USA
81 Posts

Posted - 07 August 2000 :  00:30:19  Show Profile  Send smiddy an AOL message  Send smiddy an ICQ Message  Send smiddy a Yahoo! Message
I like it... As long as you are table-ing the paging to make sure it stays within the bounderies and is aesthetically pleasing...<img src=icon_smile_big.gif border=0 align=middle>



<div align=right>-smiddy,
Hey, BEER Me!</div id=right>


Edited by - smiddy on 07 August 2000 00:30:57
Go to Top of Page

Lord Maverick
New Member

Norway
92 Posts

Posted - 07 August 2000 :  04:12:50  Show Profile  Send Lord Maverick an ICQ Message
Animedj,

I cant find the section in forum.asp (approximately line 217) that you are referring to in your txt-file. However I find this section:

<td bgcolor="<% =strForumCellColor %>" valign="top" align="left"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href="topic.asp?TOPIC_ID=<% =rs("TOPIC_ID") %>&FORUM_ID=<% =Request.QueryString("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Topic_Title=<% =ChkString(left(rs("T_SUBJECT"), 50),"urlpath") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>"><% =ChkString(left(rs("T_SUBJECT"), 50),"display") %></a>&nbsp;</font></td>

Are we talking about the same section to replace. How come your section is different?

Go to Top of Page

slemieux
Junior Member

USA
234 Posts

Posted - 07 August 2000 :  04:54:36  Show Profile
Great Job!

Lord Maverick I think there is a small bit missing in the change. It should look like:

<pre id=code><font face=courier size=2 id=code><td bgcolor="<% =strForumCellColor %>" valign="top" align="left"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href="topic.asp?TOPIC_ID=<% =rs("TOPIC_ID") %>&FORUM_ID=<% =Request.QueryString("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Topic_Title=<% =ChkString(left(rs("T_SUBJECT"), 50),"urlpath") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>"><% =ChkString(left(rs("T_SUBJECT"), 50),"display") %></a>&nbsp;</font><%= pages() %></td></font id=code></pre id=code>

or just add <%= pages() %> at the end of that line before </td>

Go to Top of Page

blkrogue
New Member

USA
79 Posts

Posted - 07 August 2000 :  06:21:23  Show Profile
Have added this to my test forum and now when I add a reply to an old topic, the pages() function adds 7 pages to a topic, even if it only has 3 posts in it.

Any ideas why this one is in there (haven't had time yet to check out the function)


Blkrogue

In the darkness of my soul a sparkling light has appeared
Go to Top of Page

Lord Maverick
New Member

Norway
92 Posts

Posted - 07 August 2000 :  07:03:42  Show Profile  Send Lord Maverick an ICQ Message
Thanks Slemieux, I agree!

Actually I was only referring to the difference in the txt-file that comes with the dwnl from animedj to what the actual coding looks like in Snitz v3-final. The only small thing that should be done then is to correct the code shown in animedj's text file that comes with the dwnl.

BTW, great addition to the forum. Keep up the good work, animedj! I really like your member_profile.asp...


Go to Top of Page

blkrogue
New Member

USA
79 Posts

Posted - 07 August 2000 :  07:27:58  Show Profile
The function used in the asp-file to round of the mxPages to a round number isn't correct, better to use CInt + 1 then the Left function as with 0.6666666 it can be retranslated to 6.666666 E 02 which gives an mxPage of 7 with the Left option and a CInt(myPage) + 1 does give you the correct number 1.

Now I'm gonna add it to the active.asp page so will be back to give the place where to put the code in a while


Blkrogue

In the darkness of my soul a sparkling light has appeared
Go to Top of Page

pier
Starting Member

Italy
22 Posts

Posted - 07 August 2000 :  08:55:14  Show Profile  Visit pier's Homepage  Send pier an AOL message  Send pier an ICQ Message
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
The function used in the asp-file to round of the mxPages to a round number isn't correct, better to use CInt + 1 then the Left function as with 0.6666666 it can be retranslated to 6.666666 E 02 which gives an mxPage of 7 with the Left option and a CInt(myPage) + 1 does give you the correct number 1.

Now I'm gonna add it to the active.asp page so will be back to give the place where to put the code in a while


Blkrogue

In the darkness of my soul a sparkling light has appeared
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

I replaced

mxpages = left(mxPages, inst(mxpages, "."))

with

mxpages = Fix(mxPages) + 1


Ciao,
Pier

Go to Top of Page

animedj
Junior Member

USA
190 Posts

Posted - 07 August 2000 :  09:06:57  Show Profile  Visit animedj's Homepage  Send animedj an ICQ Message
Thanks slemieux. As I said I'm not good doing documentation and I ususally have to write 2 version of the file as my forum is heavily hacked. Now about the cint + 1. Let's suppose that your paging it's 10 pages and i got 15 replies so the cint + 1 would give 3 but it should be 2 ( cint(1.5) = 2 ) that's why i had a problem with number major than .5 . But now i got a better way to do the paging. replace the line :

mxpages = left(mxPages, instr(mxpages, ".")) + 1

with:

mxpages = int(mxpages) + 1

Hope that helps.

Go to Top of Page

blkrogue
New Member

USA
79 Posts

Posted - 07 August 2000 :  09:43:02  Show Profile
Hmmm, gotta pay better attention to my postings in da morning .... of course I meant Int() not CInt() as the replacement function (though Fix() gives the same result, just as long as your result stays positive).

Thanks for the correction !


Blkrogue

In the darkness of my soul a sparkling light has appeared
Go to Top of Page

animedj
Junior Member

USA
190 Posts

Posted - 07 August 2000 :  10:10:29  Show Profile  Visit animedj's Homepage  Send animedj an ICQ Message
Hey slemieux!! There are some people emailing me about the extended profile that I have in my site. That was one of your hacks. Care to create a new topic posting the link to zip ???

Go to Top of Page

blkrogue
New Member

USA
79 Posts

Posted - 07 August 2000 :  10:19:39  Show Profile
Hey animedj I wanted to alter my code on active.asp to include the paging option there as well, but so far it's not just a matter of adding the same code as with the forum.asp page, seems the active.asp page is missing the mypagesize value (but that function can be added, however the query string requests made in paging.asp for FORUM_ID and CAT_ID aren't working from the active.asp, so guess this needs more hacking than expected *sigh*

Blkrogue

In the darkness of my soul a sparkling light has appeared
Go to Top of Page

animedj
Junior Member

USA
190 Posts

Posted - 07 August 2000 :  11:26:35  Show Profile  Visit animedj's Homepage  Send animedj an ICQ Message
Okay!! done.. I modified the add-on so now it supports active.asp as well. Just go and d/l the script again.

Go to Top of Page

slemieux
Junior Member

USA
234 Posts

Posted - 07 August 2000 :  16:16:27  Show Profile
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Hey slemieux!! There are some people emailing me about the extended profile that I have in my site. That was one of your hacks. Care to create a new topic posting the link to zip ???
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Sure thing! Let me find the zip and I'll post it!

Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 07 August 2000 :  23:22:51  Show Profile
What all needs to be modified to change the pagesize from 15 to 10 ?

Thanks! <img src=icon_smile.gif border=0 align=middle>

Go to Top of Page

Nathan L
New Member

USA
83 Posts

Posted - 08 August 2000 :  00:55:58  Show Profile  Send Nathan L an AOL message  Send Nathan L an ICQ Message  Send Nathan L a Yahoo! Message
Very nice, animedj, very nice!

Response.Write ("The Reign of Nice")
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Next Page
 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.6 seconds. Powered By: Snitz Forums 2000 Version 3.4.07