rss.php
rss.php is the script that generates all of the page-based RSS feeds for Siteframe. (Some RSS feeds, such as those for search results or all tags, are not a list of pages and are thus generated using a template.) rss.php executes a SQL statement that returns a list of pages, then creates a DOM tree in RSS format for those pages.
Query String Parameters
rss.php, when invoked without any query string parameters, will return an RSS feed of the most recent pages on the entire site. (The number of pages is set in siteframe.ini with the recent_items configuration variable.) Other parameters dictate different sets of pages:
- user=username
This creates an RSS feed of the most recent pages by the named user - tag=tagname
This creates an RSS feed of the most recent pages with the selected tag. - user=username&tag=tagname
This lists only those pages by the specified user with the selected tag. - favorites=username
This creates an RSS feed of the most recent pages by username's favorite users. - folder=foldername
This creates an RSS feed of the most recent pages in the specified folder. - group=groupname
This creates an RSS feed of the most recent pages by members of the specified group. - type=special
This indicates a "specialized" RSS feed; special can be "toprated", "mostcommented", or "unrated." When combined with the days= or num= parameters (see below), these feeds can be used to create "top-rated pages" and so forth.
In addition to the parameters shown above, there are additional query string parameters that can be used in conjunction with any of the others:
- num=number
By default, rss.php uses the recent_items setting in siteframe.ini to determine how many pages to include in the feed. If num=N is supplied, however, then N pages are included. - days=number
This restricts the feed to pages that were created in the last number days.
Media RSS
When a page as associated media files, the Yahoo! MediaRSS extensions are used to specify media content.Configuration Parameters
A number of parameters set in siteframe.ini control the behavior of rss.php:
- rss_enable = On|Off
If Off, then no RSS is generated; an error message is displayed if rss.php is executed. - rss_author = On|Off
The RSS specification requires that the <author> tag, if specified, should be the email address of the author. I think this is a Very Bad Idea, since spammers could then capture email addresses from RSS feeds. This goes against one of the primary principles of Siteframe, which is to do everything reasonable to hide user's email addresses unless they choose to reveal them. Thus, this parameter (which is Off by default), can be used to turn on generation of <author> tags, which might be perfectly appropriate for an internal or Intranet website. - rss_fulltext = On|Off
If On, then the complete text of pages is included in the RSS feed. If Off, the first 300 characters are used. Typically, many websites like to use partial-text RSS feeds to encourage readers to visit the website instead of reading everything in an RSS reader. - rss_ttl = 60
The "time to live" (in minutes) of the feed. This is a hint to the reader as to how often it should fetch a new copy of the feed. If set to 60 (the default), then readers will fetch a new copy of the feed every 60 minutes. If your site frequently changes, you might want to set this to a lower number to ensure that the feed is always "fresh". However, a lower number means more frequent fetches, and thus might impede the performance of your site.
