CaRP: Caching RSS Parser - Manual
Version 3.5.4 (10/7/2004)
NOTE: This version of CaRP is obsolete.
This documentation is being left here for those who have not yet upgraded to the current version.
Download |
Installation |
Configuration |
Upgrading from version 2 |
Functions |
Examples |
Donations
Old documentation: Version 2
Examples:Styles & Classes |
Multiple Feeds on a Page |
Unordered List |
Background Refreshing |
Filtering |
Aggregating 1 |
Aggregating 2 |
Amazon.com Associates |
JavaScript
The following code will display the Next Week Times RSS feed as shown in the right hand column.
First, in the <head> section of your webpage, define a few CSS styles:
<style type="text/css">
.h2 {
font-family: Trebuchet MS,Palatino,Times New Roman,serif;
font-size: 13pt;
font-weight: bold;
}
.h3 {
font-family: Verdana,Arial,Helvetica,sans-serif;
font-size: 9pt;
font-weight: bold;
}
</style>
Then, this code in the <body> of your webpage will display the newsfeed.
Notice the use of "h2" and "h3", the classes defined above.
<div style="width:220px;border:1px solid #333333; background:#eeeeee; padding:5px;">
<?php
require_once "/path/to/carp.php";
// Show 3 items
CarpConf('maxitems',3);
// surround the item link with a DIV
CarpConf('bilink','<div style="background:#cccccc; width:210px; padding:2px; border:1px solid #333333;">');
CarpConf('ailink','</div>');
// get rid of the underline under the links
CarpConf('ilinkstyle','text-decoration:none');
// set the CSS classes of the channel and item links
CarpConf('clinkclass','h2');
CarpConf('ilinkclass','h3');
// Display it
CarpCacheShow('http://nwt.mouken.com/rss/headlines.rdf');
?>
</div>