I want to have a feed that has all the posts on my site, not just the blogs.

For example all the blog entries, movie reviews, articles and stories that I post.

Is this possible?

Comments

bjornarneson’s picture

You can configure to have every post promoted to the front page. Then all your content is in the feed at http://example.com/node/feed.

--
Bjorn | choirgeek.com

gerd riesselmann’s picture

If you do not want all your posts beeing promoted to the front back and you do not want a feed for all the blog posts (this is the all post feed may replace your current feed), then you may change the node.module.

Find the function node_feed in file node.module and look for the following SQL statement:

$nodes = db_query_range(db_rewrite_sql('SELECT n.nid FROM {node} n WHERE n.promote = 1 AND n.status = 1 ORDER BY n.created DESC'), 0, 15);

Change it to

$nodes = db_query_range(db_rewrite_sql('SELECT n.nid FROM {node} n WHERE n.status = 1 ORDER BY n.created DESC'), 0, 15);

Now the default feed will contain each and every entry. Attention! It will also include pages!

------------------
Gerd Riesselmann
www.gerd-riesselmann.net

eafarris’s picture

Using the hack that Gerd told me about over at http://drupal.org/node/36819, this is possible using a node of type "page" with the PHP content type:

$nodes = db_query_range(db_rewrite_sql('SELECT n.nid FROM {node} n WHERE n.status = 1 ORDER BY n.created DESC'), 0, 15);
node_feed($nodes);

exit();

Your full feed would then be available as that page, ie., /node/$nid.

Be very careful with this, though, as you'll have created a Drupal page which does not have all of the normal headers, blocks, etc. on it. You'll have to edit the node by appending "/edit" onto the end, or by going through the administration menus.

Ugly, but works.

Cheeky’s picture

Thanks, that worked a treat.

I don't create any static pages these days so it doesn't matter. And I could probably hack the SQL further to exclude some types of node.

All Things Cheeky