Well I am now finally all moved into college. It's the same place the iPhone unlocker is going to. There haven't been as many updates recently just because I've been slightly busy. The good news is that league planning and development has been green-lighted.
But Where's Clans??? They're on their way. Just need testing and tweaking and what-not. Unfortunately I am not paid to twiddle my thumbs. Although I am paid to tap on the keyboard.
Anyhow, I leave you with one last nice little snippet of code. Have you ever wanted to generate links (a tags) in user input? Ever just give up when you realize that there might be HTML input in there as well, and your simple attempt fails when someone does something like: <a href="http://www.google.com">http://www.google.com</a> and your link generator ends up creating: <a href="<a href="http://www.google.com">http://www.google.com</a>"><a href="http://www.google.com">http://www.google.com</a></a>. Well, fear not, with a bit of advanced regular expressions, I came up with this solution:
function Linkify($input) {
return preg_replace('/ (http:\/\/|[^\/]www\.)([a-z0-9]+[a-z0-9\._%,#&-;?\/:]+)(?!<)/i', '<a href="http://\\2" rel="nofollow" target="_blank">\\1\\2</a>', ' ' . $input);
}
Anyhow enjoy!