show_metadata=true vs. noindex,nofollow logic in picture.php #645

Closed
opened 2026-10-05 00:08:56 +02:00 by adam · 6 comments
Owner

In local/config/config.inc.php a site admin can enable displaying metadata by default. Also theme devolpers might decide to set this to true via pwg_set_session_var.

If set to true, the logic in picture.php adds the robots noindex,nofollow meta tag, which basically disables indexing of the picture pages. This does make sense if show_metadata=false by default, so the picture page doesn't get indexed twice following the "toggle metadata" button.

If set to true by default, that logic should acually be reversed. Index by default (with metadata then), noindex,nofollow when following the link to the page without metadata. Implementing this sounds overly complicated, though. We have a semi-hidden config.inc.php option, user interaction with a button press , maybe a forced session var from a theme, etc.

To keep things simple, a site admin should be able to set this in the admin panel (show metadata always, never, only for authenticated users) and the test in picture.php should be removed. Theme developers still can implement the toggle button using jQuery show/hide, CSS or similar.

References:
http://piwigo.org/forum/viewtopic.php?id=28008
https://github.com/tkuther/piwigo-bootstrap-darkroom/issues/64

In local/config/config.inc.php a site admin can enable displaying metadata by default. Also theme devolpers might decide to set this to true via pwg_set_session_var. If set to true, the logic in picture.php adds the robots noindex,nofollow meta tag, which basically disables indexing of the picture pages. This does make sense if show_metadata=false by default, so the picture page doesn't get indexed twice following the "toggle metadata" button. If set to true by default, that logic should acually be reversed. Index by default (with metadata then), noindex,nofollow when following the link to the page without metadata. Implementing this sounds overly complicated, though. We have a semi-hidden config.inc.php option, user interaction with a button press , maybe a forced session var from a theme, etc. To keep things simple, a site admin should be able to set this in the admin panel (show metadata always, never, only for authenticated users) and the test in picture.php should be removed. Theme developers still can implement the toggle button using jQuery show/hide, CSS or similar. References: http://piwigo.org/forum/viewtopic.php?id=28008 https://github.com/tkuther/piwigo-bootstrap-darkroom/issues/64 <!-- github-sync-id:232808191 -->
adam closed this issue 2026-10-05 00:08:56 +02:00
Author
Owner

Hi,
Any update on this? My picture pages are not indexed....

Hi, Any update on this? My picture pages are not indexed.... <!-- github-comment-id:456964530 -->
Author
Owner

@tkuther @flop25 @plegall : Can you look at my pull request and give me input on the change. Tested (and keeping it) using bootstrap darkroom and the new config set to true -> Google sees my picture pages now ;)

How shall we continue?

PS: Done these changes without code formatter, so I hope I got your code style

@tkuther @flop25 @plegall : Can you look at my pull request and give me input on the change. Tested (and keeping it) using bootstrap darkroom and the new config set to true -> Google sees my picture pages now ;) How shall we continue? PS: Done these changes without code formatter, so I hope I got your code style <!-- github-comment-id:457329353 -->
Author
Owner

Any update on this?

Any update on this? <!-- github-comment-id:612452545 -->
Author
Owner

Asking the same thing : Any update on this ?

I found some message in forum about this matter and Stripped theme dating from 2011.
May be it could be time to test the commit ?
Thanks

Asking the same thing : Any update on this ? I found some message in forum about this matter and Stripped theme dating from 2011. May be it could be time to test the commit ? Thanks <!-- github-comment-id:1003705737 -->
Author
Owner

Any update on this topic ? Thanks

Any update on this topic ? Thanks <!-- github-comment-id:1824923418 -->
Author
Owner

Following this issue we realised that because some themes always display metadata so the no index no follow was always added. Rather than base the adding of the meta tag on the show_metadata variable stored in the session, we only look at the url, so the no follow is not always present for the themes that decide to always show metadata

Following this issue we realised that because some themes always display metadata so the no index no follow was always added. Rather than base the adding of the meta tag on the show_metadata variable stored in the session, we only look at the url, so the no follow is not always present for the themes that decide to always show metadata <!-- github-comment-id:2671243978 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#645