EE 1
EE 2
Feed Parser

Developer

Andrew Weaver

3rd Party (Free)


Compatibility

  • Multi Site Manager
  • Stand Alone Entry Form
  • Low Variables
  • Better Workflow
  • Matrix

Requirements

  • jQuery for the Control Panel

Categories

Plugin

Tags

Feed Parser is a free plugin for ExpressionEngine 2 to fetch and read XML-based feeds and API results and display the contents in your templates.

The Magpie RSS/ATOM Parser plugin that comes with EE allows you to read RSS and ATOM files; Feed Parser takes the potential a bit further:

Features include:

  • It can read any XML format not just RSS and ATOM, so you can use it to retrieve more types of data including API responses
  • You can access any element or attribute within the XML. All the data within the XML can be displayed or used in conditional ‘if’ statements
  • Feeds are cached and you can set how frequently a new file should be fetched
  • Common EE variables {switch}, {count}, {total_results} are available
  • Standard date formatting can be used
  • Parameters include: offset=, limit=
  • A debug mode will help you set up the feed for the first time, alerting you of any issues and giving you a list of available parameters

Examples

A simple RSS feed

{exp:ajw_feedparser 
    url="http://brandnewbox.co.uk/v8/rss"
    cache_refresh="60"
    limit="8"
}
<h3 class="title">{title}</h3>
{description}
{/exp:ajw_feedparser}


Flickr

Display images and descriptions from your flickr RSS feed. This example demonstrates how to access other XML elements and attributes, and using the date formatting feature.

{exp:ajw_feedparser 
    url="http://api.flickr.com/services/feeds/photos_public.gne?id=25509357@N00&lang=en-us&format=rss_200"
    cache_refresh="60"
    limit="5"
}
<h3 class="title">{count}/{total_results}: {title}</h3>
<h4>Tags: {media:category}</h4>
{description}
<p>{media:thumbnail@url}</p>
<p>Posted by <em>{author}</em> on {dc:date.Taken format='%l, %F %j%S, %Y at %g:%i %A'}</p>
{/exp:ajw_feedparser} 

Tumblr

Show entries from your tumblr blog. You can use conditionals to display the data depending on the type.

{exp:ajw_feedparser 
    url="http://the-fan.tumblr.com/api/read"
    itempath="/tumblr/posts/post"
    cache_refresh="60"
}
<h3 class="title">Post from {@date-gmt}</h3>
{if @type == "photo"}<p><img src="{photo-url#4}"/></p>{/if}
{if @type == "quote"}<blockquote><p>{quote-text}</p></blockquote>{/if}
{if @type == "video"}<p>{video-source}</p>{/if}
{if @type == "link"}<p><a href="{link-url}">{link-text}</a></p>{/if}
<p><a href="{@url}">{@url}</a></p>
{/exp:ajw_feedparser} 

Feed Parser Links

This entry was created December 2, 2010, 1:32 pm.
This entry was last updated April 20, 2012, 1:06 am.

Disclaimer: Information about ExpressionEngine add-ons is provided as a service to you, the user, and every member of the ExpressionEngine community. devot:ee is not responsible if you hose, mangle, wreck, or otherwise destroy your EE website by installing an add-on that you found out about at this site, regardless of its rating, Favorites status, commercial or free status, or general popularity. Caveat EEmptor!

5 Reviews:

glennj 12.08.12

Rating - {addon_rating_average}

Functionality looks great, but my main problem is the amount of PHP Notices and Warnings it generates.

Remove those and it will be a great Add-on.

timprint 09.12.12

Rating - {addon_rating_average}

Couldn’t be easier to set up and works perfectly. The debug mode that shows you all the available variables is a great touch.

Paul Frost 02.23.12

Rating - {addon_rating_average}

An easy way to get Flickr images into templates. The debug parameter is really useful in finding out what is available from the feed.

Ryan Masuga 08.07.11

Ryan Masuga
Rating - {addon_rating_average}

Piece of cake to use. It has debug parameter if you’re having trouble getting it working, and you can cache the result.

I use this to get the most recent EE Podcast info on the devot:ee homepage.

JCDerrick 06.24.11

JCDerrick
Rating - {addon_rating_average}

This is a really great add-on and it’s very easy to use. Just plug in the code you need from the examples and you’re set. You can also customize this quite a bit, and it works perfectly.