Google's current defines a few tags that are not currently represented in the Google News Sitemap generated by this project.

http://www.google.com/support/news_pub/bin/answer.py?answer=74288

Adding this is is pretty straightforward - additional content appends in the module, and a few extra fields on the admin interface.

I've got patch (ish) that I could contribute if anyone is interested. In the interim, add the following after the publication closure tag:

$content .= 'PressRelease,OpEd,Opinion,Blog';
$content .= 'your keywords,comma separated';

Comments

jmbarlow’s picture

Oops - forgot the code tags

Should be:

$content .= '<n:genres>PressRelease,OpEd,Opinion,Blog</n:genres>';
$content .= '<n:keywords>your keywords,comma separated</n:keywords>';

Ends up looking like this google news map from one of my clients, Gerard Associates.

kentr’s picture

+1.

I'd like to see the patch.

I envision this as coming from a taxonomy vocabulary - perhaps there could be a configuration option to specify which vocabulary.

For keywords, see #748098: Keywords not being picked up?

drupalgideon’s picture

And the access tag too, but not sure how this could be implemented. Perhaps check the value of a CCK field on a node or if the Premium or Node Option Premium module is installed and content is premium.

Perhaps the best way would be for a hook to be added so we can do our own additions (keywords, genre etc) before the sitemap output is generated.

koelneruwe’s picture

Hi,
I am a little bit stupid about drupal (newbie). Where do I have to write the " $content .= 'PressRelease,OpEd,Opinion,Blog';
$content .= 'your keywords,comma separated';" ?

Thx for your help.
Uwe

greenreaper’s picture

StatusFileSize
new2.01 KB

This can be done simply if you only have one taxonomy to worry about - for example, categories/tags like 'reviews', 'opinions' and 'announcements' which indicate the genre for news sitemap purposes.

I'm throwing up what I hacked together in case people want to play with it. It also grabs a list of keywords but it does not do any filtering by vocabulary. The patch mentioned in #2 looks to be a more robust method of generating keywords.

This code will not work with D7 as it uses taxonomy_node_get_terms; it's probably trivial to fix, but I don't have it to test.

liquidcms’s picture

Title: Adding genre and publication tags to Google News Sitemap » Numerous tags missing from Google News Sitemap
Version: 6.x-1.4 » 7.x-1.x-dev
Priority: Minor » Normal

over a year old so figured i would hijack this thread...

as per original posting there are numerous tags missing from the xml.

bumping to D7, and from what i can see the following tags are missing:
- access
- geo_location
- genres
- stock_tickers
- keywords

would decent approach not simply be to add global admin fields for these and then support Tokens to fill?

in that way they could be token filled with terms from some vocab (keywords), access level or status text (access), possibly custom user created token for things like genres, static text for tickers

I will likely give this a shot; but please let me know if i am missing something like perhaps these are already implemented and i just haven't found the ui for it.

liquidcms’s picture

Status: Active » Needs review
StatusFileSize
new4.8 KB

this adds support for the additional added tags:

  • access
  • genres
  • keywords
  • geo_location
  • stock_tickers

using the token method i mentioned above.

muqti’s picture

Status: Needs review » Patch (to be ported)

Excellent work mate. Was looking for it from a long long time. Just glad that someone stepped up.

damienmckenna’s picture

Status: Patch (to be ported) » Needs review
StatusFileSize
new6.3 KB

The patch in #7 is a great step in the right direction, this version is tidied up a bit, separates the list of tags into its own function that is wrapped in drupal_alter(), changes the 'access' tag to a selector, and adds variable_del() items to the uninstall script.

damienmckenna’s picture

Status: Needs review » Needs work

The Genres tag should really be updated to use the list from http://support.google.com/news/publisher/bin/answer.py?hl=en&answer=93992.

damienmckenna’s picture

Status: Needs work » Needs review
StatusFileSize
new7.38 KB

This is a reroll of #9 that adds a selector for the Genre tag and has other improvements, particularly around tag descriptions.

Status: Needs review » Needs work

The last submitted patch, googlenews-n832440-11.patch, failed testing.

damienmckenna’s picture

Status: Needs work » Needs review

#11: googlenews-n832440-11.patch queued for re-testing.

damienmckenna’s picture

Status: Needs review » Fixed

Committed, thanks for all the help everyone.

damienmckenna’s picture

Status: Fixed » Patch (to be ported)

Needs to be backported to D6.

damienmckenna’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev
damienmckenna’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Issue summary: View changes
Status: Patch (to be ported) » Fixed

The D6 version is no longer supported. Sorry folks.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.