VERC: PHP URL Tag Formatting Last edited 15 years ago2003-01-11 17:53:00 UTC by Penguinboy Penguinboy

This article was recovered from an archive and needs to be reviewed

  1. The formatting may be incorrect as it was automatically converted to WikiCode from HTML, it needs to be revised and reformatted
  2. Some information may be out of date as it was written before Half-Life was available on Steam
  3. After the article is re-formatted and updated for Steam HL, remove this notice
  4. Please do not remove the archive notice from the bottom of the article.
  5. Some archive articles are no longer useful, or they duplicate information from other tutorials and entity guides. In this case, delete the page after merging any relevant information into other pages. Contact an admin to delete a page.
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 =[/b] http://www.url.com/ [ url description [b]]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 ...

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

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

VERC Collective (Link: )
This article was originally published on the Valve Editing Resource Collective (VERC).
TWHL only archives articles from defunct websites. For more information on TWHL's archiving efforts, please visit the TWHL Archiving Project page.

Comments

You must log in to post a comment. You can login or register a new account.