XML Feed Plugin
Advertisement
Description
‘XML Feed’ is a Jquery plugin designed to allow you to post RSS feeds on your site. If you have multiple blogs this can make it easy to pull the feed from one and display it on your current page. Or use it to keep people up to date on your Twitter status (as I’ve done on Jeremy-Fry.com)
Recent Versions
- Version 1.0 - Zip Format
Demo
The Twitter feed to the right is running using XML Feed but you can view all the example included in the archived files by going to this page. The graphics used in the examples are up for grabs and can be used as is on your own website
Setup
- Include the xml_reader.js file below your Jquery file.
- Open xml_reader.js and modifiy the phpFile option to point to
the location of the xml.php file. - Include the following:
<script language="javascript"> <!-- $(document).ready(function(){ $("#rss2").XmlFeed({ itemWidth: 170, itemHeight: 90, navHeight: 8, maxItems: 5, stripTitle: 0, titleLen: 20, stripDesc:0, descLen: 85, displayTitle: true, displayDescription: true, displayPubDate: true, displayLink: true, titleAsLink: true, clickOnUl:true, prevImg: "arrow-left.png", nextImg: "arrow-right.png", feedURI: "http://feeds.feedburner.com/dezinerfolio?format=xml" }); --> </script> - There are a number of customizations that you can make:
$(”#rss2″) - Replace #rss2 with the id of the div you want to use
itemWidth - the width of the items
itemHeight - the height of the items
maxItems - how many items to display
stripTitle - cut so many characters off the front of the title
stripDesc - the same for the front of the description
descLen - the length of description to display
titleLen - same of the title
displayTitle - whether or not to display the title field
displayDescription - whether or not to display the description
displayPubDate - whether or not to display the Publication date
displayLink - whether or not to display the link
titleAsLink - should the title be the link to the item (false displays it at the bottom)
clickOnUl - if clicking on the item will scroll to next (can’t select text with this on)
prveImg/nextImg - images for the prev next buttons
feedURI - the http location of the feed you want to display - Now that customization is done you can style the items. Everything is in a span with classes
that are relevent: title, description, pubdate, prev, next, and so forth. Or you can use
one of the examples. - If you encounter any errors check to make sure everything is pointing to the right directory
and that your allow_url_fopen = on. - If you are still having trouble let me know at jeremy.m.fry@gmail.com
FAQ
- Is it free?
- Yes. XML Feed is free for personal use under the GNU GPL. If you find XML Feed to be helpful to you please consider donating.
Tags: Javascript, Jquery, Plugins
Posted on Tuesday, October 14th, 2008. Category: Jquery Plugins, XML Feed





December 4th, 2008 at 5:59 pm
hi, you script is very good but in internet explorer 7 and 6 not see correctly……..
December 24th, 2008 at 3:43 am
but for the fact that milieu. So have!
May 30th, 2009 at 6:27 pm
Had to do some tinkering with files paths, and now this is working like a charm. Has anyone come across a way to merge multiple xml feeds into a single panel?
Thanks for the cool script!
January 12th, 2010 at 1:09 am
[...] I could have used a simple Javascript script I found, or I could have used a crafty jQuery plugin I found. [...]
January 31st, 2010 at 11:23 pm
Twitter are 100% the way to go
Leave a Reply