Author |
Topic |
work mule
Senior Member
USA
1358 Posts |
Posted - 16 May 2001 : 04:33:49
|
TOPIC SORTING & ALTERNATE PAGING STYLE
MOD updated May 28, 2001 The download file now includes a file with instructions on how to implement only the topic sorting mod.
MOD updated May 27, 2001 The update was to the topic sort portion at the bottom of the main table at forum.asp. The individual cells were removed and the days select list was shortened to allow for a smaller table and for better wrapping.
MOD updated May 25, 2001 The update now includes the topic sorting code with improvements to the paging code that was originally released here.
DEMO: Forum.asp - Topic Sorting & Paging Topic.asp - Paging Members.asp - Paging
DOWNLOAD: http://www.scalemodelernetwork.com/downloads/snitz/newpagingmod.zip
my original post:
Want something different than the long list of numbers or a simple dropdown/listbox? If you said yes, you might want to look at this once.
About a week ago, I saw a post in regards to the Jedi Council Forums. There was a question about if Snitz could handle a forum that large. There were threads that were over 1,000 posts!
This particular topic I'm referencing has 3,791 replies! http://boards.theforce.net/message.asp?topic=1741104&page=3
Could you imagine what this would look like on Snitz? Eh, not too pretty.
So...looking at how they managed their paging, I went ahead and modified the Snitz paging sub to do a similiar thing. The installation of this requires switching out the old Paging() sub with this revised version and adding a Javascript function to inc_top.asp. Easy enough.
DEMO: -- for demos scroll down four posts --
DOWNLOAD:
http://www.scalemodelernetwork.com/downloads/snitz/alternatepaging.zip
I don't have a Snitz demo for this yet. Part of the reason is that my production Snitz forum doesn't have enough topics to demo this with. Nonetheless...you'll have to trust me, it worked on my development version.
One note is that the select box only appears if there are more than 10 pages, otherwise the numbers only display. It functions exactly how the other forum's does.
I'm thinking also that if the querystring was passed to the sub, then this could probably become a generic enough sub that it could exist in the inc_functions.asp file and be used for forums, topics, members and whatever else.
Well anyways, take a look and let me know what you all think of it!
* YAWN!! *
"Do not go where the path may lead, go instead where there is no path and leave a trail." -Ralph Waldo Emerson
Edited by - work mule on 25 May 2001 02:25:21
Edited by - work mule on 27 May 2001 05:29:37
Edited by - work mule on 28 May 2001 10:35:23 |
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 16 May 2001 : 05:34:58
|
work_mule, the next release of Snitz using a dropdown box to replace the paging above the forum, and the bottom one has been expanded to cover more of the witdth so it doesn't look as bad.
|
|
|
work mule
Senior Member
USA
1358 Posts |
Posted - 16 May 2001 : 10:34:43
|
Is it similiar to what I have on my members page? http://www.writermag.com/forum/members.asp
If so, I think there's a better way. After putting in that dropdown box and using it, I didn't care for it as much as I thought I would.
"Do not go where the path may lead, go instead where there is no path and leave a trail." -Ralph Waldo Emerson
Edited by - work mule on 25 May 2001 02:22:22 |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 16 May 2001 : 11:05:38
|
similar yes, what didn't you like about it ?
|
|
|
work mule
Senior Member
USA
1358 Posts |
Posted - 16 May 2001 : 12:07:18
|
Okay, maybe a demo will help here...
Everyone is familiar with the current paging method - no demo required.
For the two demos here, I set the Paging size to 1 on the page to show the extreme.
DROP DOWN METHOD An alternative that was discussed was doing it with a drop down instead. I don't know what's planned here, but here's how I had implemented a drop down: http://www.writermag.com/forum/members_wdropdown.asp
Personally, I didn't care for it because I found myself wanting to be able to click on the numbers like the old way.
THIS MOD's PAGING METHOD The following is a demo for what the paging method that's available with this mod: http://www.writermag.com/forum/members_demo.asp
A couple of notes is that the list box starts with 1 and ends with the maxpage value, but inbetween, it only lists every 5 pages. Next to the box, is a list of 10 pages (if there are more than 10).
The demo's here are coded as a generic sub where I'm passing in the querystring except for the whichpage value which is determined in the sub and combined with scriptname and the querystring:
<a href=""" & scriptname & "?whichpage=" & pge & QS & """>
CURRENT IMPLEMENTATION ON A PRODUCTION SITE http://www.writermag.com/forum/members.asp
"Do not go where the path may lead, go instead where there is no path and leave a trail." -Ralph Waldo Emerson |
|
|
SPulley
Starting Member
USA
46 Posts |
Posted - 16 May 2001 : 14:09:04
|
I like this mod ALOT however, is there a way to take it down to 5 pages shown and not 10?
Have fun and be good!!
Shad Pulley shadstrains@mylargescale.com www.mylargescale.com/forum
Edited by - spulley on 16 May 2001 14:20:34 |
|
|
work mule
Senior Member
USA
1358 Posts |
Posted - 16 May 2001 : 14:41:39
|
Hmm...didn't think about that one. Yes, that would be simple enough.
I could tell you where to make that change.
Find this code:
dim pgelow, pgehigh
if maxpages > 10 then pgelow = pge - 4 pgehigh = pge + 5 if pgelow < 1 then pgelow = 1 pgehigh = pgelow + 9 end if if pgehigh > maxpages then pgehigh = maxpages pgelow = pgehigh - 9 end if else pgelow = 1 pgehigh = maxpages end if
...and replace or adjust the numbers.
dim pgelow, pgehigh
if maxpages > 5 then pgelow = pge - 2 pgehigh = pge + 2 if pgelow < 1 then pgelow = 1 pgehigh = pgelow + 4 end if if pgehigh > maxpages then pgehigh = maxpages pgelow = pgehigh - 4 end if else pgelow = 1 pgehigh = maxpages end if
That should do the trick! (Let me know if it doesn't.)
In the future, this is something that could be adjusted automatically be passing in a variable so that it could be unique to whatever area you're calling it from.
There are a couple of tweaks that I would like to add to this. It is possible to make this a generic enough sub that could be used to page the members page, forum page, topics page and probably whatever else requires paging. This would reduce/eliminate the custom coding for each area and utilize one common routine. I'm just waiting for feedback before I go that far.
"Do not go where the path may lead, go instead where there is no path and leave a trail." -Ralph Waldo Emerson |
|
|
SPulley
Starting Member
USA
46 Posts |
Posted - 16 May 2001 : 15:25:31
|
I've got it working on the members.asp page. It's looking good.. Thanks for the code to make it smaller. It looks better on my pages now. I'll post a link to my test site when it's ready.
Have fun and be good!!
Shad Pulley shadstrains@mylargescale.com www.mylargescale.com/forum |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 16 May 2001 : 15:47:28
|
Very nice work_mule I like the idea.
|
|
|
work mule
Senior Member
USA
1358 Posts |
Posted - 16 May 2001 : 15:51:44
|
quote:
I've got it working on the members.asp page. It's looking good.. Thanks for the code to make it smaller. It looks better on my pages now. I'll post a link to my test site when it's ready.
That's good to hear! I'd love to see how it looks on another site besides mine.
"Do not go where the path may lead, go instead where there is no path and leave a trail." -Ralph Waldo Emerson |
|
|
RichardKinser
Snitz Forums Admin
USA
16655 Posts |
Posted - 16 May 2001 : 19:25:24
|
quote: work_mule, the next release of Snitz using a dropdown box to replace the paging above the forum, and the bottom one has been expanded to cover more of the witdth so it doesn't look as bad.
Why is it not going to use dropdowns for both? That is the way I think it should be at least. |
|
|
SPulley
Starting Member
USA
46 Posts |
|
work mule
Senior Member
USA
1358 Posts |
Posted - 18 May 2001 : 10:24:00
|
SPulley,
Wow, it looks very nice!!
I've been thinking about the arrows versus the words. Now that I see your version, I think I like it better. I have a new version that seems to work out okay. It's customizeable in that by setting a parameter, it'll take care of the calculations to display the right set of numbers. Plus it's generic enough that it's useable practically everywhere. I had to make a tweak for the polls mod tho'.
I didn't want to release the updated version yet. I want to sit and think about it for a minute...live with it for a day or so. I just worked on it yesterday along with the small tweak you'll see at the bottom of the topic table here: http://www.writermag.com/forum/forum.asp?FORUM_ID=9&CAT_ID=4
It would be nice if I could release them at the same time.
"Do not go where the path may lead, go instead where there is no path and leave a trail." -Ralph Waldo Emerson |
|
|
RiSC
Starting Member
9 Posts |
Posted - 19 May 2001 : 06:37:23
|
I cant get the Next Page/Previous Page part to work. It is displayed in the browser, but there is no link attached, just plain text.
|
|
|
work mule
Senior Member
USA
1358 Posts |
Posted - 19 May 2001 : 12:50:25
|
Hi RiSC,
I have an updated version of this mod. There are a couple of improvements that I made to it. I'm going to release the update combined with another modification that I recently did because they are/can be intertwined with each other.
For an example of the other mod, follow the url and look at the bottom of the topics table. It allows the user to sort topics by date, title, etc.
http://www.writermag.com/forum/forum.asp?FORUM_ID=9&CAT_ID=4
I have to work on integrating that mod into the standard release of the Snitz forums and then I'll release the code and instructions. It should be fairly easy, but I won't have much time to work on this over the weekend. So please be patient.
"Do not go where the path may lead, go instead where there is no path and leave a trail." -Ralph Waldo Emerson |
|
|
RiSC
Starting Member
9 Posts |
Posted - 23 May 2001 : 08:03:41
|
Ok then...
is there a way i can fix the situation im in? also...the numbers just keep going up as well!
|
|
|
Topic |
|