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

Filter

Filter is a plugin bundled with CaRP Evolution. It enables more powerful filtering of RSS newsfeed items than is possible with CaRP's built-in filterin and filterout settings, including and, or, not, regular expression matching, and more.
 
Installation:
To install Filter, put filter.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('filter.php');
  2. Use the functions listed below to set up whatever filtering you wish to use.
Example:
The following code will display any items whose title does not contain the word "microsoft", as long as its title or description contains either the word "apple" or the word "adobe":

FilterCarpAdd('title','microsoft','','!');
FilterCarpStartGroup('and');
FilterCarpAdd('title,desc','apple');
FilterCarpAdd('title,desc','adobe','or');
Note that the above example leaves out a few settings which are optional. The full code including the unnecessary settings is shown below for instructive purposes:

FilterCarpInOrOut('in');
FilterCarpAdd('title','microsoft','','!');
FilterCarpStartGroup('and');
FilterCarpAdd('title,desc','apple');
FilterCarpAdd('title,desc','adobe','or');
FilterCarpEndGroup();
"FilterFilterCarpInOrOut('in');" was unnecessary at the beginning because "in" is the default. "FilterCarpEndGroup();" was unnecessary at the end because no other settings followed which were not to be included in that group. See below for more information about each function.

Functions: