Hi Zaphod,
I'm currently reviewing (quite in depth) Stripped 2 and I've encountered a problem with photo caption.
In picture.tpl, you use the core variable $SHOW_PICTURE_NAME_ON_TITLE which is exactly the same as your $stripped.showTitleOnBrowsePath. In my opinion, for Stripped, you should not take this core variable into account because you have an equivalent, with a checkbox on Stripped configuration screen.
Furthermore you use this core variable to set $showTitle to true/false. By the way, your $showTitle is much more a $showCaption currently. On my test gallery, I had $conf['show_picture_name_on_title'] = false; in my local configuration and it took me quite some time to understand why the caption was not displaying the description of my photo (actually I've tested several variables in picture.tpl).
May I suggest to replace:
{assign var='showTitle' value=false}
{if ($SHOW_PICTURE_NAME_ON_TITLE && (isset($COMMENT_IMG) || (($stripped.imageCaption != 'description') )))}
{assign var='showTitle' value=true}
{/if}by
{assign var='showTitle' value=false}
{if isset($COMMENT_IMG) and $stripped.imageCaption == 'description'}
{assign var='showTitle' value=true}
{/if}
{if isset($current.TITLE) and $stripped.imageCaption == 'title'}
{assign var='showTitle' value=true}
{/if}? (I can commit it if that suits you)
Offline
plg wrote:
In picture.tpl, you use the core variable $SHOW_PICTURE_NAME_ON_TITLE which is exactly the same as your $stripped.showTitleOnBrowsePath. In my opinion, for Stripped, you should not take this core variable into account because you have an equivalent, with a checkbox on Stripped configuration screen.
Is it exactly the same?
If so, I'll remove the option, as there is no need to duplicate piwigo options.
plg wrote:
Furthermore you use this core variable to set $showTitle to true/false. By the way, your $showTitle is much more a $showCaption currently. On my test gallery, I had $conf['show_picture_name_on_title'] = false; in my local configuration and it took me quite some time to understand why the caption was not displaying the description of my photo (actually I've tested several variables in picture.tpl).
May I suggest to replace:
I'll do the modification, as I've to check if the showTitleOnBrowsePath option is still necessary.
Thanks for the solution.
Offline
Zaphod wrote:
plg wrote:
In picture.tpl, you use the core variable $SHOW_PICTURE_NAME_ON_TITLE which is exactly the same as your $stripped.showTitleOnBrowsePath
Is it exactly the same?
If so, I'll remove the option, as there is no need to duplicate piwigo options.
No, keep yours, because the core setting can only be changed by local configuration not with an admin screen (maybe in 2.4, but not in 2.3). If we have this setting in [Administration > Configuration > Options > Display] in Piwigo 2.4, then yes it will be better to remove it from Stripped.
Offline