CaRP: a caching RSS parser Flex Format for CaRP Evolution
The extendable version of CaRP: caching RSS parser
 
Flex Format is a plugin bundled with CaRP Evolution. It enables you to apply different formatting to individual newsfeed items. For example, you might display the headline and full description for the first three items, the headline and up to 200 characters of the description for the next five, and just the headlines of the rest. You can also vary fonts, colors, and other formatting for different items.
 
Installation:
To install Flex Format, put flexformat.php into the "plugins" folder inside the folder containing carp.php. (If no plugins folder exists, create one.)
 
Use:
To use this plugin, do the following:
  1. Enter the following command into your webpage after "require_once '/path/to/carp.php';":
    CarpLoadPlugin('flexformat.php');
  2. Use CarpConf as usual to set up the formatting of the first item.
  3. Specify any formatting changes you wish to apply for later items as follows:
    FlexFormatConf(item number, option name, value);
    Set item number to 1 for the first newsfeed item, 2 for the second, and so on. All items beginning with the number specified will be affected by the change. option name and value are the same as for CarpConf. Most options related to the appearance of items can be modified using this plugin.
Example:
CarpConf('iorder','link,desc');
CarpConf('maxidesc',0);
FlexFormatConf(4,'maxidesc',200);
FlexFormatConf(9,'iorder','link');
FlexFormatConf(9,'bilink','• ');
 
This example will show the headline link and full description for the first three items. Beginning with item 4, it will truncate the description to 200 characters if it is longer. Beginning with item 9, it will only show the link, and will display a bullet (•) in front of the headline link.
Purchase CaRP Evolution on the CaRP Homepage
CaRP Evolution Plugins
CaRP Evolution API Documentation