|
You are here: Home / Documentation / Sharing Content With RSS |
Sharing Content With RSSAdvanced content syndicationSay you want to do something other than simply turn an RSS newsfeed into a bulleted list in your web site's sidebar. At this point, you're going to have to get down to the PHP level and write yourself a box. Fortunately, Sitellite makes this easy to do with the saf.XML.RSS.Simple package, which contains an RSS retrieval class called SimpleRSS.SimpleRSS defines only one method, fetch(), which returns an XMLDoc (see saf.XML.Doc) object tree of the specified newsfeed, and features one key built-in nicety: Automatic caching of the resulting object, either based on a specified interval, or on the syn:updatePeriod and syn:updateFrequency values from the newsfeed itself (the default). If update instructions are not found in the newsfeed, SimpleRSS defaults to caching for an hour (3600 seconds). Here is a quick example of retrieving a newsfeed and working with it: <?phpYou can save and run the above code by dropping it into a Sitellite box script. For example, saving the script to inc/app/example/boxes/simplerss/index.php will allow you to access it at: http://www.yourWebSite.com/index/example-simplerss-actionFor more information on manipulating the resulting XMLDoc object, check out the SAF documentation at http://www.sitellite.org/docs/ under the XML section. Publishing RSS from common Sitellite appsMost Sitellite apps have RSS publishing capabilities built-in, to make it easy to allow other sites to syndicate your content (free promotion) or to allow you to do cool things with multiple sites of your own. For example, you could have a portal site that displays the top headlines from each sub-site, and perhaps the newest SiteLinks listings as well, or the latest SiteForum forum activity, or a list of file downloads from your Web Files, or a list of upcoming events from SiteEvent, and the list goes on.Since it's really that simple, there's not much more I can say about that, so I'll move on to the next topic now. :) Next: Building an RSS feed for your own apps Page 1: RSS, which stands for Rich Site ... |
|
Copyright © 2008, SIMIAN systems Inc. All rights reserved. Privacy policy Some of the icons on this site were created by the Gnome Project. |