zpFocus Search Results behavior

Hello,
I am using Zenphoto version 1.4.2.1 [9264] (Official Build) with zpFocus_ v1.4.2.
I was wondering how to control the number of albums that are returned on the search results page.
It was obvious how to change the code for pages and news results, but I am not able to figure out what to change for the albums and or images. I have experimented many ways without success.
In admin I have the number of albums set per page as 6, and my first thought was that is where it is decided.
I would like to restrict the number of results with the Show More Results link appearing when the results are more than the number I choose to display. Which is what happens with the pages and news.
Following is the code used in my search.php page:
<?php if (getNumAlbums() != 0) { ?>
<div class="subalbum-wrap">
<h4 class="blockhead"><span><?php echo gettext('Album Search Results'); ?> (<?php echo getNumAlbums(); ?>)</span></h4>

    <?php $x=1; while (next_album()): $c++;
    if( $odd = $x%2 ) {
    $css = 'goleft';
    } else {
    $css = 'goright';
    } ?>
    <li class="<?php echo $css; ?>">
    <h4>" title="<?php echo gettext('View Album:'); ?> <?php echo getBareAlbumTitle();?>"><?php echo truncate_string(getBareAlbumTitle(),25,'...'); ?></h4>
    " title="<?php echo gettext('View Album:'); ?> <?php echo getBareAlbumTitle();?>"><?php printCustomAlbumThumbImage(getBareAlbumTitle(),160); ?>
    <span class="front-date"><?php printAlbumDate(); ?></span>
    <p class="front-desc">
    <?php echo truncate_string(getAlbumDesc(), 175); ?>
    " title="<?php echo gettext('View album:'); ?> <?php echo getBareAlbumTitle();?>">»
    </p>

    <?php $x=$x+1; endwhile; ?>
</div>
<?php } ?>
Thank-you!

Comments

  • If you want to show all albums/images on the page but with some hidden, use the next_album(true) and next_image(true) function calls. No pagination is then done by Zenphoto. Note: if there are a lot if images & albums returned, your page rendering may be slow!

    You would need to mark as hidden the ones past your desired limit and use the link to show them.

    Presumably you would want to show these images/albums in rows, so your computation on when to hide should be an even multiple of what will fit in a row.

    How this fits in the specific theme is on you as I am not familiar with the theme.
Sign In or Register to comment.