CaRP Evolution Documentation
CaRP Evolution Documentation
twitter youtube linkedin google-plus
CaRP Evolution Box
Web This Site

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

See the Age Format plugin in action

Age Format

Age Format 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:
  1. Enter the following command into your webpage after "require_once '/path/to/carp.php';":
  2. 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.

require_once '/PATH/TO/carp/carp.php';
	360=>'&bull; '
This example does three things: