
List Price: $40.00
Amazon Price: $23.74
Used Price: $25.85
It's been called "the bible for startups" and "the best $40 investment a startup can make" (on sale at Amazon.com for far less)! A startup without customers is ...

List Price: $20.00
Amazon Price: $12.60
Used Price: $7.33
THE NEW YORK TIMES AND USA TODAY BESTSELLER!
The secret to successful word-of-mouth marketing on the social web is easy: BE LIKEABLE.
A friend?s recommendat...

List Price: $22.95
Amazon Price: $14.58
Used Price: $12.88
Go from ZERO to $10,000 a month in 28 days and discover financial freedom online!
Every day thousands of people are losing their jobs, their income, and their sec...

List Price: $24.95
Amazon Price: $16.47
Used Price: $13.43
BE YOUR OWN BOSS
?Entrepreneurs enjoy a freedom few ever know. Starting your own business is one of the few remaining paths to wealth?and this book is a v...

List Price: $24.95
Amazon Price: $14.71
Used Price: $14.93
Have you ever wanted to have a business that works while you play? Have you ever wanted the flexibility to live life on your terms? How many times have you had a...
Output Examples
This page demonstrates just a few of the infinite number of ways you could format an RSS feed to match the style of your website using CaRP.
I'm using an Amazon.com affiliate feed that I generate using Grouper Evolution, but I could just as easily use national news headlines from the New York Times, a technology-themed feed from Slashdot, the feed from my neighbor's weblog, or any other RSS feed.
Click the links throughout this document to reformat the feed on the right side of this page.
Notes:- Displaying the book cover images and author names requires CaRP Evolution.
- When looking at the example code below, think "b" = "before", "a" = "after", "i" = "item", "c" = "channel" -- it may all look a little cryptic at first, but when you get used to the abbreviations, it makes a lot more sense.
- The code in many of the examples could be made more efficient by moving some of the code to a CSS stylesheet. I'm putting all of the CSS code into the example code for simplicity.
- I'm not applying backgound colors, borders, etc. to any of the examples -- that can be done in the webpage's HTML that surrounds the example code.
- In all of the examples, the code "CarpConf('cborder', '');" tells CaRP not to display any "channel" (the "c" in "cborder") data before (the "b" in "cborder") the items in the feed. (The channel data includes things like the feed name, feed description, etc.)
- In all of the examples, the code "CarpConf('maxitems', 5);" tells CaRP not to display at most 5 items from the feed. By default, all of the items (15 in a typical feed) would be displayed.
- In all of the examples, the URL (address) of the RSS feed in the "CarpCacheShow" line has been changed to ensure that it will fit the width of this page.
Default Format - Show It
The default formatting of the feed when you first come to this page displays the book cover floated to the left of the book title. The title is bolded with an extra 8 pixels between it and the author's name. The author's name is italicized (CaRP's default setting). Up to 220 characters are displayed from the description, which includes the price, average customer rating, the beginning of a customer review, etc. An extra line of space is added between each book.
The code required to accomplish all of this is as follows Don't worry if this code looks a little confusing -- the CaRP installer will tell you the exact code to use to display an RSS feed on your website. You can learn how to customize it a little at a time, or just copy and paste some of the code from this page.
<?php
require_once '/path/changed/for/security/carp.php';
CarpConf('cborder', '');
CarpConf('maxitems', 5);
CarpConf('biimage', '<div style="float:left; margin:2px 8px 2px 0;">');
CarpConf('aiimage', '</div>');
CarpConf('ilinkstyle', 'display:block; margin-bottom:8px; font-weight:bold;');
CarpConf('ailink', '');
CarpConf('maxidesc', 220);
CarpConf('ai', '<br />');
CarpCacheShow('http://example.com/amazon_feed.rss');
?>
Move The Image Under The Title - Show It
Moving the image from floating next to the title to below the title requires only one line of code to be added to the above. Look for the line that sets "iorder" (the order in which the parts of each item are displayed).
<?php
require_once '/path/changed/for/security/carp.php';
CarpConf('cborder', '');
CarpConf('maxitems', 5);
CarpConf('iorder', 'link,image,author,desc');
CarpConf('biimage', '<div style="float:left; margin:2px 8px 2px 0;">');
CarpConf('aiimage', '</div>');
CarpConf('ilinkstyle', 'display:block; margin-bottom:8px; font-weight:bold;');
CarpConf('ailink', '');
CarpConf('maxidesc', 220);
CarpConf('ai', '<br />');
CarpCacheShow('http://example.com/amazon_feed.rss');
?>
Shorten The Title - Show It
Some feeds have really long headlines, which you may want to shorten when you display them on your website. By adding a line of code to set "maxititle", the book titles can be shortened to a maximum of, for example, 60 letters.
<?php
require_once '/path/changed/for/security/carp.php';
CarpConf('cborder', '');
CarpConf('maxitems', 5);
CarpConf('iorder', 'link,image,author,desc');
CarpConf('biimage', '<div style="float:left; margin:2px 8px 2px 0;">');
CarpConf('aiimage', '</div>');
CarpConf('ilinkstyle', 'display:block; margin-bottom:8px; font-weight:bold;');
CarpConf('ailink', '');
CarpConf('maxititle', 60);
CarpConf('maxidesc', 220);
CarpConf('ai', '<br />');
CarpCacheShow('http://example.com/amazon_feed.rss');
?>
Title & Author Only - Show It
Sometimes, you don't want to display all of the available parts of a feed. In this example, we display just the title and author of each book, with the font size of the title increased slightly, and an extra line of space between each book.
<?php
require_once '/path/changed/for/security/carp.php';
CarpConf('cborder', '');
CarpConf('maxitems', 5);
CarpConf('iorder', 'link,author');
CarpConf('ilinkstyle', 'font-size:115%;');
CarpConf('ai', '<br />');
CarpCacheShow('http://example.com/amazon_feed.rss');
?>
Title Only In An "Ordered List" - Show It
In this example, we display just the titles in an "ordered list", with an extra 8 pixels between each item (some of this could be done more efficiently with better use of CSS, but this will do for now!).
<?php
require_once '/path/changed/for/security/carp.php';
CarpConf('cborder', '');
CarpConf('maxitems', 5);
CarpConf('iorder', 'link');
CarpConf('bitems', '<ol>');
CarpConf('aitems', '</ol>');
CarpConf('bi', '<li style="margin-bottom:8px;">');
CarpConf('ai', '</li>');
CarpCacheShow('http://example.com/amazon_feed.rss');
?>
What Else Could You Do With It?
Those are just a few examples of how you could format a feed. You might also change font colors, sizes and other styles, add background colors or even images, show the feed items side-by-side in a table, or do any of a million other things to make the feed look just right on your website.
PO Box 5835
Grand Island, NE 68802