Page Dropdown
Written by: Arantor (http://www.simplemachines.org/community/index.php?action=profile;u=53626) (my other mods (http://custom.simplemachines.org/mods/index.php?action=profile;u=53626)) | Current version: 1.3 |
Thanks to: Cleo (http://www.atrinik.org/), tech ideas | Updates: Arantor's Developments (http://ara.ixos.org/) |
Suitable for: 1.1.10, 2.0 RC1.2, 2.0 RC2 | Supported languages: ALL languages |
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=2025) | Mod support topic (http://www.simplemachines.org/community/index.php?topic=326974.0) | Mod bugtracker (http://ara.ixos.org/index.php?project=2) | Donate (https://www.paypal.com/cgi-bin/webscr&cmd=_s-xclick&hosted_button_id=7164850)
SummaryThis 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.
InstallationPackage 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 linksManual Installation Of Mods (http://docs.simplemachines.org/index.php?topic=402)
How Do I Modify Files? (http://www.simplemachines.org/community/index.php?topic=24110.0)
SupportQuestions should be address to the mod support topic (http://www.simplemachines.org/community/index.php?topic=326974.0). Anything that is a bug or feature request can additionally be reported to the mod bugtracker (http://ara.ixos.org/index.php?project=2).
UpdatingPlease 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.
Changelog1.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 DropdownSources/Subs.php (where the dropdown is made)
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.
Neat little mod, installed flawlessly on a very heavily modded & custom-themed 1.1.10. I like it, thanks Arantor! :)
Good job on this, Arantor!
Great job, Arantor :)
Great Mod Arantor simple and useful as like as smf =)
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.
Thanks Arantor!!! :-)
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 :)
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.
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 :)
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.
We've got nearly 40 Mods installed on our board, and this one installed without a hitch. Nice job!
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
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..
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.
Thanks. :)
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.
Nice work again Arantor. Keep it up :)
Nice Mod. Good Job :)
Thanks............ Many People were not understand that there are more pages to read in thread.......... By this it's very clear to Newbie member or Guests..................
I have a problem :)
Dropdown worked fine in forum boards and topics. But not correctly work on other area.
Ex: memberlist, admin attachment list etc.
In memberlist : If you try to go any pages, you go to ./index.php?action=mlist;sort=real_name;start=
Number is missing. Is this known bug?
I can confirm that. The dropdown doesn't work for pages other than topic lists & boards. Just noticed today.
How odd. I never encountered that in any other page - thanks for the heads-up, I'll investigate now.
Quote from: [Daydreamer] on August 01, 2009, 12:37:02 AM
I have a problem :)
Dropdown worked fine in forum boards and topics. But not correctly work on other area.
Ex: memberlist, admin attachment list etc.
In memberlist : If you try to go any pages, you go to ./index.php?action=mlist;sort=real_name;start=
Number is missing. Is this known bug?
Same problem here too. For example, in the "Show the last post of the person" from profile, it shows the dropdown but doesn't jump to the page. It always return to the page 1.
Also, when in the forum, the dropdown menu doesn't jump on the bottom page link. The top one works.
Thanks for making this mod. It is useful.
Quote from: bbmtalk on August 01, 2009, 05:44:46 PM
Also, when in the forum, the dropdown menu doesn't jump on the bottom page link. The top one works.
I have this problem too.
Interesting since it's the exact same code in both cases.
I'm still looking at a fix to it that should sort all the issues out in one swoop.
Thanks for taking a look on this. I also checked using both IE and FF - same problem.
The root cause is actually more an inconsistency in SMF than anything else, that the same code can be called in different ways.
I should be able to get a fixed version up tomorrow :)
For what it's worth, neither the Top or the Bottom one seem to work on the "Recent Posts" page...in addition to the previously mentioned issues. We're running v1.1.10.
All these faults are actually the same problem as each other.
Resolution due shortly.
Updated to version 1.1 which should fix all these issues.
Great work Arantor, the update seems to have fixed the problem. I tested on a few instances of multiple pages (not counting topics or boards) and it worked fine.
Excellent :)
The update seems to fix the problems. Thank you very much for the update, Arantor.
This mod will please my members very much.
Thanks for the update! Seems to be working just fine now. ;D
great mod was looking for kind of this mod...
Just wanted to let everyone know here that Arantor has handed me this mod to support and update. First update I have in mind is the option to remove the pagination 1[2]3...456 links like these and have the page dropdown in there instead of those links. If you guys have any further ideas for improving this mod, please feel free to share them with me.
Cheers :)
Sounds like a good addition :)
Seem to recall you mentioning this a while ago...
Quote from: Arantor on November 13, 2009, 06:10:44 PM
Sounds like a good addition :)
Seem to recall you mentioning this a while ago...
lol, it's the 2nd post within this topic... hehe ;)
Thanks works great!
This modification works on RC4 fine :-)
Thank you.
Thanks for the reminder on this, updated package-info.xml for RC3, and RC4. Tested, and works on both just fine without any edits needed cept for package-info.xml.
Is it possible to only show this dropdown in topics and NOT on boards?
Jeroen.
Not without a lot more effort - both places call the same code.
Hmm bummer. Going to uninstall the mod because too many people find it anoying on the boardindex.
Jeroen.
Is this mod going to be updated to the newest versions of SMF?
Yeah, I will be working on updating all of my mods for the newest SMF (2.0.4) very shortly. Thanks for the reminder.
Quote from: SoLoGHoST on April 24, 2013, 09:19:14 AM
Yeah, I will be working on updating all of my mods for the newest SMF (2.0.4) very shortly. Thanks for the reminder.
That's awesome to hear. Thanks. :)
I bookmarked this thread for when the update arrives.
something new here?
Funny, it seems to work with just emulation, I'm not sure what update is required...
Quote from: Arantor on August 10, 2013, 07:08:27 PM
Funny, it seems to work with just emulation, I'm not sure what update is required...
I just updated the XML actually for my forum. Because emulation messed up one of my mods before.
Then you did it wrong.
Most likely, but I'm sometimes pretty lazy in hunting down my mistake then :P
So... emulate, do the install, revert the emulation, job done.