diff options
| author | lsces <lester@lsces.co.uk> | 2026-04-02 09:54:02 +0100 |
|---|---|---|
| committer | lsces <lester@lsces.co.uk> | 2026-04-02 09:54:02 +0100 |
| commit | 5f2299cde07dc400619d73a8715964f831e985ef (patch) | |
| tree | 640c2d385c33ba0c9cfd76d42d5fb41fe2c80ab8 | |
| parent | 6b4354745aad895cb0ab72978dacacc3513a0c7f (diff) | |
| download | fisheye-5f2299cde07dc400619d73a8715964f831e985ef.tar.gz fisheye-5f2299cde07dc400619d73a8715964f831e985ef.tar.bz2 fisheye-5f2299cde07dc400619d73a8715964f831e985ef.zip | |
Missing defaults for php8.4 and style change for fixed grid
| -rwxr-xr-x | gallery_views/fixed_grid/fisheye_fixed_grid_inc.tpl | 88 | ||||
| -rwxr-xr-x | gallery_views/fixed_grid/fisheye_fixed_grid_inc2.tpl | 66 | ||||
| -rwxr-xr-x | templates/gallery_nav.tpl | 4 | ||||
| -rwxr-xr-x | templates/view_image.tpl | 4 |
4 files changed, 106 insertions, 56 deletions
diff --git a/gallery_views/fixed_grid/fisheye_fixed_grid_inc.tpl b/gallery_views/fixed_grid/fisheye_fixed_grid_inc.tpl index 1452f99..5a528cd 100755 --- a/gallery_views/fixed_grid/fisheye_fixed_grid_inc.tpl +++ b/gallery_views/fixed_grid/fisheye_fixed_grid_inc.tpl @@ -1,66 +1,50 @@ {strip} {include file="bitpackage:fisheye/gallery_nav.tpl"} -<div class="display fisheye"> - <div class="header"> +<div class="display fisheye container"> + <div class="header col-xs-12"> {include file="bitpackage:fisheye/gallery_icons_inc.tpl"} <h1>{$gContent->getTitle()|escape}</h1> </div> - - {pagination gallery_id=$gContent->mGalleryId} - <div class="body"> - {if !empty($fisheyeSuccess) || !empty($fisheyeErrors) || !empty($fisheyeWarnings) } - {formfeedback success=$fisheyeSuccess error=$fisheyeErrors warning=$fisheyeWarnings} - {/if} - - {include file="bitpackage:liberty/services_inc.tpl" serviceLocation='body' serviceHash=$gContent->mInfo} - {if $gContent->mInfo.data} - <p>{$gContent->mInfo.data|escape}</p> - {/if} + {if $gContent->mGalleryId != 0} + <table class="thumbnailblock"> + {counter assign="imageCount" start="0" print=false} + {assign var="max" value=100} + {assign var="tdWidth" value="4"} + {foreach from=$gContent->mItems item=galItem key=itemContentId} + {if $imageCount % 4 == 0} + <tr > <!-- Begin Image Row --> + {/if} - <table class="thumbnailblock"> - {counter assign="imageCount" start="0" print=false} - {assign var="max" value=100} - {if !empty($cols_per_page) && $cols_per_page > 0}{assign var="tdWidth" value="`$max/$cols_per_page`"}{else}{assign var="tdWidth" value="25"}{assign var="cols_per_page" value="1"}{/if} - {foreach from=$gContent->mItems item=galItem key=itemContentId} - {if $imageCount % $cols_per_page == 0} - <tr > <!-- Begin Image Row --> - {/if} + <td style="width:25%; vertical-align:top;"> <!-- Begin Image Cell --> + {box class="box `$galItem->mInfo.content_type_guid`"} + <a href="{$galItem->getDisplayUrl()|escape}"> + <img class="thumb" src="{$galItem->getThumbnailUri()}" alt="{$galItem->mInfo.title|escape|default:'image'}" /> + </a> + {if $gBitSystem->isFeatureActive( 'fisheye_gallery_list_image_titles' )} + <h4>{$galItem->mInfo.title|escape}</h4> + {/if} + {include file="bitpackage:liberty/services_inc.tpl" serviceLocation='body' serviceHash=$galItem->mInfo type=mini} + {if $gBitSystem->isFeatureActive( 'fisheye_gallery_list_image_descriptions' )} + <p>{$galItem->mInfo.data|escape}</p> + {/if} + {/box} + </td> <!-- End Image Cell --> + {counter} - <td style="width:{$tdWidth}%; vertical-align:top;"> <!-- Begin Image Cell --> - {box class="box `$galItem->mInfo.content_type_guid`" style="margin-left:0;"} - <a href="{$galItem->getDisplayUrl()|escape}"> - <img class="thumb img-responsive" src="{$galItem->getThumbnailUri($gContent->getField('thumbnail_size'))}" alt="{$galItem->mInfo.title|escape|default:'image'}" /> - </a> - {if $gBitSystem->isFeatureActive( 'fisheye_gallery_list_image_titles' )} - <h2>{$galItem->mInfo.title|escape}</h2> - {/if} - {include file="bitpackage:liberty/services_inc.tpl" serviceLocation='body' serviceHash=$galItem->mInfo type=mini} - {if $gBitSystem->isFeatureActive( 'fisheye_gallery_list_image_descriptions' )} - <p>{$galItem->mInfo.data|escape}</p> - {/if} - {/box} - </td> <!-- End Image Cell --> - {counter} + {if $imageCount % 4 == 0} + </tr> <!-- End Image Row --> + {/if} - {if $imageCount % $cols_per_page == 0} - </tr> <!-- End Image Row --> - {/if} - - {foreachelse} + {foreachelse} <tr><td class="norecords">{tr}This gallery is empty{/tr}. <a href="{$smarty.const.FISHEYE_PKG_URL}upload.php?gallery_id={$gGallery->mGalleryId}">Upload pictures!</a></td></tr> - {/foreach} + {/foreach} - {if $imageCount % $cols_per_page != 0}</tr>{/if} - </table> + {if $imageCount % 4 != 0}</tr>{/if} + </table> + {else} + {tr}No gallery for this contact{/tr}. <a href="{$smarty.const.FISHEYE_PKG_URL}create.php?title={$gContent->mInfo.organisation}&contact={$gContent->mInfo.content_id}">Create Contact Gallery!</a> + {/if} </div> <!-- end .body --> - - {* pagination *} - - {include file="bitpackage:liberty/services_inc.tpl" serviceLocation='view' serviceHash=$gContent->mInfo} - - {if $gContent->getPreference('allow_comments') eq 'y'} - {include file="bitpackage:liberty/comments.tpl"} - {/if} </div> <!-- end .fisheye --> {/strip} diff --git a/gallery_views/fixed_grid/fisheye_fixed_grid_inc2.tpl b/gallery_views/fixed_grid/fisheye_fixed_grid_inc2.tpl new file mode 100755 index 0000000..1452f99 --- /dev/null +++ b/gallery_views/fixed_grid/fisheye_fixed_grid_inc2.tpl @@ -0,0 +1,66 @@ +{strip} +{include file="bitpackage:fisheye/gallery_nav.tpl"} +<div class="display fisheye"> + <div class="header"> + {include file="bitpackage:fisheye/gallery_icons_inc.tpl"} + <h1>{$gContent->getTitle()|escape}</h1> + </div> + + {pagination gallery_id=$gContent->mGalleryId} + + <div class="body"> + {if !empty($fisheyeSuccess) || !empty($fisheyeErrors) || !empty($fisheyeWarnings) } + {formfeedback success=$fisheyeSuccess error=$fisheyeErrors warning=$fisheyeWarnings} + {/if} + + {include file="bitpackage:liberty/services_inc.tpl" serviceLocation='body' serviceHash=$gContent->mInfo} + {if $gContent->mInfo.data} + <p>{$gContent->mInfo.data|escape}</p> + {/if} + + <table class="thumbnailblock"> + {counter assign="imageCount" start="0" print=false} + {assign var="max" value=100} + {if !empty($cols_per_page) && $cols_per_page > 0}{assign var="tdWidth" value="`$max/$cols_per_page`"}{else}{assign var="tdWidth" value="25"}{assign var="cols_per_page" value="1"}{/if} + {foreach from=$gContent->mItems item=galItem key=itemContentId} + {if $imageCount % $cols_per_page == 0} + <tr > <!-- Begin Image Row --> + {/if} + + <td style="width:{$tdWidth}%; vertical-align:top;"> <!-- Begin Image Cell --> + {box class="box `$galItem->mInfo.content_type_guid`" style="margin-left:0;"} + <a href="{$galItem->getDisplayUrl()|escape}"> + <img class="thumb img-responsive" src="{$galItem->getThumbnailUri($gContent->getField('thumbnail_size'))}" alt="{$galItem->mInfo.title|escape|default:'image'}" /> + </a> + {if $gBitSystem->isFeatureActive( 'fisheye_gallery_list_image_titles' )} + <h2>{$galItem->mInfo.title|escape}</h2> + {/if} + {include file="bitpackage:liberty/services_inc.tpl" serviceLocation='body' serviceHash=$galItem->mInfo type=mini} + {if $gBitSystem->isFeatureActive( 'fisheye_gallery_list_image_descriptions' )} + <p>{$galItem->mInfo.data|escape}</p> + {/if} + {/box} + </td> <!-- End Image Cell --> + {counter} + + {if $imageCount % $cols_per_page == 0} + </tr> <!-- End Image Row --> + {/if} + + {foreachelse} + <tr><td class="norecords">{tr}This gallery is empty{/tr}. <a href="{$smarty.const.FISHEYE_PKG_URL}upload.php?gallery_id={$gGallery->mGalleryId}">Upload pictures!</a></td></tr> + {/foreach} + + {if $imageCount % $cols_per_page != 0}</tr>{/if} + </table> + </div> <!-- end .body --> + + {* pagination *} + + {include file="bitpackage:liberty/services_inc.tpl" serviceLocation='view' serviceHash=$gContent->mInfo} + + {if $gContent->getPreference('allow_comments') eq 'y'} + {include file="bitpackage:liberty/comments.tpl"} + {/if} +</div> <!-- end .fisheye --> +{/strip} diff --git a/templates/gallery_nav.tpl b/templates/gallery_nav.tpl index 5bd254a..5447de9 100755 --- a/templates/gallery_nav.tpl +++ b/templates/gallery_nav.tpl @@ -25,7 +25,7 @@ {if $gGallery} <div class="navigation"> <span class="pull-left"> - {if $gGallery->mInfo.previous_image_id} + {if !empty( $gGallery->mInfo.previous_image_id )} <a href="{$gContent->getImageUrl($gGallery->mInfo.previous_image_id)|escape}"> {if $gBitSystem->isFeatureActive( 'gallerybar_use_icons' )} {booticon iname="fa-arrow-left" ipackage="icons" iexplain=previous} @@ -41,7 +41,7 @@ </span> <span class="pull-right"> - {if $gGallery->mInfo.next_image_id} + {if !empty( $gGallery->mInfo.next_image_id )} <a href="{$gContent->getImageUrl($gGallery->mInfo.next_image_id)|escape}"> {if $gBitSystem->isFeatureActive( 'gallerybar_use_icons' )} {booticon iname="fa-arrow-right" iexplain=next} diff --git a/templates/view_image.tpl b/templates/view_image.tpl index e808f89..c5b3dfe 100755 --- a/templates/view_image.tpl +++ b/templates/view_image.tpl @@ -1,5 +1,5 @@ {strip} -{if !empty($liberty_preview)} +{if empty($liberty_preview)} {include file="bitpackage:fisheye/gallery_nav.tpl"} {/if} @@ -25,7 +25,7 @@ <div class="image"> {include file=$gLibertySystem->getMimeTemplate('view',$gContent->mInfo.attachment_plugin_guid) attachment=$gContent->mInfo.image_file} {if $gBitSystem->isFeatureActive('fisheye_image_list_description') && $gContent->mInfo.data ne ''} - <p class="description">{$gContent->mInfo.parsed_data}</p> + <p class="description">{$gContent->mInfo.parsed_data|truncate:250:"..."}</p> {/if} </div> </div> <!-- end .body --> |
