KB

RSS Feeds with Joomla

If you provide an RSS feed on your blog, you might as well use FeedBurner so that you can get some stats. 

  1. Find out what your feed URL is, eg. mine is http://mundy.net.au/feed/rss
  2. Go to http://feedburner.google.com and register, point it to your feed URL. They will give you a new feed URL, eg. mine is http://feeds.feedburner.com/mundy
  3. Open up your template's index.php file and add the following line near the end of the <head> section:
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="http://feeds.feedburner.com/mundy" />

To remove the extra RSS links from the browser address bar and force people to use FeedBurner, there are five files you'll need to edit. They are:

  • components/com_content/views/frontpage/view.html.php
  • components/com_content/views/category/view.html.php
  • components/com_content/views/section/view.html.php
  • components/com_weblinks/views/category/view.html.php
  • components/com_contact/views/category/view.html.php

 

Comment out the two lines that call addHeadLink by putting a "//" at the start of the line, like so:

//add alternate feed link
if($params->get('show_feed_link', 1) == 1)
{
$link = '&format=feed&limitstart=';
$attribs = array('type' => 'application/rss+xml', 'title' => 'RSS 2.0');
//$document->addHeadLink(JRoute::_($link.'&type=rss'), 'alternate', 'rel', $attribs);
$attribs = array('type' => 'application/atom+xml', 'title' => 'Atom 1.0');
//$document->addHeadLink(JRoute::_($link.'&type=atom'), 'alternate', 'rel', $attribs);
}