i haven't seen a simple answer to this question anywhere:

from where are the drupal html headers generated, specifically the autodiscovery URL?

i need to change this:

<link rel="alternate" type="application/rss+xml" title="RSS" href="http://blog.machinehasnoagenda.com/feed" />

to this:

<link rel="alternate" type="application/rss+xml" title="RSS" href="http://feeds.feedburner.com/machinehasnoagenda" />

i guess this means replacing a variable with the static information above - but i've searched relentlessly and can't find where to do this ... shouldn't it be set in xtemplate file (i got the code above from "view source" in firefox)?

Comments

mrmachine’s picture

i haven't seen a simple answer to this question anywhere

well, here it is:

1. open modules/node.module in your editor of choice.

2. at around line 1619, find this code:

  if (db_num_rows($result)) {
    drupal_add_link(array('rel' => 'alternate',
                          'type' => 'application/rss+xml',
                          'title' => 'RSS',
                          'href' => url('node/feed', NULL, NULL, TRUE)));

and replace it with something like this:

  if (db_num_rows($result)) {
    drupal_add_link(array('rel' => 'alternate',
                          'type' => 'application/rss+xml',
                          'title' => 'machinehasnoagenda - blog',
                          'href' => ('http://feeds.feedburner.com/machinehasnoagenda')));

5. you're done!

this works for me. i have no idea if this is the proper way to do it.

http://www.machinehasnoagenda.com

zach harkey’s picture

What about multi-site setups where many domains share the same module? I can't hardcode the feedburner href because all the sites will inherit this.

-zach
------------------------
harkey design

: z

zach harkey’s picture

Here is another solution that can be done at the template level.

In your page.tpl.php, replace

<?php print $head ?>

with

<?php print str_replace('http://example.com/node/feed', 'http://feeds.feedburner.com/example', $head) ?>

I think it's better because it doesn't require hacking node.module and also works for multi-site setups.

-zach
------------------------
harkey design

: z

danubetech’s picture

This works great. For those you new to PHP (or rusty like me) here's a link on how to get this to work for mult-sites using arrays:

http://us2.php.net/manual/en/function.str-replace.php#60628

xybermatthew’s picture

This worked like a charm in v 5.x! Now I just need to figure out how to get the rss feed link onto all pages.

drupal-is-OK’s picture

Any luck with this? i've not seen how to change the rss logo a tythe bottom of my menu on each page to display my feedburner rss vs. my drupal one

uofl forum

tuti’s picture

What if you have different feed for different pages?

How do you add another internal drupal feed link that I want to replace with another feedburner link to that feed?

dave reid’s picture

Instead of hacking core, the recommended solution is to use the FeedBurner module.