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
Item IDs
Item IDs is a plugin bundled with CaRP Evolution. It wraps each item in a <div> with a unique ID. It is useful for integrating CaRP with other scripts that use JavaScript to address individual feed items.Installation:
To install Item IDs, put itemids.php into the "plugins" folder inside the folder containing carp.php. (If no plugins folder exists, create one.) This is the default location of the plugin when CaRP Evolution is installed.
Use:
To use this plugin, do the following:
- Enter the following command into your webpage after "require_once '/path/to/carp.php';":
CarpLoadPlugin('itemids.php'); - If desired, edit the configuration settings listed below to control the plugin.
Configuration Options:
The following configuration options may be set using code like this:
$itemidscarpconf['attrs']=' onMouseOver="DoMyFunction(this);"';
- attrs: the contents of this setting are inserted into the opening <div> tag, enabling you to, for example, attach an onMouseOver handler to it. This setting is empty by default.
- idprefix: specifies the beginning of the ID for each item. The default value is "carpitem".
- serial: the ID for each <div> is generated by appending a number to the end of idprefix. The first number is the initial value of "serial" + 1. Thus, by default, the ID of the first item is carpitem1, the second is carpitem2, and so on. If multiple feeds are displayed on the same page, the serial numbers automatically pick up where they left off on the previous feed.