From 389d36e820c28819efd9c6dd49b103bb1b0edf42 Mon Sep 17 00:00:00 2001 From: Lester Caine Date: Mon, 25 May 2026 11:40:10 +0100 Subject: Galleriffic: fix fancyzoom interference, add regenerate-thumbnails UI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add rel="nozoom" to all galleriffic thumb links so FancyZoom's loading animation doesn't fire when selecting images in galleriffic - Add "Regenerate All Thumbnails" checkbox to edit_gallery.tpl (only shown for existing galleries) - Fix edit.php calling non-existent generateThumbnails() on a gallery object — corrected to generateGalleryThumbnails() - Add set_time_limit(0) inside generateGalleryThumbnails() so large galleries don't time out during thumbnail regeneration Co-Authored-By: Claude Sonnet 4.6 --- edit.php | 2 +- gallery_views/galleriffic/fisheye_galleriffic_inc_1.tpl | 4 ++-- gallery_views/galleriffic/fisheye_galleriffic_inc_2.tpl | 4 ++-- gallery_views/galleriffic/fisheye_galleriffic_inc_5.tpl | 4 ++-- includes/classes/FisheyeGallery.php | 1 + templates/edit_gallery.tpl | 9 +++++++++ 6 files changed, 17 insertions(+), 7 deletions(-) diff --git a/edit.php b/edit.php index a4edefc..eec9898 100755 --- a/edit.php +++ b/edit.php @@ -55,7 +55,7 @@ if( !empty( $_REQUEST['savegallery'] ) ) { $gContent->addToGalleries( !empty( $_REQUEST['gallery_additions'] ) ? $_REQUEST['gallery_additions'] : null ); if( !empty( $_REQUEST['generate_thumbnails'] ) ) { - $gContent->generateThumbnails(); + $gContent->generateGalleryThumbnails(); } header("location: ".$gContent->getDisplayUrl() ); die(); diff --git a/gallery_views/galleriffic/fisheye_galleriffic_inc_1.tpl b/gallery_views/galleriffic/fisheye_galleriffic_inc_1.tpl index 9216c3a..b84fef4 100755 --- a/gallery_views/galleriffic/fisheye_galleriffic_inc_1.tpl +++ b/gallery_views/galleriffic/fisheye_galleriffic_inc_1.tpl @@ -22,7 +22,7 @@ {if !is_a($galItem, '\Bitweaver\Fisheye\FisheyeImage') || $galItem->mInfo.thumbnail_url.avatar}
  • {if is_a($galItem, '\Bitweaver\Fisheye\FisheyeImage')} - + {$galItem->mInfo.title|escape}

    @@ -48,7 +48,7 @@

    {$galItem->mInfo.description|default:''}

    {elseif is_a($galItem, '\Bitweaver\Fisheye\FisheyeGallery')} - + {$galItem->mInfo.title|escape}
    diff --git a/gallery_views/galleriffic/fisheye_galleriffic_inc_2.tpl b/gallery_views/galleriffic/fisheye_galleriffic_inc_2.tpl index 1de1e1c..10771b7 100644 --- a/gallery_views/galleriffic/fisheye_galleriffic_inc_2.tpl +++ b/gallery_views/galleriffic/fisheye_galleriffic_inc_2.tpl @@ -32,7 +32,7 @@ {if !is_a($galItem, '\Bitweaver\Fisheye\FisheyeImage') || $galItem->mInfo.thumbnail_url.avatar}
  • {if is_a($galItem, '\Bitweaver\Fisheye\FisheyeImage')} - + {$galItem->mInfo.title|escape}

    @@ -58,7 +58,7 @@

    {$galItem->mInfo.description|default:''}

  • {elseif is_a($galItem, '\Bitweaver\Fisheye\FisheyeGallery')} - + {$galItem->mInfo.title|escape}
    diff --git a/gallery_views/galleriffic/fisheye_galleriffic_inc_5.tpl b/gallery_views/galleriffic/fisheye_galleriffic_inc_5.tpl index 829261e..d2d49ab 100755 --- a/gallery_views/galleriffic/fisheye_galleriffic_inc_5.tpl +++ b/gallery_views/galleriffic/fisheye_galleriffic_inc_5.tpl @@ -22,7 +22,7 @@ {if !is_a($galItem, '\Bitweaver\Fisheye\FisheyeImage') || $galItem->mInfo.thumbnail_url.avatar}
  • {if is_a($galItem, '\Bitweaver\Fisheye\FisheyeImage')} - + {$galItem->mInfo.title|escape}

    @@ -47,7 +47,7 @@

    {$galItem->mInfo.description|escape}

  • {elseif is_a($galItem, '\Bitweaver\Fisheye\FisheyeGallery')} - + {$galItem->mInfo.title|escape}
    diff --git a/includes/classes/FisheyeGallery.php b/includes/classes/FisheyeGallery.php index 1c89b34..a66a8d4 100755 --- a/includes/classes/FisheyeGallery.php +++ b/includes/classes/FisheyeGallery.php @@ -402,6 +402,7 @@ class FisheyeGallery extends FisheyeBase { public function generateGalleryThumbnails(): void { if( $this->isValid() ) { + set_time_limit(0); if( $this->loadImages() ) { foreach( array_keys( $this->mItems ) as $key ) { $this->mItems[$key]->generateThumbnails(); diff --git a/templates/edit_gallery.tpl b/templates/edit_gallery.tpl index 06bfacd..4164dfb 100755 --- a/templates/edit_gallery.tpl +++ b/templates/edit_gallery.tpl @@ -125,6 +125,15 @@ document.addEventListener('DOMContentLoaded', updateGalleryPagination);
    {/if} + {if $gContent->isValid()} +
    + {forminput label="checkbox"} + {tr}Regenerate All Thumbnails{/tr} + {formhelp note="Re-generate thumbnails for all images and videos in this gallery. This may take some time for large galleries."} + {/forminput} +
    + {/if} +
    {forminput label="checkbox"} isValid() || $gContent->getPreference('allow_comments') eq 'y'}checked="checked"{/if} />{tr}Image Comments{/tr} -- cgit v1.3