Social networks for IIF 2009
This is what people have posted about the Innovative Ideas Forum. If you are posting about the forum, please tag your blog posts, presentations or flickr photos . If you are using twitter, use the hash-tag # in your tweets.
";
//Loop through the feed
foreach ($rss->items as $item) {
$tweet = $item['title'];
$published = $item['published'];
$url = $item['link'];
// Start manipulating the tweet
$tweet=split(":",$tweet,2);
$user=$tweet[0];
$post=$tweet[1];
//Convert URL's with protocol prefix
$post=ereg_replace("[a-zA-Z]+://([-]*[.]?[a-zA-Z0-9_/-?&%])*","\\0",$post);
//Convert URL with just www.
$post=ereg_replace("(^| |\n)(www([-]*[.]?[a-zA-Z0-9_/-?&%])*)","\\1\\2",$post);
//Convert @ replies
$post=ereg_replace("(^| |\n)(\@([-]*[.]?[a-zA-Z0-9_/-?&%])*)","\\1\\2",$post);
$post=str_replace("/@","/",$post);
// Break down the date components
$year=substr($published,0,4);
$month=substr($published,5,2);
$day=substr($published,8,2);
$hour=substr($published,11,2);
$minute=substr($published,14,2);
$second=substr($published,17,2);
//Make the date
$postTime=mktime($hour,$minute,$second,$month,$day,$year);
//Calculate how long ago the post was made
//NOTE: using daylight saving time
$time=time()-(60*60*11)-$postTime;
//Reset values
$t=0;
$u="";
if($time<60) {
$t=$time;
$u="second";
}
if($time<60*60 && $time>=60) {
$t=ceil($time/60);
$u="minute";
}
if($time<60*60*24 && $time>=60*60) {
$t=ceil($time/60/60);
$u="hour";
}
if($time<60*60*24*30 && $time>=60*60*24) {
$t=ceil($time/60/60/24);
$u="day";
}
if($time<60*60*24*30*12 && $time>=60*60*24*30) {
$t=ceil($time/60/60/24);
$u="month";
}
//Check if it's singular or plural
$t!=1?$u.="s ago":$u.=" ago";
echo "$user $post - $t $u ";
$i++;
}
echo "";
if($i>0) {
echo "";
} else {
echo "
There are no tweets...yet
"; } } else { echo "There are no tweets to display
"; } ?>
items, 0, $display);
echo "
- \n";
# builds html from array
foreach ( $items as $item ) {
if(preg_match('', $item['description'],$imgUrlMatches)) {
$imgurl = $imgUrlMatches[1];
# change to smaller pictures
if (!$mediumPics) {
$imgurl = str_replace("m.jpg", "s.jpg", $imgurl);
}
$title = $item['title'];
$url = $item['link'];
preg_match('
- " ."" ." \n"; } else { print "
- " ."" ." \n"; } } } echo "
";
foreach ($rss->items as $item) {
$href = $item['link'];
$title = $item['title'];
$description = $item['description'];
echo "$title
"; echo "$description ";
$i++;
}
echo "";
if($i>0) {
echo "
"; echo "$description
View more blog posts at Google blogs
"; } else { echo 'Nobody has posted to their blog...yet
'; } } else { echo 'There are no blog posts to display
'; } ?>
";
foreach ($rss->items as $item) {
$href = $item['link'];
$title = $item['title'];
$description = $item['description'];
echo "$title
"; echo "$description ";
$i++;
}
echo "";
if($i>0) {
echo "
"; echo "$description
View more blog posts at Technorati
"; } else { echo 'Nobody has posted to their blog...yet
'; } } else { echo 'There are no blog posts to display
'; } ?>