No.
Penned by at 12:00am.
// TwitterSixWords: Visualizing entries from the Twitter/SmithMag contest // Date: November 23, 2006 // Author: Chris Messina ( http://factoryjoe.com ); // License: Do whatever you want with this. // License of entries: All entries are the respective property of their original authors. // Notes: Heavily borrowed from the work of David Kadavy's TwitterBlog script. Supports hAtom and hCard. // Requested feature: Make it display "x minutes ago" etc. instead of the date of the twit // Requested feature: Need to be able to browse RSS entries using a "page" metaphor -- i.e. click on page numbers to go forward and back in history // Requested cleanup: Regex to remove smithmag from beginning of message needs cleanup in case people use 'smithmag' in their entry //========BEGIN STUFF FOR YOU TO MODIFY======= // be sure to download and install Magpie RSS ( http://magpierss.sourceforge.net/ ) and enter the path to it here $magpath = 'magpierss/rss_fetch.inc'; // public URL of the Twitter SmithMag feed? $url = 'http://twitter.com/statuses/smithmag_timeline.rss'; // how many of your latest twits do you want to display? $num_items = 1; //========END STUFF FOR YOU TO MODIFY======= require_once($magpath); $rss = fetch_rss($url); function stripdate($whatdate) { $date = ereg_replace('\+0000', '', $whatdate); return $date; } function notime($whatprevious) { $notime = ereg_replace('([0-9]{2}):([0-9]{2}):([0-9]{2})', '', $whatprevious); return $notime; } $items = array_slice($rss->items, 0, $num_items); //load up the rss items into an array foreach ($items as $item) { $bookmark = $item['link']; $link = split('/', $item['link']); $username = $link[3]; $guid = end($link); $date = $item['pubdate']; $desc = split(':', $item['description']); //split up the twitter message $author = $desc[0]; $short_desc = ereg_replace('smithmag', '',end($desc)); //move position to first whitespace char, skipping over any smithmag variants $clean_date = stripdate($date); } //date_convert function from phpfreaks.com http://www.phpfreaks.com/quickcode/Date_Convert_Function/256.php function date_convert($date,$type){ $date_year=substr($date,0,4); $date_month=substr($date,5,2); $date_day=substr($date,8,2); if($type == 1): // Returns the year Ex: 2003 $date=date("Y", mktime(0,0,0,$date_month,$date_day,$date_year)); elseif($type == 2): // Returns the month Ex: January $date=date("F", mktime(0,0,0,$date_month,$date_day,$date_year)); elseif($type == 3): // Returns the short form of month Ex: Jan $date=date("M", mktime(0,0,0,$date_month,$date_day,$date_year)); elseif($type == 4): // Returns numerical representation of month with leading zero Ex: Jan = 01, Feb = 02 $date=date("m", mktime(0,0,0,$date_month,$date_day,$date_year)); elseif($type == 5): // Returns numerical representation of month without leading zero Ex: Jan = 1, Feb = 2 $date=date("n", mktime(0,0,0,$date_month,$date_day,$date_year)); elseif($type == 6): // Returns the day of the week Ex: Monday $date=date("l", mktime(0,0,0,$date_month,$date_day,$date_year)); elseif($type == 7): // Returns the day of the week in short form Ex: Mon, Tue $date=date("D", mktime(0,0,0,$date_month,$date_day,$date_year)); elseif($type == 8): // Returns a combo ExL Wed,Nov 12th,2003 $date=date("D, M jS, Y", mktime(0,0,0,$date_month,$date_day,$date_year)); elseif($type == 9): // Returns a combo Ex: November 12th,2003 $date=date("F jS, Y", mktime(0,0,0,$date_month,$date_day,$date_year)); endif; return $date; }; ?>
Presenting entries from the SMITH Mag/Twitter Contest.
Source code based on the work of David Kadavy.