forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 plugins => Topic started by: Pyragony on October 28, 2018, 04:47:24 pm

Title: Sitemap Generator for cpg1.5.x
Post by: Pyragony on October 28, 2018, 04:47:24 pm
Hello
I hope I find help here.
The image search machine from Yandex requires the following entry in the sitmaps.

Quote
<Description> meta tags are missing

The <description> meta tag is either missing or incorrectly filled out on a number of pages. This could negatively affect how your site is presented in search results.

Where do I put the description best and what does the code look like?


Note:
Code: [Select]
<Description> blablablabla </description>
I ask for help  :'(
Title: Re: Sitemap Generator for cpg1.5.x
Post by: ron4mac on October 28, 2018, 05:36:06 pm
In your theme template.html file. Place it somewhere between <head> and </head>.
Title: Re: Sitemap Generator for cpg1.5.x
Post by: Pyragony on October 28, 2018, 06:08:49 pm
Thanks, I embedded it once. But in the created sitmaps it is not, as here in the example:


Code: [Select]
<url>
  <loc>http://www.example.com/dogs</loc>
  <description>Kommentar.</description>
  <changefreq>hourly</changefreq>
  <priority>1.00</priority>
   <image:image>
    <image:loc>http://www.example.com/image.jpg</image:loc>
  </image:image>
</url>
<url>
  <loc>http://www.example.com/cats</loc>
  <description>Kommentar.</description>
  <changefreq>hourly</changefreq>
  <priority>1.00</priority>
   <image:image>
    <image:loc>http://www.example.com/image.jpg</image:loc>
  </image:image>
</url>

I'll wait and see what Yandex says, but that can take up to 2 weeks.
Title: Re: Sitemap Generator for cpg1.5.x
Post by: Αndré on October 29, 2018, 03:31:01 pm
Please undo the change in template.hmtl. Instead, open plugins/sitemap_generator/generate.php, search for
Code: [Select]
<loc>and add something like
Code: [Select]
$sitemap .= '<Description> blablablabla </description>\n';below it.
Title: Re: Sitemap Generator for cpg1.5.x
Post by: Pyragony on October 29, 2018, 05:13:32 pm
@ Andre,

<loc> not found
Title: Re: Sitemap Generator for cpg1.5.x
Post by: Pyragony on October 29, 2018, 05:21:36 pm
Yandex answered quickly. You want the description in the sitmaps.
Title: Re: Sitemap Generator for cpg1.5.x
Post by: Αndré on October 31, 2018, 01:51:39 pm
As you mentioned the image search, I assume you want to add it to the pictures. If so, find
Code: [Select]
$urlpic->addChild('loc', $base.'/displayimage.php?pos=-'.$pid);and below, add something like
Code: [Select]
$urlpic->addChild('description', $title);or
Code: [Select]
$urlpic->addChild('description', $caption);
Title: Re: Sitemap Generator for cpg1.5.x
Post by: Pyragony on November 01, 2018, 04:50:04 am
@Andre

Thank you, I will test it.
At the moment I can not do recrawl at Yandex.
I'll call back,

Can or should one also write here in German?
Title: Re: Sitemap Generator for cpg1.5.x
Post by: Αndré on November 01, 2018, 03:05:18 pm
Here are the German support boards: http://forum.coppermine-gallery.net/index.php/board,125.0.html
Title: Re: Sitemap Generator for cpg1.5.x
Post by: Pyragony on November 02, 2018, 09:40:00 am
Both do not work. Google has just barked.

Quote
Ungültiges XML-Tag.
Dieses Tag wurde nicht erkannt. Beheben Sie bitte das Problem und reichen Sie die Daten erneut ein.

Yandex still lacks the meta tag <description>.

I have now manually edited my sitemaps, which of course takes some time.

It should look like this:

sitemaps_index.xml
Code: [Select]
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://dating-fraud.de/plugins/sitemap_generator/xml-sitemap.xsl"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <sitemap>
    <loc>https://dating-fraud.de/sitemaps/cat3-sitemap.xml</loc>
    <description>Scammer around the World</description>
    <lastmod>2018-10-29T18:26:56+01:00</lastmod>
  </sitemap>
  <sitemap>
    <loc>https://dating-fraud.de/sitemaps/cat4-sitemap.xml</loc>
    <description>Scammer around the World</description>
    <lastmod>2017-08-20T10:40:18+02:00</lastmod>   
    </sitemap>

in the other files (cat)

Code: [Select]
  <url>
    <loc>https://dating-fraud.de/index.php?cat=31</loc>
    <description>Scammer around the World</description>
    <lastmod>2013-07-27T01:14:17+02:00</lastmod>
    <changefreq>daily</changefreq>
    <priority>1</priority>
  </url>

Whether Yandex wants to have that for every bid, I do not know yet. I have to wait for the answer again.



Title: Re: Sitemap Generator for cpg1.5.x
Post by: Αndré on November 02, 2018, 12:05:53 pm
Unfortunately it doesn't help if you post how the sitemap should look like. Instead, we need to know how it currently looks. A link to your gallery would also be very helpful. Maybe the sitemap doesn't look like expected, as you haven't posted detailed enough which generated sitemap you want to change.

Just have a look at the generate.php file. There are several occurences of
Code: [Select]
addChild('loc'and each is responsible for different sitemaps.

It should look like this:

sitemaps_index.xml
Code: [Select]
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://dating-fraud.de/plugins/sitemap_generator/xml-sitemap.xsl"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <sitemap>
    <loc>https://dating-fraud.de/sitemaps/cat3-sitemap.xml</loc>
    <description>Scammer around the World</description>
    <lastmod>2018-10-29T18:26:56+01:00</lastmod>
  </sitemap>
  <sitemap>
    <loc>https://dating-fraud.de/sitemaps/cat4-sitemap.xml</loc>
    <description>Scammer around the World</description>
    <lastmod>2017-08-20T10:40:18+02:00</lastmod>   
    </sitemap>
Search for
Code: [Select]
$sitemap->addChild('loc', $base.'/sitemaps/cat'.$cid.'-sitemap.xml');
in the other files (cat)

Code: [Select]
  <url>
    <loc>https://dating-fraud.de/index.php?cat=31</loc>
    <description>Scammer around the World</description>
    <lastmod>2013-07-27T01:14:17+02:00</lastmod>
    <changefreq>daily</changefreq>
    <priority>1</priority>
  </url>
Search for
Code: [Select]
$urlcat->addChild('loc', $base.'/index.php?cat='.$cid);
Title: Re: Sitemap Generator for cpg1.5.x
Post by: roadrunner2000 on September 20, 2020, 12:51:58 pm
It would be nice if you updated it to version 1.6.