Advanced search  

News:

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

Pages: [1]   Go Down

Author Topic: Sitemap Generator for cpg1.5.x  (Read 1266 times)

0 Members and 1 Guest are viewing this topic.

Pyragony

  • Coppermine newbie
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 6
Sitemap Generator for cpg1.5.x
« 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  :'(
Logged

ron4mac

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Posts: 1005
Re: Sitemap Generator for cpg1.5.x
« Reply #1 on: October 28, 2018, 05:36:06 pm »

In your theme template.html file. Place it somewhere between <head> and </head>.
Logged

Pyragony

  • Coppermine newbie
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 6
Re: Sitemap Generator for cpg1.5.x
« Reply #2 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.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15577
Re: Sitemap Generator for cpg1.5.x
« Reply #3 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.
Logged

Pyragony

  • Coppermine newbie
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 6
Re: Sitemap Generator for cpg1.5.x
« Reply #4 on: October 29, 2018, 05:13:32 pm »

@ Andre,

<loc> not found
Logged

Pyragony

  • Coppermine newbie
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 6
Re: Sitemap Generator for cpg1.5.x
« Reply #5 on: October 29, 2018, 05:21:36 pm »

Yandex answered quickly. You want the description in the sitmaps.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15577
Re: Sitemap Generator for cpg1.5.x
« Reply #6 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);
Logged

Pyragony

  • Coppermine newbie
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 6
Re: Sitemap Generator for cpg1.5.x
« Reply #7 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?
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15577
Re: Sitemap Generator for cpg1.5.x
« Reply #8 on: November 01, 2018, 03:05:18 pm »

Logged

Pyragony

  • Coppermine newbie
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 6
Re: Sitemap Generator for cpg1.5.x
« Reply #9 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.



Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15577
Re: Sitemap Generator for cpg1.5.x
« Reply #10 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);
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 21 queries.