Follow me on Twitter – with the help from Ping.fm

By the way, I am trying to keep myself more up-to-date on Twitter recently, so don’t forget to follow @dazecoop. My Tweets are varied between computer/geek/work related and personal/casual – you have been warned :)

Also, in the past, I blogged about a web application known as Hellotxt which has the ability to update Facebook/Twitter status’s at the same time. Very cool. However, I’ve since found Ping.fm – quicker, more features and better supported on my iPhone.

Highly recommended – just one simple place to update all your status’s!

 

Twitter latest WordPress plugin, with “how long ago”

After saying on my previous post about using Twitter and (maybe) a new design for Dazecoop, I needed to find a WordPress Plugin to grab the RSS feed of my Twitter account, then display it nicely on my WP header.

Simple Twitter seemed to fit the bill nicely, and within about 40 seconds of installing it, my latest “tweet” was in my header for all to see – not only that but Simple Twitter includes a caching feature as not to bombard Twitter too much.

After installing it though, I was a little disappointed to see that it didn’t return how long ago my latest tweet was made. Booger! I had a quick look at the code and decided to hack-my-way in so grab this information…

Basically, within the function update_twitter_message(), I added in this code below line 141:

// ** modifications to show how long ago tweet was made

// ** quick & dirty hack - c'mon, its 1am!...

// ** accuracy all depends on cache time, i use re-cache every 15 mins

// ** by David Cooper - www.dazecoop.co.uk

$timenow = time();

$pubdate = strtotime(get_message_from_url($url, 'pubDate', 'item'));

$minutespast = round(($timenow - $pubdate) / 60);

$hourspast = round($minutespast / 60);

$dayspast = round($hourspast / 24);

if ($minutespast < 2) {

	$returnTimepast = 'a few minutes ago';

} elseif ($minutespast < 55) {

   $returnTimepast = 'roughly ' . $minutespast . ' minutes ago';

} elseif (($minutespast > 55) && ($minutespast < 110)) {

   $returnTimepast = 'about an hour ago';

} elseif ($hourspast < 23) {

   $returnTimepast = $hourspast . ' hours ago';

} elseif (($hourspast > 23) && ($hourspast < 47)) {

   $returnTimepast = 'yesterday';

} else {

   $returnTimepast = $dayspast . ' days ago';

}

$title = get_message_from_url($url) . ' <small>' . $returnTimepast . '</small>';

//$title = get_message_from_url($url);

// ** end modifications

The $title variable is the only thing that I’ve changed, original is:

$title = get_message_from_url($url);

And my version is now:

$title = get_message_from_url($url) . ' <small>' . $returnTimepast . '</small>';

Job done! And works wonders

 

Twitter / Facebook status updates at the same time?

For a while now I’ve wanted to use Twitter – a website service that shows your current “status”, whatever you may set it to. A bit like the Facebook status, but a website dedicated just to the status itself. Very Web 2.0-ey.

I’ve been wanting to use Twitter for a while because they offer feeds in which I could import to my website (right here!) for ya’ll to see, which would be neat. However, I’ve always been annoyed with the fact I’d have to update both my Facebook status and Twitter status separately.

What I wanted was one place to do both…

Say Hello to Hellotxt. Hello…

Yeh, well, Hellotxt.com does exactly that – plus others. Very awesome. Watch out on the next design of this site (very soon now) for a Twitter-style status update, so everyone always knows what I’m doing.

Ultimately sad, but cool… And talking of which, here’s some links to some of my profiles/feeds and whatnot