Plugin Information
Feed Enclosures 1.0.2
- Author:
- nanovivid
- Published:
- Apr 13, 2005
- Last Updated:
- Mar 04, 2007
- License:
- Freeware
- Categories:
- Plugins RSS, ATOM, and Feeds
Finds enclosure links and adds them as <enclosure> elements to an RSS feed or <link rel="enclosure"> links to an Atom Feed.
Example Usage
{exp:feed_enclosures type=“atom”}
Here is my new <a href=“http://www.example.com/mymusic.mp3” title=“My Awesome Song” rel=“enclosure”>song</a>. What do you think?
{/exp:feed_enclosures}
Notes
EXAMPLE ONE:Input:
{exp:feed_enclosures type="atom"}
Here is my new <a href="http://www.example.com/mymusic.mp3" "title="My Awesome Song" rel="enclosure">song</a>. What do you think?
{/exp:feed_enclosures}Output:
<link rel="enclosure" title="My Awesome Song" url="http://www.example.com/mymusic.mp3" type="audio/mpeg" length="391314" />EXAMPLE TWO:
Input:
{exp:atom_enclosures type="rss" parse_list="y"}
http://www.example.com/mymusic.mp3,
http://www.example.com/moremusic.mp3
{/exp:atom_enclosures}Output:
<enclosure url='http://www.example.com/mymusic.mp3' type='audio/mpeg' length='391314' />
<enclosure url='http://www.example.com/moremusic.mp3' type='audio/mpeg' length='428621' />PARAMETERS:
The tag has one requried and two optional parameters
Required Parameters:
tag - (rss/atom) If set to 'rss', it will create <enclosure> tags for a RSS feed. If set to 'atom', it will create <link rel="related"> tags for an Atom feed.
Optional Parameters:
remote - (y/n) If set to 'n', it attempts to only use links whose URLs are from your site
parse_list - (y/n) If set to 'y', it will only look for a list of URLs separated by commas or line breaks and will not parse out links. If set to 'n' (default), it will look through tag's data looking for all links using the rel="enclosure" attribute.
------------------------------------------------------
Based on RSS Enclosures 1.1 by Paul Burdick. Thanks to Paul for his permission and helpful suggestions in developing this plugin.
***************************
Version 1.0.2 - Paul Burdick
***************************
Fixed a bug where cURL would download the entire file if it was remote.
Added redirect support when cURL is not available

