Instead of displaying your data as HTML, you can display it as an RSS feed. You’ll need to give the plug-in some extra information about the feed.
< $db->feed('title of feed', 'description of feed', 'link to web page'); $db->rss(); >
This assumes that your records contain a field called “title” that contains each item’s title, a field called “description” that contains each item’s description, and a field called “timestamp” that contains a Unix timestamp of when the data was made available. It also assumes that your current directory’s main page provides the focus for the items.
If those aren’t true, you can specify which fields contain this information. For example if, as is likely, your date or timestamp is in a field called ”start_date”, use:
You can specify the date field, the description field, and the title field, in that order. If you need to change the date field and the description field, you can do it this way:
Note that if you need to specify a later field (such as title), you also need to specify the previous fields.
If you are providing your RSS feed in a location other than the folder where you are displaying your records, or if you are not displaying your records on the main page of that folder, you can specify the actual URL base:
The plug-in will automatically add “?ID=” and the ID to the base URL.
If, on the other hand, you don’t want to link to a detail page, you can use the feedlink() method to specify a column that contains the actual URL:
If you an upload type that should be provided as an enclosure, you can add it using feedenclosure(fieldname):
Direct feed access
This system uses the RSS and iCal Feeds plug-in. You can get direct access to the feed object by storing the return value of the “feed” function in a variable:
$feed = $db->feed('title of feed', 'description of feed', 'link to web page');
You can then use the full functionality of the feed as described on RSS and iCal Feeds.