diff options
| author | Lester Caine <lester@lsces.co.uk> | 2026-05-21 14:10:11 +0100 |
|---|---|---|
| committer | Lester Caine <lester@lsces.co.uk> | 2026-05-21 14:10:11 +0100 |
| commit | 39e4ea033f51083c7d556d5bf0dc04b82edee4de (patch) | |
| tree | a02e9a796a9aad5c11708b1c42f5ea99cdf8b487 /includes | |
| parent | bb8b363edab318246976d9006d0db9d1d9dc515e (diff) | |
| download | fisheye-39e4ea033f51083c7d556d5bf0dc04b82edee4de.tar.gz fisheye-39e4ea033f51083c7d556d5bf0dc04b82edee4de.tar.bz2 fisheye-39e4ea033f51083c7d556d5bf0dc04b82edee4de.zip | |
Fix images_per_page for galleriffic pagination to match JS numThumbs:30
Galleriffic JS hardcodes numThumbs:30 in both gallery templates, so the
images_per_page used for image_order.tpl page-break dividers must also be 30
rather than cols_per_page * rows_per_page.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'includes')
| -rwxr-xr-x | includes/classes/FisheyeGallery.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/includes/classes/FisheyeGallery.php b/includes/classes/FisheyeGallery.php index 16d5b88..b4d7ebc 100755 --- a/includes/classes/FisheyeGallery.php +++ b/includes/classes/FisheyeGallery.php @@ -156,7 +156,10 @@ class FisheyeGallery extends FisheyeBase { if( $this->getPreference( 'gallery_pagination' ) == FISHEYE_PAGINATION_POSITION_NUMBER ) { $this->mInfo['num_pages'] = $this->mDb->getOne( "SELECT COUNT( distinct( floor(`item_position`) ) ) FROM `".BIT_DB_PREFIX."fisheye_gallery_image_map` WHERE gallery_content_id=?", [ $this->mContentId ] ); } else { - $this->mInfo['images_per_page'] = $this->mInfo['cols_per_page'] * $this->mInfo['rows_per_page']; + // galleriffic JS templates hardcode numThumbs:30 — match that here so image_order.tpl page breaks align + $this->mInfo['images_per_page'] = ( $this->getPreference( 'gallery_pagination' ) == FISHEYE_PAGINATION_GALLERIFFIC ) + ? 30 + : $this->mInfo['cols_per_page'] * $this->mInfo['rows_per_page']; $this->mInfo['num_pages'] = (int)$this->mInfo['num_images'] / $this->mInfo['images_per_page'] + ($this->mInfo['num_images'] % $this->mInfo['images_per_page'] == 0 ? 0 : 1); } |
