Announcement

#1 2022-06-11 14:31:07

John.B
Member
2016-03-27
35

noindex, nofollow

Hello/Hi/Greetings,

I have a 'little' problem with the entry:

<meta name="robots" content="noindex,nofollow"> in Piwigo 12.2.0

It causes that my photos not to be scanned by Google.

This entry is created in the picture.php file by the following rule:

if ( $metadata_showable and pwg_get_session_var('show_metadata') )
{
  $page['meta_robots']=array('noindex'=>1, 'nofollow'=>1);
}


Trigger is the entry:

pwg_set_session_var('show_metadata', true);

in my theme 'stripped', in the file 'themeconf.inc.php'.

OK, I can modify the php-files - but this is not the right way.

Is it possible to change the entry "noindex,nofollow" by a command in the file "local/config/config.inc.php" so that Google can scan the page?

Or is there another way to solve the problem?

Offline

 

#2 2022-06-11 14:56:01

Katryne
Member
2016-12-03
179

Re: noindex, nofollow

Hello !
Have you tried the plugin Meta ? There, you can specify values for meta robots. I chose : all.
https://piwigo.org/ext/extension_view.php?eid=220


https://photos.revestou.fr/  v.12.2 - https://dardennes.revestou.fr/ v.11.5 - http://photos.katrynou.fr/ v.11.5 https://album.chauvigne.info/ v.12.2
Système d'exploitation: Linux - Hébergeur 1&1-Ionos PHP: 7.4.29 - MySQL: 5.7.38
Bibliothèque graphique: External ImageMagick 6.9.10-23

Offline

 

#3 2022-06-11 15:43:11

John.B
Member
2016-03-27
35

Re: noindex, nofollow

Katryne wrote:

Hello !
Have you tried the plugin Meta ?

Hi Katryne,

Sorry, I can't see how I can change a system default setting with "meta".

I myself have used "meta" in the past, but I tend to use as few plugins as possible.

I have my meta data all defined via the my-stripped-header.tpl file.

But now I want to change a default system setting (noindex).

Offline

 

#4 2022-06-11 15:55:12

Katryne
Member
2016-12-03
179

Re: noindex, nofollow

Noindex, nofollow is a directive for indexing robots.
If you want robots to index your site, you have to modify the directive. This is the way to do it.

I used the plugin meta, modified the meta directive for robots and now for all my site, I can see in source mode :

Code:

<meta name="robots" content="all">

See this site: https://dardennes.revestou.fr/

What else would you want ?

I do not do this for all my piwigos, only for the ones I choose to broadcast, others sites are more discreet and altough public, not indexed.


https://photos.revestou.fr/  v.12.2 - https://dardennes.revestou.fr/ v.11.5 - http://photos.katrynou.fr/ v.11.5 https://album.chauvigne.info/ v.12.2
Système d'exploitation: Linux - Hébergeur 1&1-Ionos PHP: 7.4.29 - MySQL: 5.7.38
Bibliothèque graphique: External ImageMagick 6.9.10-23

Offline

 

#5 2022-06-11 16:48:55

John.B
Member
2016-03-27
35

Re: noindex, nofollow

Thanks for your info. But that does not solve the problem. There are obviously certain combinations with different theme and show Metadata that trigger a "noindex".

See here:

https://piwigo.org/forum/viewtopic.php?id=27119
https://de.piwigo.org/forum/viewtopic.php?id=1383

[Github] Piwigo issue #698
[Github] piwigo-bootstrap-darkroom issue #64


To solve the problem I have in "my_header.tpl" the entry:

{if not empty($head_elements)}
    {foreach from=$head_elements item=elt}{$elt}
    {/foreach}
{/if}



changed as follows:



{if not empty($head_elements)}
{foreach from=$head_elements item=elt}               
{strip}
  {if $elt|strstr:"noindex,nofollow"} {continue}{/if}
  {$elt}
{/strip}
{/foreach}
{/if}


Thanks to "WuppiGER" ;-)

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2022 · Contact