Feed Parser — Coming soon for EE3

Coming soon for EE3

Feed Parser is a 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

  • 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}</emon {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} 

 

Download

Version: 0.9.2

Available for:

EE2 EE3

Download for EE2

 Download our free add-ons