I’m starting a new segment on this blog today called “CaRP In The Wild” where I’ll spotlight noteworthy uses of CaRP. First up is Shawn Collins’ website for his Affiliate Summit conference. It’s a semi-annual event (once in the west and once in the east) that pulls in thousands of participants (you can see the massive list on his homepage).
Shawn created a “hash tag” for use on Twitter when talking about the upcoming conference (#asw09 for “Affiliate Summit West ‘09″), and is using using Twitter’s search feed feature along with CaRP Evolution to display the latest tweets containing that tag on the Affiliate Summit homepage.

Shawn emailed me to ask how to fix a few display issues, so we started from the code I use to display my Twitter feed in my blog sidebar, and ended up with this:
<?php
function LinkMyURL($ii,$fn,$iind,$in,$va,$rv) {
return preg_replace('#.*twitter.com/([^/]+)/.*#', '\\1: ',
$GLOBALS['carpconf']['rssparser']->GetFieldValue('url')).
preg_replace('#(http://[-\\w./]{1,22})([-\\w./]*)#',
'<a target="_blank" href="\\1\\2">\\1</a>', $va['TITLE']);
}
function DoMyConfig() {
CarpConf('iorder','image,url,date,mytitle');
CarpRegisterCallback('','LinkMyURL','handlefield','mytitle');
CarpConf('cborder','');
CarpConf('idateformat','j-M@g:ia');
CarpConf('aidate','</i> - ');
CarpConf('ai','<br style="clear:left;" /><br />');
CarpConf('maxitems',5);
CarpConf('encodingout','UTF-8');
CarpConf('biurl','<a target="_blank" href="');
CarpConf('aiurl','">Go »</a> ');
CarpConf('biimage', '<div style="float:left;margin-right:10px;">');
CarpConf('aiimage', '</div>');
CarpConf('timeoffset', -300);
}
require_once '/PATH/TO/carp/carp.php';
CarpRegisterCallback('','DoMyConfig','cachemiss','');
CarpCacheShow('http://search.twitter.com/search.atom?q=%23asw09','twitter_asw09');
?>
It’s a great example of using CaRP with a social media site to add relevant, auto-updating content to your website.
Related Posts
- Mike Dillard Uses ExPop To Double Conversions
- Twidget/WP Lists Latest Twitter Posts in Your WordPress Sidebar
- 2 Crazy Deals – Promoting My Competition!
- Winners of the Contest to Rename CaRP Evolution
- What Makes A Great Case Study?
- Contest to Rename CaRP Evolution Till January 31
- “The Swiss Army Knife of RSS Scripts” – 2 New Plugins for CaRP Evolution
January 10th, 2009 at 1:06 am
great info… thanks