JoomlaWorks

Member Dashboard
  • Home
  • Extensions
    • Commercial
      • Frontpage Slideshow
      • K2 Plugin for sh404SEF
      • Simple Image Gallery Pro
      • SocialConnect
    • Free
      • K2
      • AllVideos
      • DISQUS Comments for Joomla!
      • IAKI (Import As K2 Image)
      • Quick Menu (for Joomla 4)
      • Simple Image Gallery
      • Simple RSS Feed Reader
    • Free On Github
      • Akismet for Kunena
      • Fill It Up
      • K2 Example Plugin
      • K2 Links for JCE
      • Rebuild K2 Image Cache (CLI utility for K2)
      • TinyLetter Subscribe
      • URL Normalizer
      • User Extended Fields for K2
  • Templates
    • Commercial Templates
      • Anagram
      • Archetype
      • BusinessOne
      • Ibento
      • Janaro
      • Kiji
      • Matchbox
      • nuMuzik
      • RadioWave
      • Toreda
    • Free Templates
      • nuModusVersus
      • Takai
  • Demos
    • Joomla Extension Demos
    • Joomla Template Demos
    • WordPress Plugin Demos
  • Labs
    • Web Apps
      • JSON 2 JSONP
      • Feed Reader (bookmarklet)
      • Device Info
  • Support
    • Documentation for Joomla Extensions
      • AllVideos
      • Frontpage Slideshow
      • Simple Image Gallery
      • Simple Image Gallery Pro
      • SocialConnect
    • Documentation for Joomla Templates
      • General Resources
        • Installation
        • Content
        • Customization
      • Commercial Templates
      • Free Templates
    • Get Help
      • Community Forum
        • Recent Topics
        • Categories
        • Create free account
      • Help Desk
      • Contact us by e-mail
      • Contact us on Facebook Messenger
      • Contact us on Twitter
  • About
    • Blog
    • Company
    • License & Terms of Service
    • Privacy Policy
  • My Account
15 11 2010
Written by  JoomlaWorks
Published in Blog
Tagged under
  • +atom
  • +feed
  • +feedburner
  • +how-to
  • +rss
1 comment

Elegant way to pass on your primary Joomla RSS feed to Feedburner

Elegant way to pass on your primary Joomla RSS feed to Feedburner

We all know Feedburner. The cool service offered by Google that makes distributing your RSS feed a lot better with analytics, various RSS feed reader support and so on...

If you wanna use Feedburner, you just sign up for the service with your Google account on http://feedburner.google.com and then provide your "home page" RSS feed (usually something like mywebsite.com/?format=feed). Feedburner will in turn give you back a new RSS feed link (something like feeds.feedburner.com/mywebsite) which you can use to "proxy" people who read your feeds via Feedburner and enjoy all the goodies the service can offer.


Now, the dead simple way to add your RSS feed link on your Joomla site is:

a) add the related <link ... /> code on your template's <head>...</head> tags

b) use mod_custom (or some other similar extension from the Joomla Extensions Directory) to add a direct link to your Feedburner RSS feed link or a nice button to do the same thing (see for example http://brian.teeman.net - "Follow me" button on the right column)

Obviously the second option is highly recommended as users who don't notice that orange or blue icon in the URL bar of their browser, can easily subscribe to your Joomla site's RSS feed.

But if you go with the first option too, you will end up with 3 RSS feed links listed in your <head> tag, that may confuse your visitors. The first feed will be your Feedburner one and the other 2 the feeds that are automatically generated by Joomla for the two available feed formats (RSS and Atom)... These 3 feed options will show up when your visitors click the orange button (e.g. in Firefox) or the blue button (e.g. on IE or Safari) in the URL bar of their browser. See the screenshot below:

Feed_buttons_on_url_bar

So here's a neat trick to further control the feed link that shows up in these feed buttons on your visitors' browsers... Let's suppose you want to server the Feedburner feed link only on the "home page" of your Joomla site. First of all, we need a way to determine the visitor is ON the "frontpage" (or "home page", call it what you like...).

Open up the index.php file of your Joomla template and right below the "defined( '_JEXEC' ) or die( 'Restricted access' );" line, add the following snippet:

$document = &JFactory::getDocument(); // Determine if we are on the frontpage $menu = &JSite::getMenu(); if($menu->getActive() == $menu->getDefault()) $isFrontpage = true; else $isFrontpage = false; // Cleanup Joomla default feed links only for the frontpage if($isFrontpage) unset($document->_links);

This code snippet will "turn off" the feed links created by Joomla (automatically) on the frontpage of your site. But only for the frontpage of your site.

You can then go on and add your usual Feedburner feed link right before the "<jdoc:include type="head" />" snippet within your <head> tag. So you end up with something like:

<link href="http://feeds.feedburner.com/myfeed" rel="alternate" type="application/rss+xml" title="My site feed" /> <jdoc:include type="head" />

Now when a visitor on your site requests for any other page (than the frontend), will get 3 feed links, your primary (which comes from Feedburner) and the 2 auto-generated by Joomla.

The applications of this are limitless obviously. You can either completely disable all auto-generated Joomla feed links and pass on one common feed link on all pages, or create different Feedburner feed links and set them individually on your Joomla pages based on specific criteria (e.g. for the "major areas" in your site).

You can see how implemented this trick on sites like www.gazzetta.gr (fixed Feedburner links plus Joomla feed links), brian.teeman.net (Feedburner link only), magazine.joomla.org (Feedburner link on frontpage only).

Read 131383 times

1 comment

  • Chris Hoch Chris Hoch 08 Jul 2011
    Comment Link



Leave a comment

Make sure you enter all the required information, indicated by an asterisk (*). HTML code is not allowed.

back to top
BY MAIL BY RSS

Archives

  • May 2024 (1)
  • March 2023 (1)
  • January 2022 (1)
  • July 2021 (2)
  • May 2021 (1)
  • February 2021 (1)
  • December 2020 (1)
  • September 2020 (1)
  • June 2020 (1)
  • May 2020 (1)
  • February 2020 (1)
  • January 2020 (5)

Tag Cloud

allvideos announcement apache community development frontpage slideshow future joomla k2 Performance plugin release sh404sef simple image gallery simple image gallery pro simple rss feed reader socialconnect tips update video

Latest Entries

  • K2 will not be made available for Joomla 4/5 - change of course
    Written by  JoomlaWorks
    30 May 2024
  • New free extension release: Quick Menu (for Joomla 4)
    Written by  JoomlaWorks
    06 Mar 2023
  • Simple Image Gallery (free) v4.2 released
    Written by  JoomlaWorks
    07 Jan 2022
  • Simple Image Gallery Pro v3.9.1 released (bug-fix release)
    Written by  JoomlaWorks
    26 Jul 2021
  • Simple Image Gallery Pro v3.9.0 released
    Written by  JoomlaWorks
    05 Jul 2021

Join Our Newsletter

Enter your e-mail address to subscribe to our new or updated product notifications. We send combined newsletters, so we won't spam you every week :)

Get Social

  • Twitter
  • GitHub
  • Facebook
  • GitHub (K2)
  • YouTube
  • Speaker Deck

Grab Our Feeds

  • Extension Updates
  • Blog
  • Videos
  • Presentations
Copyright © 2006 - 2025 JoomlaWorks Ltd.
JoomlaWorks Ltd. and this site is not affiliated with or endorsed by The Joomla! Project™. Any products and services provided through this site are not supported or warrantied by The Joomla! Project or Open Source Matters, Inc. Use of the Joomla!® name, symbol, logo and related trademarks is permitted under a limited license granted by Open Source Matters, Inc.
designed by Nuevvo