Piwigo / piwigo-bootstrap-darkroom

A mobile-ready and feature-rich theme for Piwigo photo gallery, based on Bootstrap 4
Apache License 2.0
83 stars 40 forks source link

Thumbnail captions ALWAYS display after 2.5.12 #342

Open jradwan opened 1 year ago

jradwan commented 1 year ago

I just noticed that in v2.5.12, the image captions are appearing on the thumbnail page even though the "Show image caption" option is not checked. I was able to work around this for now by adding this to my config.inc.php (via local files editor):

$conf['show_thumbnail_caption'] = false;

It seems like even when the "Show image caption" option is NOT checked, it's still evaluating to true ({if $SHOW_THUMBNAIL_CAPTION}) in template/thumbnails.tpl.

mozzenior commented 1 year ago

The cause seems to be that the code checks $smarty.cookies.view != 'list' to decide whether to add d-none to <div class="card-body">. This change was added in commit 3dbc47d.

Manually switching the view mode at least once would create the cookie.

FWIW, to recreate this issue, uncheck Show image caption then open the page in Incognito mode (assume the default view mode is grid mode).

Apache84 commented 8 months ago

I think I have the same problem (v2.5.18).

$conf['show_thumbnail_caption'] = false;

Adding jradwan's code in themeconf.inc.php fixed the problem. Thank you for that !