"Show all thumbnails" link

IntEx

Joined: 2006-04-17
Posts: 5
Posted: Wed, 2006-07-12 10:35

Hello! I would like to have an "Show all thumbnails" link instead of navigator numbers. Is there any posibility to do that? Thank you!

 
asc99c

Joined: 2005-01-03
Posts: 10
Posted: Thu, 2006-10-19 22:41

Hi there,

I've requested this enhancement a few times. Always seem to have to make the change myself on each upgrade though :)

Here's my latest quick and dirty change, but I haven't upgraded since 2.0.2 so not sure what's changed in 2.1

1) Edit modules/core/templates/blocks/Pager.tpl
Add the following line just before the last line:
<a href="{g->url arg1="view=core.ShowItem" arg2="itemId=`$theme.item.id`" arg3="page=0" arg4="showAll=true"}">Show All</a>

2) Edit modules/core/classes/GalleryTheme.class
Add the three middle lines from the section below (other lines shown for context)
In my file the first line below is 813. If the line is changed, hopefully you can search the file for the comment text.

/* If we care about pagination, then figure out the current page and total pages */
$perPage = $this->getPageSize($params);

$showAll = GalleryUtilities::getRequestVariables( 'showAll' );
if( $showAll == 'true' )
$perPage = 0;

$page = GalleryUtilities::getRequestVariables('page');

That's it! It appears to work OK - see it in action at http://andyc.ac

 
GSnyder

Joined: 2007-02-07
Posts: 1
Posted: Wed, 2007-02-07 09:08

This still works perfectly in 2.1.2. Thanks for posting it - it's exactly what I wanted.

 
fireskull

Joined: 2006-04-17
Posts: 2
Posted: Wed, 2007-02-07 13:00
GSnyder wrote:
This still works perfectly in 2.1.2. Thanks for posting it - it's exactly what I wanted.

Hmm did you do exactly as above? i tried but when i add the 3 middle lines and refresh the page nothing happens its just blank any ideas? im using 2.1.2 aswell

 
asc99c

Joined: 2005-01-03
Posts: 10
Posted: Sat, 2007-03-31 17:03

Hey this post was useful for me too! I've just upgraded to Gallery 2.2.1 and couldn't remember what I changed for 'Show All'. This mod also works for 2.2.1 although the comment line is now 826.

Fireskull, generally a blank page points to a syntax error in the code. Check the code is copied and pasted OK with no characters missing.

You could try turning on the debugging to see any error messages. In the top level gallery2 directory, edit config.php and find the line "$gallery->setDebug(false);" You can temporarily set this to 'immediate' in order to see what is going wrong.