CaRP: Caching RSS Parser - Manual
Version 3.5.4 (10/7/2004)
NOTE: This version of CaRP is obsolete.
This documentation is being left here for those who have not yet upgraded to the current version.
Download |
Installation |
Configuration |
Upgrading from version 2 |
Functions |
Examples |
Donations
Old documentation: Version 2
Configuration
Configuration is done by changing the values in the array $carpconf.
You may
change the defaults by modifying carp.php itsself.
You may
override the defaults for a particular RSS feed by inserting lines like "CarpConf('cachepath','/my/private/cache/path');"
after the line where you "require_once" CaRP, and before calling CarpShow().
The following options are defined in $carpconf, and are color-coded based on the likelihood that you'll want to change them, as follows:
usually changed,
often changed,
sometimes changed,
rarely changed
Cache Control |
Content-Based Filtering |
Display Formatting |
Miscellaneous |
Network Connection |
XML Encoding
Miscellaneous:
- carperrors: 1 to show CaRP's error messages, 0 to surpress them.
Note that this setting does not affect PHP errors.
Use the following setting for that.
- phperrors: -1 to leave PHP's error reporting setting where it is.
Otherwise, indicate the value you desire for error reporting.
When using predefined PHP constants, be not NOT to put quote marks around the values.
See the PHP documentation for more details and valid values.
- noitems: Message to display if no news items are found (generally because the filterin and/or filterout settings have filtered out all the items in the newsfeed).
To make this message show up, shownoitems must be set to "1".
If this message is displayed, NOTHING else will be displayed.
- shownoitems: 1 to use the "noitems" setting, 0 to proceed as if the noitems setting didn't exist (show channel information, etc., but just no items if there are none).
- descriptiontags: A list of HTML tags, separated by pipes (|), which are allowed in the DESCRIPTION fields (both for the ITEMs and the CHANNEL)--all others will be handled as specified by removebadtags (see below).
- removebadtags: 1 to completely remove any HTML tags not listed in descriptiontags (the default), or 0 to display them like "<tag>"
- outputformat: 0 to display CaRP's output as HTML (the default), 1 to output JavaScript which will display the output as HTML, or 2 to store the HTML formatted output in a PHP variable ($carpoutput), which your PHP code can use as desired.