I just figured section targeting tags are also included in RSS feeds generated by the node module. Would it be possible to remove them?

Maybe by not generating the tags when the URL ($_GET['q']) contains 'rss.xml'?

Comments

kbahey’s picture

What is the problem with them being present in feeds?

markus_petrux’s picture

If someone reads your feeds, could displayed them on their site, including those tags, which may affect them if they also use GoogleAds.

kbahey’s picture

All those tags do is ask google to give more weight to real content. Google will not ignore the rest of the page, just put more emphasis on real content.

In any case, they can be turned off completely if you want.

I cannot check if $_GET['q'] is rss.xml, since this is changing every release as well as affected by other modules (node/feed, node-path-alias/feed if you use pathauto, ...etc.)

markus_petrux’s picture

I know, and I knew it was not easy, but... hmmm... maybe you could add an option to allow the site admin specify which pages to use this feature, something like the block settings "Show block on specific pages" options?

Not really critical though.

mgifford’s picture

Version: 4.7.x-1.x-dev » 4.6.x-1.x-dev

Just to clarify this, in feeds like http://poped.org/node/feed

You get the following:


Oxfam Canada's Workshop Resource Materials

http://poped.org/oxfam

This section contains ready-to-deliver, student-participation workshops, mostly 60-70 minutes in duration. Many are self-contained; most outside material that is referred to within these workshops can be found in the Workshop Resource Materials section.

visit Oxfam Canada's Workshop Resource Materials (0)

http://creativecommons.org/licenses/by-sa/2.0/ca/
Development Education

Sun, 29 Jan 2006 16:06:55 -0500

Would probably be better to strip out these tags from the rss:

&&

$items = str_replace(array('

', '

'), array(''', $items);

Not sure where exactly this should be added, but it would produce better rss. Everything in the RSS should be of the same quality I would think.

Mike

mgifford’s picture

Version: 4.6.x-1.x-dev » 4.7.x-1.x-dev

Sorry.. Switched versions.. i was running into what I think was the same problem on the 4.6 code. Switching it back now.

Mike

markus_petrux’s picture

It might be interesting to see what happens with this issue:
http://drupal.org/node/41703

If the nodeapi('view') hook could tell if it's about to build a RSS feed, then you could not insert "section targeting tags".

drewish’s picture

budda’s picture

I too would like this issue to be resolved in a future revision of the module. The tags are really not needed.

markus_petrux’s picture

I cannot check if $_GET['q'] is rss.xml, since this is changing every release as well as affected by other modules (node/feed, node-path-alias/feed if you use pathauto, ...etc.)

Maybe you could use the same trick used by the devel module hook_exit().

  if (function_exists('drupal_get_headers') && strstr(drupal_get_headers(), 'xml')) {
    $is_xml = TRUE;
  };
markus_petrux’s picture

Nope, it doesn't work, headers have not been sent, yet.

Maybe it would be nice to propose a new argument for nodeapi/view to reflect it is about feeds or not?

drewish’s picture

could you take a look at the patch on http://drupal.org/node/41703, i think it would give you the flexibility to modify the node's body when it's being viewed as an rss item.

darren oh’s picture

Status: Active » Closed (fixed)

Out of date.

drewish’s picture

Status: Closed (fixed) » Active

funny you should mention that. #41703 just been applied to 4.7. now you could fix this.

jcnventura’s picture

Status: Active » Closed (fixed)

This behaviour doesn't show up in Drupal 5 or 6.. Drupal 4.7 is no longer supported, so I am closing this issue.

edvanleeuwen’s picture

Version: 4.7.x-1.x-dev » 6.x-1.2

I have reopened this issue as I am experiencing this behaviour with 6.x.

One website (www.rsvnet.nl) is creating an RSS-feed which is used by another (www.covs.org) to display. Both are Drupal 6.x sites. The one consuming the feed is not only displaying the google tag, but the rest of the text has lost formatting as well.

edvanleeuwen’s picture

Status: Closed (fixed) » Active
edvanleeuwen’s picture

Status: Active » Closed (fixed)

AdSense does not seem to be the cause (see http://drupal.org/node/666930). Closing again.