CaRP: Caching RSS Parser - Documentation
is a plugin bundled with CaRP Evolution.
It enables you to apply different formatting to individual newsfeed items based on their timestamps.
For example, you might display the headline and full description for items less than an hour old,
the headline and up to 200 characters of the description for items less than 6 hours old,
and just the headlines of the rest.
You can also vary fonts, colors, and other formatting for different items.
To install Age Format, put ageformat.php into the "plugins" folder inside the folder containing carp.php.
(If no plugins folder exists, create one.)
To use this plugin, do the following:
- Enter the following command into your webpage after "require_once '/path/to/carp.php';":
- Specify any formatting changes you wish to apply for later items as follows:
AgeFormatConf(option name, array of settings);
- option name is the same as for CarpConf.
Most options related to the appearance of items can be modified using this plugin.
- array of settings is an array of settings to be applied based on the age of the item.
The key for each entry in the array is the number of minutes old that the item must be to use that setting.
The value of each entry in the array is the setting as it would be used with CarpConf.
If an item is newer than the time specified by the smallest number of minutes,
the setting for the smallest number of minutes will be used.
This example does three things:
- Displays the link and description for items less than 6 hours (360 minutes) old,
and only the link for older items.
- Displays the full description for items less than 30 minutes old,
500 characters of the description for items less than an hour (60 minutes) old,
and 200 characters of the description for items more than an hour old.
- Displays a bullet character (•) before the headline links of any items more than 6 hours (360 minutes) old
(those whose descriptions are not displayed because of the first setting).