Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: 1 2 3 [4]   Go Down

Author Topic: Add Description Meta to Gallery <HEAD> and rel=canonical to META pages  (Read 89761 times)

0 Members and 1 Guest are viewing this topic.

flapane

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 251
    • Flavio's page
Re: Add Description Meta to Gallery <HEAD> and rel=canonical to META pages
« Reply #60 on: October 13, 2014, 11:55:07 pm »

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

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 251
    • Flavio's page
Re: Add Description Meta to Gallery <HEAD> and rel=canonical to META pages
« Reply #61 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.
There's a typo in the config panel: cannonical instead of canonical.

Joe Carver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1545
  • aka 'i-imagine'
    • Home Page

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" />


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

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 251
    • Flavio's page
Re: Add Description Meta to Gallery <HEAD> and rel=canonical to META pages
« Reply #63 on: October 18, 2014, 01:34:33 pm »

Thanks for your time.  :)

flapane

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 251
    • Flavio's page

As for the sanitation thing, maybe it could be useful to other users:
Line 18 of codebase.php
Code: [Select]
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;
}

whats_up_skip

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 52

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.
Logged

Lon

  • Coppermine newbie
  • Offline Offline
  • Posts: 9

As for the sanitation thing, maybe it could be useful to other users:
Line 18 of codebase.php
Code: [Select]
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?
Logged

Joe Carver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1545
  • aka 'i-imagine'
    • Home Page

Not sure what / how you mean.

Do you have a link / example?

tomskafo

  • Coppermine newbie
  • Country: ru
  • Offline Offline
  • Gender: Male
  • Posts: 16
    • Fialka

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

tomskafo

  • Coppermine newbie
  • Country: ru
  • Offline Offline
  • Gender: Male
  • Posts: 16
    • Fialka

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
Pages: 1 2 3 [4]   Go Up
 

Page created in 0.02 seconds with 20 queries.