CaRP: Caching RSS Parser - Documentation
CaRP Interactive FAQ
Getting Started: Free Download | Purchase | Install
Reference: Functions | Plugins | Themes | Full Index
Etc.: Display Formatting | Example Code | Affiliates
Getting Started: Free Download | Purchase | Install
Reference: Functions | Plugins | Themes | Full Index
Etc.: Display Formatting | Example Code | Affiliates
Miscellaneous Settings
carperrors: Specifies whether or not to display CaRP's error messages. Note that this setting does not affect PHP errors. Valid values are:
- 0: Do not display CaRP errors.
- 1 (the default for CaRP 3.5.10 and earlier): Display CaRP errors.
- 2 (requires and is the default for CaRP 3.5.11 and later): Display CaRP errors as links to pages in the documentation that describe their causes and solutions.
Example:
require_once '/path/to/carp.php'; CarpConf('carperrors',0); CarpCacheShow('http://www.geckotribe.com/press/rss/pr.rss');phperrors: Specifies whether or not to display PHP errors, notices, etc. Valid values are:
- -1: leave PHP's error reporting setting as it is, which may vary from server to server.
- 0 (the default): Don't display any PHP errors, notices, etc. For security purposes, we recommend that once you have your system working properly, you use the default value. Otherwise, any error messages may reveal information about the directory structure of your web server which could be useful to someone attempting to crack your server.
- PHP's predifined constants: See the PHP documentation for more details and valid values. Do NOT enclose the constants in quote marks.
Example:
require_once '/path/to/carp.php'; CarpConf('phperrors',E_ALL); CarpCacheShow('http://www.geckotribe.com/press/rss/pr.rss');noitems: A 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 (no channel data, etc.). The default value is 'No news items found'.
shownoitems: Specifies whether or not to use the "noitems" setting or to proceed as if that setting didn't exist. Valid values are:
- 0 (the default): Ignore the "noitems" setting. Show channel information, etc., but just no items if there are none.
- 1: If no items are found to display, display the value of the "noitems" setting, and nothing else.
Example:
require_once '/path/to/carp.php'; CarpConf('filterin','CaRP'); CarpConf('shownoitems',1); CarpConf('noitems','No press releases about CaRP were found.'); CarpCacheShow('http://www.geckotribe.com/press/rss/pr.rss');descriptiontags: A list of HTML tag names, separated by pipes (|), which are allowed in the DESCRIPTION fields (both for ITEMs and the CHANNEL)--all others will be handled as specified by the removebadtags setting. For paired tags like <a href="..."> and </a>, you should name both tags in the list. Only the tag name should be indicated, not the entire tag.
Example:
require_once '/path/to/carp.php'; CarpConf('descriptiontags','b|/b|i|/i'); // allow only bold and italics opening and closing tags CarpCacheShow('http://www.geckotribe.com/press/rss/pr.rss');removebadtags: Specifies whether to remove or entity encode HTML tags not listed int he descriptiontags setting. Valid values are:
- 0: Entity encode disallowed HTML tags so that they display like this: "<tag>"
- 1 (the default): Completely remove all disallowed HTML tags.
carp_banned_tags: [CaRP >= 4.0 only] This setting is NOT set using CarpConf, but is specified as a constant in carpconf.php. Any HTML tags listed will always be removed from the description regardless of whether they're listed in the "descriptiontags" setting or not. The tags listed here are those that could most easily be used for security exploits.
strip-xhtml-prefixes: [CaRP >= 4.0 only] Specifies whether to remove namespace prefixes from XHTML content in Atom feeds. Valid values are:
- 0: Leave namespace prefixes intact.
- 1 (the default): Remove namespace prefixes.
outputformat: Specifies which of CaRP's output modes to use. Valid values are:
- 0 (the default): display CaRP's output as HTML
- 1: output JavaScript code which, when executed by the web browser, will display the output as HTML. Use this option to enable other sites to display your newsfeeds, and to display newsfeeds on non-PHP pages. See the JavaScript Example for details.
- 2: store the HTML formatted output in a PHP variable ($carpoutput), which your PHP code can use as desired.
maxgroupfilter: Specifies the maximum number of feeds to refetch during a single call to CarpGroupFilter. The default number is 3.
afield: [CaRP >= 4.0.7 only] The value of this setting will be output after each "field" (the things listed in the iorder, cborder and caorder settings). By default, a newline is output. In a webpage, this is displayed as a single space. By setting it to '' (empty), for example, fields can be displayed without a space appearing between them.
aitem: [CaRP >= 4.0.7 only] The value of this setting will be output after each feed item (ie. story, post or entry). This setting should only be altered to omit the newline character (it's default value) -- for all other purposes, use the "ai" setting instead.