Google News requires the tag publication says the Google Webmaster Tools.

Here is the newsmap-definition from google:
http://www.google.com/support/news_pub/bin/answer.py?hl=de&answer=74288

this says, that <publication_name>, <publication_date> and <title> are required.

<publication_date> is included in xmlsitemap_node-module.

for publication_name and title you have to patch the file
xmlsitemap/xmlsitemap_node.module

add in line 427

$query->add_field('title', 'node');</code>

replace line 506ff:

   $output .= '  <url>'."\n";
   $output .= '    <loc>'. xmlsitemap_url('node/'. $node->nid, $node->alias, NULL, NULL, TRUE) .'</loc>'."\n";
   $output .= '    <lastmod>'. gmdate('Y-m-d\TH:i:s+00:00', $lastmod) .'</lastmod>'."\n";
   $output .= '    <changefreq>'. _xmlsitemap_frequency(xmlsitemap_node_frequency($node)) .'</changefreq>'."\n";
   $output .= '    <priority>'. number_format(xmlsitemap_node_priority($node), 1) .'</priority>'."\n";
   $output .= '    <news:news>'."\n";
   $output .= '      <news:publication>'."\n";
   $output .= '        <news:name>YOURSITENAME</news:name>'."\n";
   $output .= '        <news:language>YOURLANGUAGE(e.g. en)</news:language>'."\n";
   $output .= '      </news:publication>'."\n";
   $output .= '      <news:title>'. htmlspecialchars ($node->title,ENT_QUOTES,UTF-8) .'</news:title>'."\n";
   $output .= '      <news:publication_date>'. gmdate('Y-m-d\TH:i:s+00:00', $node->created) .'</news:publication_date>'."\n";
   $output .= '    </news:news>'."\n";
   $output .= '  </url>'."\n";

Google recommends futher the keyword-tag.

It would be great to give the possibility to add News-Publication-Name and -Language to the Module-GUI and add the keywords out of taxonomy terms.

Best regards

Comments

jan kellermann’s picture

Title: Google requires the tag publication and other » Google News requires the tag publication and other
jan kellermann’s picture

jan kellermann’s picture

Notification from webmaster-tools:

Deprecated Sitemap format
Your Sitemap uses a deprecated News format. Support for this format will disappear shortly, at which point your Sitemap will be rejected. Please update to the new format, which involves attaching a <publication> tag and other relevant tags to each url in your Sitemap.

dave reid’s picture

Status: Active » Fixed
jan kellermann’s picture

Status: Fixed » Active

In Module googlenews you are not able to customize the news-xml by view. So the module are not interchangeable. So please fix or merge code what should be no problem at all. Thank you.

Anonymous’s picture

Status: Active » Closed (won't fix)
  • You've requested a new feature for a version that has a frozen feature set.
  • While the feature is interesting, I don't see this as the responsibility of xmlsitemap.
  • Perhaps the request should be to add a hook to modify the URL tag with modified data.