Add Description Meta to Gallery <HEAD> and rel=canonical to META pages - Page 4 Add Description Meta to Gallery <HEAD> and rel=canonical to META pages - Page 4
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Add Description Meta to Gallery <HEAD> and rel=canonical to META pages

Started by Joe Carver, April 19, 2010, 07:16:45 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

flapane

Hi,
I've just noticed that it could be interesting to sanitize the description using PHP. Sometimes I use the double quotes in the description, thus breaking the description meta tag.  :)
Flapane
www.flapane.com

Gallery
www.gallery.flapane.com

flapane

Also, I noticed that no rel=canonical tag is added anywhere. I tried both pid/album+pid options.
There's a typo in the config panel: cannonical instead of canonical.
Flapane
www.flapane.com

Gallery
www.gallery.flapane.com

Joe Carver

Quote from: flapane on October 14, 2014, 11:58:30 AM
Also, I noticed that no rel=canonical tag is added anywhere. I tried both pid/album+pid options.
It is only for meta album pictures/pages to tell robots the page is related to the non-meta page.

On this page: http://www.flapane.com/gallery/displayimage.php?album=topn&cat=0&pid=1234#top_display_media
(Top Viewed)

You will find this in the <head>
Quote<link rel="canonical" href="http://www.flapane.com/gallery/displayimage.php?pid=1234" />


Quote from: flapane on October 14, 2014, 11:58:30 AM
There's a typo in the config panel: cannonical instead of canonical.
Thanks for that and the sanitize suggestion - if time allows for a  next release, they will be included.

flapane

Flapane
www.flapane.com

Gallery
www.gallery.flapane.com

flapane

As for the sanitation thing, maybe it could be useful to other users:
Line 18 of codebase.php
function char_convert($str_a) {  // convert some characters if sanitized in db entry
$str_a = str_replace(array('&amp;', '&quot;', '&lt;', '&gt;', '&#039;', '&#39;' , '_' , '-', '"'), array('&', '"', '<', '>', "'", "'", '  ', '  ', '') ,$str_a);
return  $str_a;
}
Flapane
www.flapane.com

Gallery
www.gallery.flapane.com

whats_up_skip

Joe I just want to thank you for you time and effort with this plugin. You have even produced some quality documentation to go with it. I think it provides some of the much needed SEO for Coppermine Gallery.

Given the work you have done, it would be trivial to add schema data markup to further improve the SEO performance. If you aren't familiar with schema, I can provide the information of what additional markup would be required.

I have wondered about a few other aspects of the display image page that Google might still misinterpret. I know the <H1> and <H3> have been demphasized by Google, but "on page" the Gallery Title name is still the largest text and the gallery description is the first descriptive text on the page. This leaves the picture/media title and description much further down the page, meaning Google is less likely to weight on them. I have wondered if the H1 and largest text should be the picture/media title. Then the H3 is the picture description, with the Gallery description after this. Surely this would improve the uniqueness of the page and emphasis the content better.

Lon

Quote from: flapane on March 12, 2015, 01:07:00 PM
As for the sanitation thing, maybe it could be useful to other users:
Line 18 of codebase.php
function char_convert($str_a) {  // convert some characters if sanitized in db entry
$str_a = str_replace(array('&amp;', '&quot;', '&lt;', '&gt;', '&#039;', '&#39;' , '_' , '-', '"'), array('&', '"', '<', '>', "'", "'", '  ', '  ', '') ,$str_a);
return  $str_a;
}


Is there a reason the title field would still be showing these characters?

Joe Carver


tomskafo

Need such a plugin for gallery 1.6
Can anyone help me with this?

tomskafo

Google and Yandex want a canonical address on each page. Yandex directly writes me: "Canonical address is not specified."
A canonical URL lets you tell search engines that certain similar URLs are actually the same: https://yoast.com/rel-canonical/
How can I indicate the correct canonical link on every page?
Need such a plugin for gallery 1.6