Ass Hat
Home
News
Events
Bands
Labels
Venues
Pics
MP3s
Radio Show
Reviews
Releases
Buy$tuff
Forum
  Classifieds
  News
  Localband
  Shows
  Show Pics
  Polls
  
  OT Threads
  Other News
  Movies
  VideoGames
  Videos
  TV
  Sports
  Gear
  /r/
  Food
  
  New Thread
  New Poll
Miscellaneous
Links
E-mail
Search
End Ass Hat
login

New site? Maybe some day.
Username:
SPAM Filter: re-type this (values are 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E, or F)
Message:


UBB enabled. HTML disabled Spam Filtering enabledIcons: (click image to insert) Show All - pop

b i u  add: url  image  video(?)
: post by the_reverend at 2003-07-25 10:25:01
http://www.randomactsofviolence.com
if you put the http:// before it it'll linkify it.
I couldn't figure out the regular expression to do just www.xx.on

if anyone else is better at regex, feel free to point out flaws/fixes


$string = eregi_replace("(^|[>[:space:]\n])([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/&=])([<[:space:]\n]|$)","\\1<a href=\"\\2://\\3\\4\" target=\"_blank\">\\2://\\3\\4</a>\\5", $string);


// plain, www.domain.com, http://www.domain.com
$string = preg_replace("/(\[URL\])[\s]+/" ,"\\1" , $string);
$string = preg_replace("/[\s]+(\[\/URL\])/" ,"\\1" , $string);
//$string = preg_replace("/[^\]](\s)*(<BR>)*(\s)*[http:\/\/]*(www.[a-zA-Z0-9\.\/\~\-\=\%\?\&\_\+]+)\b/", "\\1\\2\\3<A HREF=\"http://\\4\" TARGET=5>http://\\4</a>", $string);
//
$string = preg_replace("/(\[URL\])(http|https|ftp)(:\/\/\S+?)(\[\/URL])/" ,"<A HREF=\"\\2\\3\" TARGET=5>\\2\\3</A> " , $string);
$string = preg_replace("/(\[URL\])(\S+?)(\[\/URL])/" , "<A HREF=\"http://\\2\" TARGET=3>\\2</A>" , $string);
$string = preg_replace("/(\[URL=)(http|https|ftp)(:\/\/\S+)(])(.+?)(\[\/URL\])/" , "<A HREF=\"\\2\\3\" TARGET=6>\\5</A>" , $string);
$string = preg_replace("/(\[URL=)(\S+)(\])(.+?)(\[\/URL])/" , "<A HREF=\"http://\\2\" TARGET=4>\\4</A>" , $string);
[default homepage] [print][1:13:55am May 23,2024
load time 0.02777 secs/10 queries]
[search][refresh page]