#1 2020-06-28 12:46:09


‘Sort order’ and ‘Photo sizes’ icons without link for guest


When a user opens the thumbs page with images (index.tpl) the icons for ‘Sort order’ and ‘Photo size’ are shown, but with user 'guest' these icons have no links and in fact are dead. The guest sees the option but cannot use it.
On the picture page (picture.tpl) the ‘Photo size’ icon works well, also for ‘guest’ and it gets an on-click event added to <a id="derivativeSwitchLink" title="{'Photo sizes'|@translate}" class="pwg-state-default pwg-button" rel="nofollow"> effectively opening the ‘derivativeSwitchBox’

The themes ‘elegant’ and ‘Pure’ both have the same issue, so I assume it has to do with the Piwigo core.
I tried to locate where and when this ‘on-click event’ is being set, both for “sortOrderLink” and “derivativeSwitchLink”, in order to find out why it is not set for the user ‘guest’ on the thumbs page only.
I am not familiar with JS and JQuery, maybe that’s why I am left clueless.
Can somebody help me back on track here?

For the time being I removed the frustrating ‘dead’ icons by adding the condition !is_a_guest() in ../piwigo/template-extension/index.tpl@L15 and @L32:


{if !empty($image_orders) and !is_a_guest()}
 <li>{strip}<a id="sortOrderLink" title="{'Sort order'......

{if !empty($image_derivatives) and !is_a_guest()}
  <li>{strip}<a id="derivativeSwitchLink" title="{'Photo sizes'.....

•    Piwigo 2.10.2 Theme Elegant and Pure_clear_blue
•    Operating system:
Linux ClearOS release 7.7.2
•    PHP: 7.1.30
•    MySQL: 5.5.64-MariaDB
•    Graphics Library: External ImageMagick 6.7.8-9



Board footer

Powered by FluxBB

github twitter newsletter Donate © 2002-2024 · Contact