summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2026-05-25 11:40:10 +0100
committerLester Caine <lester@lsces.co.uk>2026-05-25 11:40:10 +0100
commit389d36e820c28819efd9c6dd49b103bb1b0edf42 (patch)
tree7056e9dbb03abbbb6f3503c4fe04d0e6d2184243
parentaafa6c0519a068d14e7c6a1ce0d90ba835ecd1f1 (diff)
downloadfisheye-389d36e820c28819efd9c6dd49b103bb1b0edf42.tar.gz
fisheye-389d36e820c28819efd9c6dd49b103bb1b0edf42.tar.bz2
fisheye-389d36e820c28819efd9c6dd49b103bb1b0edf42.zip
Galleriffic: fix fancyzoom interference, add regenerate-thumbnails UI
- Add rel="nozoom" to all galleriffic thumb <a> 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 <noreply@anthropic.com>
-rwxr-xr-xedit.php2
-rwxr-xr-xgallery_views/galleriffic/fisheye_galleriffic_inc_1.tpl4
-rw-r--r--gallery_views/galleriffic/fisheye_galleriffic_inc_2.tpl4
-rwxr-xr-xgallery_views/galleriffic/fisheye_galleriffic_inc_5.tpl4
-rwxr-xr-xincludes/classes/FisheyeGallery.php1
-rwxr-xr-xtemplates/edit_gallery.tpl9
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}
<li>
{if is_a($galItem, '\Bitweaver\Fisheye\FisheyeImage')}
- <a class="thumb" name="{$galItem->mImageId}" href="{$galItem->mInfo.thumbnail_url.large}{*$smarty.const.FISHEYE_PKG_URL}view_image.php?image_id={$galItem->mImageId*}" title="{$galItem->mInfo.title|escape}">
+ <a class="thumb" rel="nozoom" name="{$galItem->mImageId}" href="{$galItem->mInfo.thumbnail_url.large}{*$smarty.const.FISHEYE_PKG_URL}view_image.php?image_id={$galItem->mImageId*}" title="{$galItem->mInfo.title|escape}">
<img src="{$galItem->mInfo.thumbnail_url.avatar}" alt="{$galItem->mInfo.title|escape}" />
</a>
<h2 class="heading">
@@ -48,7 +48,7 @@
<div class="image-desc"><p>{$galItem->mInfo.description|default:''}</p></div>
</div>
{elseif is_a($galItem, '\Bitweaver\Fisheye\FisheyeGallery')}
- <a class="thumb" name="{$galItem->mContentId}" href="{$galItem->mPreviewImage->mInfo.thumbnail_url.large}" title="{$galItem->mInfo.title|escape}">
+ <a class="thumb" rel="nozoom" name="{$galItem->mContentId}" href="{$galItem->mPreviewImage->mInfo.thumbnail_url.large}" title="{$galItem->mInfo.title|escape}">
<img src="{$galItem->mPreviewImage->mInfo.thumbnail_url.avatar}" alt="{$galItem->mInfo.title|escape}"/>
</a>
<div class="heading">
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}
<li>
{if is_a($galItem, '\Bitweaver\Fisheye\FisheyeImage')}
- <a class="thumb" name="{$galItem->mImageId}" href="{$galItem->mInfo.thumbnail_url.large}{*$smarty.const.FISHEYE_PKG_URL}view_image.php?image_id={$galItem->mImageId*}" title="{$galItem->mInfo.title|escape}">
+ <a class="thumb" rel="nozoom" name="{$galItem->mImageId}" href="{$galItem->mInfo.thumbnail_url.large}{*$smarty.const.FISHEYE_PKG_URL}view_image.php?image_id={$galItem->mImageId*}" title="{$galItem->mInfo.title|escape}">
<img src="{$galItem->mInfo.thumbnail_url.avatar}" alt="{$galItem->mInfo.title|escape}" />
</a>
<h2 class="heading">
@@ -58,7 +58,7 @@
<div class="image-desc"><p>{$galItem->mInfo.description|default:''}</p></div>
</div>
{elseif is_a($galItem, '\Bitweaver\Fisheye\FisheyeGallery')}
- <a class="thumb" name="{$galItem->mContentId}" href="{$galItem->mPreviewImage->mInfo.thumbnail_url.large}" title="{$galItem->mInfo.title|escape}">
+ <a class="thumb" rel="nozoom" name="{$galItem->mContentId}" href="{$galItem->mPreviewImage->mInfo.thumbnail_url.large}" title="{$galItem->mInfo.title|escape}">
<img src="{$galItem->mPreviewImage->mInfo.thumbnail_url.avatar}" alt="{$galItem->mInfo.title|escape}"/>
</a>
<div class="heading">
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}
<li>
{if is_a($galItem, '\Bitweaver\Fisheye\FisheyeImage')}
- <a class="thumb" name="{$galItem->mImageId}" href="{$galItem->mInfo.thumbnail_url.large}{*$smarty.const.FISHEYE_PKG_URL}view_image.php?image_id={$galItem->mImageId*}" title="{$galItem->mInfo.title|escape}">
+ <a class="thumb" rel="nozoom" name="{$galItem->mImageId}" href="{$galItem->mInfo.thumbnail_url.large}{*$smarty.const.FISHEYE_PKG_URL}view_image.php?image_id={$galItem->mImageId*}" title="{$galItem->mInfo.title|escape}">
<img src="{$galItem->mInfo.thumbnail_url.avatar}" alt="{$galItem->mInfo.title|escape}" />
</a>
<h2 class="heading">
@@ -47,7 +47,7 @@
<div class="image-desc"><p>{$galItem->mInfo.description|escape}</p></div>
</div>
{elseif is_a($galItem, '\Bitweaver\Fisheye\FisheyeGallery')}
- <a class="thumb" name="{$galItem->mContentId}" href="{$galItem->mPreviewImage->mInfo.thumbnail_url.large}" title="{$galItem->mInfo.title|escape}">
+ <a class="thumb" rel="nozoom" name="{$galItem->mContentId}" href="{$galItem->mPreviewImage->mInfo.thumbnail_url.large}" title="{$galItem->mInfo.title|escape}">
<img src="{$galItem->mPreviewImage->mInfo.thumbnail_url.avatar}" alt="{$galItem->mInfo.title|escape}"/>
</a>
<div class="heading">
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);
</div>
{/if}
+ {if $gContent->isValid()}
+ <div class="form-group">
+ {forminput label="checkbox"}
+ <input type="checkbox" name="generate_thumbnails" id="generate_thumbnails" value="y" />{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}
+ </div>
+ {/if}
+
<div class="form-group">
{forminput label="checkbox"}
<input type="checkbox" name="allow_comments" id="allow_comments" value="y" {if !$gContent->isValid() || $gContent->getPreference('allow_comments') eq 'y'}checked="checked"{/if} />{tr}Image Comments{/tr}