Check out Half-Life Re-imagined competition results!
Check out Skewing textures in Hammer, our newest tutorial!
Say hello to novandro150, our newest member!

logo

Site Stuff

Reference

Maps

Community

ShoutBOX

Poll

Feeling Blue

What's your favourite shade of blue?

Azure

16

Cobalt

32

Turquoise

10

Cyan

11

Royal

11

Teal

3

Onliners

19 mins

potatis_invalid

22 mins

Kurosaki Ichigo

39 mins

Tetsu0

50 mins

Jessie

52 mins

Windawz

1 hours

The Mad Carrot

1 hours

NineTnine

Affiliates

A gaming and technology blog by TWHL admins Penguinboy and Ant. A music blog by TWHL users Ant and Hugh.

PHP URL Tag Formatting

By Chris 'autolycus' Bokitch

The url tags on this site and on the Chatbear message board system (which most of my tags are based on) use this format:

    url=http://www.url.com/[url description]url

This is parsed from a block of text ($string) using the following PHP code:

$string = preg_replace("/url=(.*?)\[/", "<a href=\"\\1\">", $string);
$string = ereg_replace("\]url", "</a>", $string);

So, you can do something like this ...

    url=http://collective.valve-erc.com/[VERC Collective]url

...and you'll get this ...