summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2026-05-24 17:22:09 +0100
committerLester Caine <lester@lsces.co.uk>2026-05-24 17:22:09 +0100
commitb61dddb5aba46811056dedade397fb074e58c432 (patch)
treec3c0a5ffb42885f74f9aa93ac4f79eab959e9b7e
parentd673d42771ba298851ad58dcf109946b0d983087 (diff)
downloadfisheye-b61dddb5aba46811056dedade397fb074e58c432.tar.gz
fisheye-b61dddb5aba46811056dedade397fb074e58c432.tar.bz2
fisheye-b61dddb5aba46811056dedade397fb074e58c432.zip
Add per-gallery show_description preference to all active gallery views
Galleries can now suppress their description text via a checkbox in the edit form (defaults to shown). All active view templates (galleriffic, fixed_grid, auto_flow, position_number, simple_list) respect the preference. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
-rwxr-xr-xedit.php1
-rwxr-xr-xgallery_views/auto_flow/fisheye_auto_flow_inc.tpl6
-rwxr-xr-xgallery_views/fixed_grid/fisheye_fixed_grid_inc.tpl7
-rwxr-xr-xgallery_views/fixed_grid/fisheye_fixed_grid_inc2.tpl2
-rwxr-xr-xgallery_views/fixed_grid/fisheye_fixed_grid_inc3.tpl2
-rwxr-xr-xgallery_views/galleriffic/fisheye_galleriffic_inc_1.tpl5
-rwxr-xr-xgallery_views/galleriffic/fisheye_galleriffic_inc_5.tpl5
-rwxr-xr-xgallery_views/position_number/fisheye_position_number_inc.tpl6
-rwxr-xr-xgallery_views/simple_list/fisheye_simple_list_inc.tpl6
-rwxr-xr-xtemplates/edit_gallery.tpl7
10 files changed, 45 insertions, 2 deletions
diff --git a/edit.php b/edit.php
index 92a861b..9cb90f6 100755
--- a/edit.php
+++ b/edit.php
@@ -47,6 +47,7 @@ if( !empty( $_REQUEST['savegallery'] ) ) {
$gContent->storePreference( 'link_original_images', !empty( $_REQUEST['link_original_images'] ) ? $_REQUEST['link_original_images'] : null );
$gContent->storePreference( 'total_per_page', !empty( $_REQUEST['total_per_page'] ) ? (int)$_REQUEST['total_per_page'] : null );
$gContent->storePreference( 'galleriffic_num_thumbs', !empty( $_REQUEST['galleriffic_num_thumbs'] ) ? (int)$_REQUEST['galleriffic_num_thumbs'] : null );
+ $gContent->storePreference( 'show_description', !empty( $_REQUEST['show_description'] ) ? 'y' : 'n' );
// make sure var is fully stuffed with current data
$gContent->load();
// set the mappings, or if nothing checked, nuke them all
diff --git a/gallery_views/auto_flow/fisheye_auto_flow_inc.tpl b/gallery_views/auto_flow/fisheye_auto_flow_inc.tpl
index 366b518..b8a1be0 100755
--- a/gallery_views/auto_flow/fisheye_auto_flow_inc.tpl
+++ b/gallery_views/auto_flow/fisheye_auto_flow_inc.tpl
@@ -6,6 +6,12 @@
<h1>{$gContent->getTitle()|escape}</h1>
</div>
+ {if $gContent->mInfo.data && $gContent->getPreference('show_description') ne 'n'}
+ <div class="body">
+ <p>{$gContent->mInfo.data|escape}</p>
+ </div>
+ {/if}
+
<div class="body col-xs-12">
{formfeedback success=$fisheyeSuccess error=$fisheyeErrors warning=$fisheyeWarnings}
diff --git a/gallery_views/fixed_grid/fisheye_fixed_grid_inc.tpl b/gallery_views/fixed_grid/fisheye_fixed_grid_inc.tpl
index 925ce95..8c4e032 100755
--- a/gallery_views/fixed_grid/fisheye_fixed_grid_inc.tpl
+++ b/gallery_views/fixed_grid/fisheye_fixed_grid_inc.tpl
@@ -5,6 +5,13 @@
{include file="bitpackage:fisheye/gallery_icons_inc.tpl"}
<h1>{$gContent->getTitle()|escape}</h1>
</div>
+
+ {if $gContent->mInfo.data && $gContent->getPreference('show_description') ne 'n'}
+ <div class="body">
+ <p>{$gContent->mInfo.data|escape}</p>
+ </div>
+ {/if}
+
<div class="body">
{if $gContent->mGalleryId != 0}
<table class="thumbnailblock">
diff --git a/gallery_views/fixed_grid/fisheye_fixed_grid_inc2.tpl b/gallery_views/fixed_grid/fisheye_fixed_grid_inc2.tpl
index da2daa7..48ac28c 100755
--- a/gallery_views/fixed_grid/fisheye_fixed_grid_inc2.tpl
+++ b/gallery_views/fixed_grid/fisheye_fixed_grid_inc2.tpl
@@ -14,7 +14,7 @@
{/if}
{include file="bitpackage:liberty/services_inc.tpl" serviceLocation='body' serviceHash=$gContent->mInfo}
- {if $gContent->mInfo.data}
+ {if $gContent->mInfo.data && $gContent->getPreference('show_description') ne 'n'}
<p>{$gContent->mInfo.data|escape}</p>
{/if}
diff --git a/gallery_views/fixed_grid/fisheye_fixed_grid_inc3.tpl b/gallery_views/fixed_grid/fisheye_fixed_grid_inc3.tpl
index b55a966..6df08a5 100755
--- a/gallery_views/fixed_grid/fisheye_fixed_grid_inc3.tpl
+++ b/gallery_views/fixed_grid/fisheye_fixed_grid_inc3.tpl
@@ -10,7 +10,7 @@
{formfeedback success=$fisheyeSuccess error=$fisheyeErrors warning=$fisheyeWarnings}
{include file="bitpackage:liberty/services_inc.tpl" serviceLocation='body' serviceHash=$gContent->mInfo}
- {if $gContent->mInfo.data}
+ {if $gContent->mInfo.data && $gContent->getPreference('show_description') ne 'n'}
<p>{$gContent->mInfo.data|escape}</p>
{/if}
diff --git a/gallery_views/galleriffic/fisheye_galleriffic_inc_1.tpl b/gallery_views/galleriffic/fisheye_galleriffic_inc_1.tpl
index 5b4c878..d4fcf85 100755
--- a/gallery_views/galleriffic/fisheye_galleriffic_inc_1.tpl
+++ b/gallery_views/galleriffic/fisheye_galleriffic_inc_1.tpl
@@ -7,6 +7,11 @@
<h1>{$gContent->getTitle()|escape}</h1>
</div>
+{if $gContent->mInfo.data && $gContent->getPreference('show_description') ne 'n'}
+<div class="body">
+ <p>{$gContent->mInfo.data|escape}</p>
+</div>
+{/if}
<!-- Start Advanced Gallery Html Containers -->
<div class="navigation-container">
diff --git a/gallery_views/galleriffic/fisheye_galleriffic_inc_5.tpl b/gallery_views/galleriffic/fisheye_galleriffic_inc_5.tpl
index 7613940..7400916 100755
--- a/gallery_views/galleriffic/fisheye_galleriffic_inc_5.tpl
+++ b/gallery_views/galleriffic/fisheye_galleriffic_inc_5.tpl
@@ -7,6 +7,11 @@
<h1>{$gContent->getTitle()|escape}</h1>
</div>
+{if $gContent->mInfo.data && $gContent->getPreference('show_description') ne 'n'}
+<div class="body">
+ <p>{$gContent->mInfo.data|escape}</p>
+</div>
+{/if}
<!-- Start Advanced Gallery Html Containers -->
<div class="navigation-container">
diff --git a/gallery_views/position_number/fisheye_position_number_inc.tpl b/gallery_views/position_number/fisheye_position_number_inc.tpl
index e74c6c5..29e1f67 100755
--- a/gallery_views/position_number/fisheye_position_number_inc.tpl
+++ b/gallery_views/position_number/fisheye_position_number_inc.tpl
@@ -6,6 +6,12 @@
<h1>{$gContent->getTitle()|escape}</h1>
</div>
+ {if $gContent->mInfo.data && $gContent->getPreference('show_description') ne 'n'}
+ <div class="body">
+ <p>{$gContent->mInfo.data|escape}</p>
+ </div>
+ {/if}
+
<div class="body">
{formfeedback success=$fisheyeSuccess error=$fisheyeErrors warning=$fisheyeWarnings}
diff --git a/gallery_views/simple_list/fisheye_simple_list_inc.tpl b/gallery_views/simple_list/fisheye_simple_list_inc.tpl
index 997416f..3b6c68c 100755
--- a/gallery_views/simple_list/fisheye_simple_list_inc.tpl
+++ b/gallery_views/simple_list/fisheye_simple_list_inc.tpl
@@ -4,6 +4,12 @@
<h1>{$gContent->getTitle()|escape}</h1>
</div>
+{if $gContent->mInfo.data && $gContent->getPreference('show_description') ne 'n'}
+<div class="body">
+ <p>{$gContent->mInfo.data|escape}</p>
+</div>
+{/if}
+
{assign var=thumbsize value='small'}
<table class="data">
<caption>{tr}List of files{/tr} <span class="total">[ {$galInfo.total_records|default:0} ]</span></caption>
diff --git a/templates/edit_gallery.tpl b/templates/edit_gallery.tpl
index 309a9fe..06bfacd 100755
--- a/templates/edit_gallery.tpl
+++ b/templates/edit_gallery.tpl
@@ -51,6 +51,13 @@ document.addEventListener('DOMContentLoaded', updateGalleryPagination);
{/forminput}
</div>
+ <div class="form-group">
+ {forminput label="checkbox"}
+ <input type="checkbox" name="show_description" id="show_description" value="y" {if $gContent->getPreference('show_description') ne 'n'}checked="checked"{/if} />{tr}Show Description{/tr}
+ {formhelp note="Display the gallery description text below the gallery header."}
+ {/forminput}
+ </div>
+
{if $gBitUser->hasPermission('p_fisheye_create_public_gal')}
<div class="form-group">
{forminput label="checkbox"}