My Twitter

Are tags on a blog post a waste of time?

February 20th, 2010

I recently received a question regarding why I have taken down the tags on my posts. The reason was because watched a video from google (Also embedded below) which made me wounder how much they are benefiting (and being used by) my users. After a brief test (I watched how many people were using the tag pages) I found that very few users actually were using them.

The best way to summarize what I found would be:

For every 246 human users clicking a link on a page, 1 would be clicking a tag link.

Widget Sets for Socialize This

January 9th, 2010

I’ve just finished a quick update on my wordpress plugin Socialize This which increases the functionality of the Widget Sets. If you want to try out a few new Widgets in Socialize This take a look at the Widget Sets page.

Also, if you have made some Widgets and would like them listed on the Widget Sets page, contact me.

URL Shortening Function

January 8th, 2010

Here is a function I use from time to time in my code which I thought I should share. It allows you to quickly shorten URL’s via 6 popular URL shortening websites.

function shorten_url($url, $service=NULL){
		if($service== 'tinyurl'){return get_link('http://tinyurl.com/api-create.php?url='.urlencode($url));}
		elseif($service == 'urly'){return get_link('http://ur.ly/new.txt?href='.urlencode($url));}
		elseif($service == 'isgd'){return get_link('http://is.gd/api.php?longurl='.urlencode($url));}
		elseif($service == 'klam'){return get_link('http://kl.am/api/shorten/?format=text&url='.urlencode($url));}
		elseif($service == 'unu'){return get_link('http://u.nu/unu-api-simple?url='.urlencode($url));}
		else{return get_link('http://api.tr.im/v1/trim_simple?url='.urlencode($url));}
		return $url;
	}

	function get_link($url){
		if(function_exists('curl_init')){
			$ch = curl_init();
			curl_setopt($ch, CURLOPT_VERBOSE, 1);
			curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
			//curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
			//curl_setopt($ch, CURLOPT_POST, 1);
			curl_setopt($ch, CURLOPT_URL, $url);
			$result = curl_exec($ch);
			$resultArray = curl_getinfo($ch);
			if ($resultArray['http_code'] == 200){
				return $result;
			} else {
				return FALSE;
			}
			curl_close($ch);
		}elseif(ini_get('allow_url_fopen') == 1){
			return fopen($url, 'r');
		}
		return FALSE;
	}

/* Usage */
echo shorten_url('http://www.fullondesign.co.uk/');
// returns: http://tr.im/JPCz

PHP Function: realpath()

December 19th, 2009

One functions I wish I had known about when i start learned PHP is the realpath() function. Pretty much what it does is take symbolic link (such as ‘../’ or ‘/’) and returns a canonicalized absolute link (like ‘/home/public_html/folder’). Here is an example of it in action:

<?php
echo realpath('../');
// Would return: /home/mike/www/blogposts
?>

Video: Stop Sign Designed by Committee

December 17th, 2009

My motto is “Clients are idiots”, though if you let them know this odds are you will not be paid. I tend to find this motto is true 90% of the time in the Design/Development field, mostly because clients see you as someone who is paid to make something the way they want to, not in a way that will look good & be functional. Here is a video which pretty much sums up why clients suck.

Click here to go to the original source of the video.