News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Page Dropdown

Started by SoLoGHoST, July 27, 2009, 08:55:14 AM

Previous topic - Next topic

SoLoGHoST

Page Dropdown





Written by: Arantor (my other mods)   Current version: 1.3
Thanks to: Cleo, tech ideasUpdates: Arantor's Developments
Suitable for: 1.1.10, 2.0 RC1.2, 2.0 RC2Supported languages: ALL languages

Link to Mod | Mod support topic | Mod bugtracker | Donate





Summary

This mod adds a small drop-down next to the page list, so as well as clicking on the links to step through pages, you can have a quick dropdown to jump to any page and your current page is always highlighted.

Installation

Package Manager should work in most cases. If you need to make any edits, it will be limited to Subs.php - no theme changes are necessary.

Useful links
Manual Installation Of Mods
How Do I Modify Files?

Support

Questions should be address to the mod support topic. Anything that is a bug or feature request can additionally be reported to the mod bugtracker.

Updating

Please uninstall version 1.0 or 1.1 before installing 1.2, which should fix all the known issues at this time. Version 1.2 will be required for RC2 use.

Changelog

1.3 - November 9, 2009
Bugfix for RC2 support for Public RC2.

1.2 - October 26, 2009
Added RC2 support.

1.1 - August 4, 2009
Updated to 1.1 to fix two major bugs (dropdown at bottom of page not working and dropdown not working on all pages)

1.0 - July 26, 2009
First release

beta - July 24, 2009
First version added to the SMF Mod site

Files modified by Page Dropdown

Sources/Subs.php (where the dropdown is made)

SoLoGHoST

Nice MOD, though why not just give an option in the Admin Panel to choose between Page Drop Down and Page Links instead of having both of them?  Just a thought.

Blinker

Neat little mod, installed flawlessly on a very heavily modded & custom-themed 1.1.10. I like it, thanks Arantor! :)

Marcus Forsberg

Good job on this, Arantor!

JBlaze

Jason Clemons
Former Team Member 2009 - 2012

Özgür

Great Mod Arantor simple and useful as like as smf =)
So Long

Arantor

Quote from: SoLoGHoST on July 27, 2009, 09:11:45 AM
Nice MOD, though why not just give an option in the Admin Panel to choose between Page Drop Down and Page Links instead of having both of them?  Just a thought.

Interesting idea. I hadn't thought of that.

That said, for users who don't have JS available, they would be unable to page through if the admin were to only have the drop down, so there's an accessibility argument for not doing that. It's something I can review for a future version though, thanks!

And thanks to everyone else! I tried to make this in a way that wouldn't affect any theme; it's a mod only to Subs.php, so it should appear on just about every theme.
Holder of controversial views, all of which my own.


MaXiForum.cz


SoLoGHoST

Quote from: Arantor on July 27, 2009, 10:12:21 AM

Interesting idea. I hadn't thought of that.

That said, for users who don't have JS available, they would be unable to page through if the admin were to only have the drop down, so there's an accessibility argument for not doing that. It's something I can review for a future version though, thanks!
Well, if you place a GO Button next to it, problem solved :)

Arantor

You'd be surprised how much extra work that might actually generate - but again I thank you for the suggestion and will consider it in the next version.
Holder of controversial views, all of which my own.


SoLoGHoST

Quote from: Arantor on July 27, 2009, 11:29:59 AM
You'd be surprised how much extra work that might actually generate - but again I thank you for the suggestion and will consider it in the next version.
I am well aware of the work that would be needed to accomplish this.  An easier way would be to just look at how the JumpTo Box does this.

In any case, Thanks and a very nice MOD indeed :)

Arantor

Whoa, that's a LOT of Javascript right there (compared to the one line I'm using!). It should be doable without needing that much JS but we'll see. I have a few other things in the pot right now that will come ahead of upgrading this, but I should get to it soon enough.
Holder of controversial views, all of which my own.


LHW

We've got nearly 40 Mods installed on our board, and this one installed without a hitch.  Nice job!


SoLoGHoST

First, let me just say that I hope I am not disrupting your Support Area for this MOD with my topics.  If this is the case, I sincerely apologize and will dismiss myself from it now.  As this is not my intention.

With that being said, Very little to no Javascript would even be needed, maybe just to check if JS is enabled or not.  Haven't checked to see how you have coded the select box with option tags in it.  But it would seem that it is a form and the form has an action that gets sent everytime an option is changed.  So, this being the case, I would then assume that each option tag has a value, so if this is the case all that needs to be done is when the "GO" button is clicked on, submit the form, and whereever it get's submitted to, check the selectbox name for a value, and any other hidden values that may be needed (for example topic id, board id, etc.) have those value's get passed and redirectexit to the page it requested in that topic, and TADA.  Basically, will set the start, limit values accordingly in this function.

Well, I believe I have wore out my welcome in here.  Just wanted to give you an idea on how to do this, though, you are probably already aware of this.

Solomon

Afro

Nice and simple. Welldone

Is there a way to remove other pages ...
I mean the initial 1,2,3.....

and allow everything to be on the dropdown..

Arantor

Adding a Go button is not actually as simple as it sounds, especially without using Javascript - SoLoGHoST, you refer to the Jump To code but seriously that's far more code than mine; yes, it is built using a <select> and an <option> but you still have to provide all the other handling and essentially build the URL which is potentially complex to do like that.

I will however look into it.

Please note this mod is for 'Support and Comments' and all comments are welcome.

I will probably provide an option in a future version however I suspect it will be for 2.0 only in future.
Holder of controversial views, all of which my own.



Arantor

Considering that this mod applies to every single instance of the Page counter throughout SMF, it is no small matter at all to have it submit the form. Nor is it a small matter to ensure it actually generates the appropriate URL reference information - in fact to do so cleanly would take a fairly large amount of code since it has to be modified in a number of places. Thus, a non-JS Go button is unlikely to appear before long. (Please do feel free to correct me however note that I may or may not apply the changes depending on whether they interact with a theme or not)

As for removing the options, this will only be supported for 2.0. Is this something people would want? I will not provide a 1.1 compliant version with any options in it.
Holder of controversial views, all of which my own.


babjusi

Nice work again Arantor. Keep it up :)

Joe N

Microsoft: "We Need to Imagine Life Without Walls."
I Say: "If There are No Walls Who needs Windows."



My Mods (6) All My Mods Updated To SMF 2.0 RC2 and SMF 1.1.10!


Advertisement: