JulienRSSWidget
文件大小: unknow
源码售价: 5 个金币 积分规则     积分充值
资源说明:A jQuery plugin for embedding an RSS feed into your page. Contains a PHP proxy.
h1. Julien RSS Widget

h2. Easy to Install

1. In your HTML, create an empty div like this:
@
@ 2. Upload the jrw_proxy.php file somewhere within the same domain. 3. And in you javascript, add this code:
$.julienRSSWidget.globalSettings.proxyURL = 'http://yoursite.com/path/to/jrw_proxy.php';
$(document).ready(function(){		
	$('#feed1').julienRSSWidget({
		feedURL: 'http://feeds.feedburner.com/readwriteweb'
	});
});
h3. About the Proxy (proxyURL setting) Due to the fact that this plugin is in JavaScript and that there is this thing called "Same Origin Policy":http://en.wikipedia.org/wiki/Same_origin_policy, you have no choice but to configure (see above) julienRSSWidget to use a proxy. The proxy is just a simple server side script that grabs the content of the feed you're trying to access and make it accessible in the scope of your own domain. This plugin includes the PHP version of this script. For the rubyists though, here is what you would do (in Sinatra. You would also need to @sudo gem install curb-fu@ ):
require 'curb-fu'
require 'sinatra'
get '/jrw_proxy' do
  response = CurbFu.get(params[:rsswidget_url])
  response.body
end
and in your javascript, it would look like this:
$.julienRSSWidget.globalSettings.proxyURL = 'http://yoursite.com/jrw_proxy';
h2. Highly Configurable h3. You can modify: * the format of the dates (including the name of the months) * the HTML structure of the feed items that are shown, via the feedItemMarkup option * the styles, via the theme in the CSS file * You can install as many RSSWidgets as You want into the same site, at least have a different feedURL option for each one of them (feedURL option) * the maximum number of news items to show on each feed, via the maxItems option * and more...
$('#yourdiv').julienRSSWidget({
	feedURL:          'http://feeds.feedburner.com/JulienDesrosiers',
	feedURLLabel:     'Grab the feed',
	theme:            'default',
	maxItems:         10,
	dateFormat:       '%b %d, %Y', // Oct 16, 2010
	fullDateNames:    ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
	abbrevDateNames:  ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ],
	linkTarget:       '_blank', // _blank, _self, _parent, _top
	feedHeadMarkup:  '

\ {feedTitle} \ {feedURLLabel} \

', feedTitleOverride:'', feedItemMarkup: '
  • \ {pubDate} \ {title} \
  • ' });
    h2. Cross-browser Tested in Internet Explorer 6-7, Firefox, Safari h2. Atom The Atom format is not currently supported.

    本源码包内暂不包含可直接显示的源代码文件,请下载源码包。