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:

function LinkMyURL($ii,$fn,$iind,$in,$va,$rv) {
    return preg_replace('#.*twitter.com/([^/]+)/.*#', '\\1: ',
    		'<a target="_blank" href="\\1\\2">\\1</a>', $va['TITLE']);

function DoMyConfig() {

    CarpConf('aidate','</i> - ');
    CarpConf('ai','<br style="clear:left;" /><br />');
    CarpConf('biurl','<a target="_blank" href="');
    CarpConf('aiurl','">Go &raquo;</a> ');
	CarpConf('biimage', '<div style="float:left;margin-right:10px;">');
	CarpConf('aiimage', '</div>');
	CarpConf('timeoffset', -300);

require_once '/PATH/TO/carp/carp.php';



It's a great example of using CaRP with a social media site to add relevant, auto-updating content to your website.

Reader Comment:
Andy said:
great info... thanks
(join the conversation below)