Jump to content


Photo
Cris D.

  • : Oct 10 2007 07:15 AM
  • : Jan 17 2008 04:35 PM
  • : 8.11K
  • : 5269
  • : 1,298

  • 09 Nov 2007 RSS FEED
  • 09 Nov 2007 RSS FEED
  • 06 Nov 2007 RSS FEED
  • 10 Oct 2007 RSS FEED
  • 10 Oct 2007 RSS FEED

RSS FEED





Module: RSS FEED
Snippet: RSS V2.2
Template: rssTemplate
Author:  Cris D
Date: 2007/11/10
Use: This snippet creates a validated RSS xml document that lets users create live links to selected pages in your site

Instructions:
1) Create a template with the template code following...
2) Create and publish a new page (uncached) with the rssTemplate called rssFeed.
3) In the rssFeed page under the publishing tab set content type: "text/xml".
4) Call this snippet in the rssFeed page uncached [!rssFeed2.0!]
5) Set in the index.php: $etoNotice=false
6) Configure the snippet as per in-snippet documentation
7) Create a link (rss image or hyperlink) to the document rssFeed  In a compatible browser, the user will be prompted to "bookmark the feeds" or  "subscribe to this feed".

Create a template with the following code:
<?xml version="1.0"  encoding="[(etomite_charset)]"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" >
<channel>
[*content*]
</channel>
</rss>
Save it as "rssTemplate"


A word about cached snippets on linked pages:  If your RSS feed  snippet is called [[cached]]  and you have a single [!uncached!] snippet on the linked page, just the page title is returned.  If your RSS feed is called [!uncached!] and you have [!uncached!] snippets on the linked page, the snippet call is displayed and the rest of the page is also shown (including evaluated [[cached]] snippets).  

Therefore, for best results use this snippet [!uncached!] and all snippets on linked pages [[cached]] unless you have good reason to do otherwise.


Changelog:
V1.3 Updated 2007/11/06
  • Made changes so the feed validates
  • Added Atom namespace to template
  • Now calling site keywords to fill <content> element
  • WebMaster (real name) now must be hard coded
  • RFF882 publishing date set by default
  • isPermaLink case error fixed
  • $feedLink now using makeURL instead of $GLOBALS['www_base_path']
RSSFeedV2.0 2007/11/10
  • Built a simple etomite parser that displays the results of cached snippets on linked pages.
  • Changed the installation from a snippet call in the template, to the snippet call on the page being used as the feed link.
  • You can now set a parent folder for all children to include or set individual pages
  • Added an Etomite notice to the bottom of the feed.

RSSFeed 2.1 2007/11/10
  • Updated content with <![CDATA[]]> attribute
  • Removed htmlentities (not required with CDATA declaration)
  • Fixed unvalidating etoNotice

RSSFeed2.2 2008/01/18
  • Added the capability to read a feed page identified by placing RSS or rss in the documents' keyword
  • Note: If RSS is found on a single page, the $itemLinks and $parent configuration methods are now ignored.
  • Implemented Jim Browski's $blogLinkId suggestion as a html site anchor.


For a good guide to the configurable elements used in this snippet (and more that you can add), see... http://cyber.law.har...du/rss/rss.html

For more assistance, see the in-snippet documentation.

See it in action.








0 members, 3 guests, 0 anonymous users