Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=497)
Expand PageIndex
Author: SMF Customization Team (http://www.simplemachines.org/community/index.php?action=profile;u=1) |
Supported Languages: English |
Link To Mod (http://custom.simplemachines.org/mods/index.php?mod=497) | Mod Discussion (http://www.simplemachines.org/community/index.php?topic=121219.0) | Other SMF Customization Team Mods (http://custom.simplemachines.org/mods/index.php?action=profile;u=1) |
Summary:This mod will expand all the pages when you click on the "..." in a page index. Example open a board in SMF and you will something like Pages: [1] 2 3 ... 20, click on ... and it will expand to show all the page numbers.
Note: This mod makes changes to script.js, which is often cached. For it to work your users may have to do a hard refresh (usually Ctrl + F5).
Compatibility:Compatible with SMF 1.0 only as its a standard feature of 2.0
Installation Information:The Package Manager should work in most cases, if you have problems installing please use the discussion thread as well as Manual Installation of Mods (http://docs.simplemachines.org/index.php?topic=402)
License:Copyright (c) 2015, Simple Machines
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the <organization> nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Change Log:Version 1.1 - March 23 2016
- Updated to work with SMF 1.1.21
- BSD License
Version 1.0 - October 10 2006
- Initial release
Aehm, how do I use the Mod ? Any image as example ? ???
open any board in SMF i mean here and you will something like
Pages: [1] 2 3 ... 18 Go Down
click on ... and it will expand.
click here
http://www.simplemachines.org/community/index.php?board=59.0
Shouldn't this be called "Expand Pageindex" or something similar? It's very inaccurate and misleading the title.
to me its perfect
PAGE 1,2,3,4,5,6,7 and so on
it will become 1,2......100
by the mod we will able to EXPAND pages right!
Sorry, but that's wrong. The list of numbers that is bein expanded is the "page index".
A
page by definition is
Quote from: dictionary.com
Computers.
a. a relatively small block of main or secondary storage, up to about 1024 words.
b. a block of program instructions or data stored in main or secondary storage.
c. (in word processing) a portion of a document.
or
Quote from: dictionary.com
Web page
Computers.
1. a single, usually hypertext document on the World Wide Web that can incorporate text, graphics, sounds, etc.
And if you don't agree with these definitions, check the SMF team's definition of that thing. The function to create it is called "constructPageIndex();", the variable that holds it is called $context['page_index'].
I don't see any reason to rename it since it's already named this way. It may be more acurate, but it's jsut a name.
So much for clarity. Actually I think it's pretty serious. Misleading users.
For a mod the name is that identifies the mod, I search the mod page looking at their names first.
I assure you that I was quite disappointed to when I realized what this mod was about, and it seemed a waste of my time. But that's just me, one in a billion.
Who am I to argue with the "SMF Customization Team"?
Oh this is nice. A Perl written message board I use to visit had such a feature. Comes in handy! ;D ;)
SMF Customization Team just means that it was worked on by various members of the team.
I really don't see how it is that misleading. If anything maybe "Expand Page Listing" would be better.
Just install this mods into my SMF Board. No matter what name we should have for this mod, there is only 1 comment I will give to this mod is "Awesome" !!!
How do i get this to work well with Helios Theme ?
There isn't any script.js file in the theme. The function work fine.
When i click on the page beside "go down" ... The whole pages list did scroll down and work smoothly.
but
When i click on the page at the bottom beside "go up" ... the whole pages list goes all the way till the end in 1 line. Here is the screenshot for better explaination.
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg291.imageshack.us%2Fimg291%2F9622%2Fpexppp6.png&hash=7df2fcc77e0278abfc8636812cd4f973d36cf8bc) (http://imageshack.us)
Script.js is global. There isn't one in every theme so you don't need to make any changes. With having it in one line there is probobally a fixed height. You'd ahve to modify the theme, which I'm not quite sure how you would do.
Nice MOD... This should come in handy.
P.S I finally found out what User 1 is used for :P
This mod has been used on my forum for a while now and its awesome, but I have a problem.
I installed the SEO urls mod and for some reason if I expanded the pages and clicked on one other than the first, it would take me back to the first anyway :(
installed great in 1.1.3 but isn't working (shows as a link but doesn;t expand) ! any ideas ?
Quote from: MinasC on June 28, 2007, 08:30:30 PM
installed great in 1.1.3 but isn't working (shows as a link but doesn;t expand) ! any ideas ?
I also installed it on 1.1.3 and had the problem of not expanding. But if you look a few post up before the name discussion, it mentions doing a hard refresh. I did a refresh by clicking refresh on my browser and it worked fine
I have smf 1.1.3 and not default theme and mod work correct. Thanks :)
Quote from: AdviseorAnswers.com on July 03, 2007, 07:34:27 PM
Quote from: MinasC on June 28, 2007, 08:30:30 PM
installed great in 1.1.3 but isn't working (shows as a link but doesn;t expand) ! any ideas ?
I also installed it on 1.1.3 and had the problem of not expanding. But if you look a few post up before the name discussion, it mentions doing a hard refresh. I did a refresh by clicking refresh on my browser and it worked fine
works fine now , thnx a lot , hadn't seen that post about the refresh thing !
any images cant understand wot this mod does
On MessageIndex like you have Page 1,2,3......10, It makes the "..." clickable to expand pageindex like Pages 1,2,3,4,5,6,7,8,9,10
ohhhhhhh ok
thank you dragoon
this mod is awesome! although my board is so young, it doesnt require it at this point, i've bookmarked it for future reference :D
Quote from: 2pac on January 12, 2008, 02:31:53 AM
this mod is awesome! although my board is so young, it doesnt require it at this point, i've bookmarked it for future reference :D
Me too ;D
I always searched for this because i often use it here at simplemachines.org
hello. This mod is pretty good. But i need a modification. I want that the lines have a constant length. for example if i make it 10 numbers long, it should paste a newline after 10th pagenumber.
ex.
1 2 3 4 5 6 7 8 9 10
11 12 13 14 15.......
.....
I just installed this mod and it is wonderful! :D Exactly what I've been needing on my forum.
Thanks! :D
Can't get this great mod to work in 2.0 beta 4; tests fail on subs.php and says script.js does not exist.
This is a default feature in SMF 2.0
Hi!
I have applied this mod in my smf 1.1.8 and works fine :)
Now i've test to apply also for tinyportal "BoardNews"
but when i click on 1 2 3 ... 5 instead to see 1 2 3 4 5 i see 1 2 3 5 (without 4)
any idea to fix?
(i've posted also in tinyportal support topic)
I was playing around with this, and if you want a dropdown menu instead of just a list of pages, replace the expandPages() function in script.js with this:
// Shows the page numbers by clicking the dots (in compact view).
function expandPages(spanNode, baseURL, firstPage, lastPage, perPage)
{
var replacement = '', i, oldLastPage = 0;
// The dots were bold, the page numbers are not (in most cases).
spanNode.style.fontWeight = 'normal';
spanNode.onclick = '';
// Calculate the new pages.
for (i = firstPage; i < lastPage; i += perPage)
//replacement += '<a class="navPages" href="' + baseURL.replace(/%d/, i) + '">' + (1 + i / perPage) + '</a> ';
replacement += '<option value="' + i + '">' + (1 + i / perPage) + '</option>';
// Replace the dots by the new page links.
setInnerHTML(spanNode, '<select id="page_dropdown" onchange="window.location=(\'' + baseURL + '\').replace(/%d/, this.value);">' + replacement + '</select> ');
}
I've found what I believe to be a bug in this mod. When on a topic index page within a board, if the topic has enough pages that the modded function appears, if you double click on the .... to expand the page numbers, it actually creates an editable text box out of the subject topic instead of expanding the pages, and you can actually modify the topic name by changing it and hitting enter. I'm using 1.1.12 and viewing with firefox 3.6.13
I don't know if this poses any security issue or not, but thought it might be worth reporting. This eventoccurs when I am logged in as an admin. It does not occur if you are logged out, or it appears it does not happen if you are logged in as a non administrative member.
A useful modification, thank you