Code: Select all
// [code] and [ /CODE ] for posting code (HTML, PHP, C etc etc) in your posts.
$post_text =str_replace("[code:1:$uid]","", $post_text);
$post_text =str_replace("[/code:1:$uid]", "", $post_text);
$post_text =str_replace("[code:$uid]", "", $post_text);
$post_text =str_replace("[/code:$uid]", "", $post_text);
// [quote]
and
[/quote] for posting replies with quote, or just for quoting stuff.
$post_text =str_replace("[quote:1:$uid]","", $post_text);
$post_text =str_replace("[/quote:1:$uid]", "", $post_text);
$post_text =str_replace("[quote:$uid]", "", $post_text);
$post_text =str_replace("[/quote:$uid]", "", $post_text);
// New one liner to deal with opening quotes with usernames...
// replaces the two line version that I had here before..
$post_text =preg_replace("/\[quote:$uid=(?:\"?([^\"]*)\"?)\]/si", "", $post_text);
$post_text =preg_replace("/\[quote:1:$uid=(?:\"?([^\"]*)\"?)\]/si", "", $post_text);
// [list] and [list=x] for (un)ordered lists.
// unordered lists
$post_text =str_replace("[list:$uid]", "", $post_text);
// li tags
$post_text =str_replace("[*:$uid]", "", $post_text);
// ending tags
$post_text =str_replace("[/list:u:$uid]", "", $post_text);
$post_text =str_replace("[/list:o:$uid]", "", $post_text);
// Ordered lists
$post_text =preg_replace("/\[list=([a1]):$uid\]/si", "", $post_text);
// colours
// $post_text =preg_replace("/\[color=(\#[0-9A-F]{6}|[a-z]+):$uid\]/si", "", $post_text);
// $post_text =str_replace("[/color:$uid]", "", $post_text);
// url #2
$post_text =str_replace("[url]","", $post_text);
$post_text =str_replace("[/url]", "", $post_text);
// url /\[url=([a-z0-9\-\.,\?!%\*_\/:;~\\&$@\/=\+]+)\](.*?)\[/url\]/si
$post_text =preg_replace("/\[url=([a-z0-9\-\.,\?!%\*_\/:;~\\&$@\/=\+]+)\]/si", "", $post_text);
$post_text =str_replace("[/url:$uid]", "", $post_text);
// img
$post_text =str_replace("[img:$uid]","", $post_text);
$post_text =str_replace("[/img:$uid]", "", $post_text);
// email
$post_text =str_replace("[email:$uid]","", $post_text);
$post_text =str_replace("[/email:$uid]", "", $post_text);
// size
$post_text =preg_replace("/\[size=([\-\+]?[1-2]?[0-9]):$uid\]/si", "", $post_text);
$post_text =str_replace("[/size:$uid]", "", $post_text);
// align
$post_text =preg_replace("/\[align=(left|right|center|justify):$uid\]/si", "", $post_text);
$post_text =str_replace("[/align:$uid]", "", $post_text);
// [b] and [/b] for bolding text.
$post_text =str_replace("[b:$uid]","", $post_text);
$post_text =str_replace("[/b:$uid]", "", $post_text);
// [u] and [/u] for underlining text.
$post_text =str_replace("[u:$uid]", "", $post_text);
$post_text =str_replace("[/u:$uid]", "", $post_text);
// [i] and [/i] for italicizing text.
$post_text =str_replace("[i:$uid]", "", $post_text);
$post_text =str_replace("[/i:$uid]", "", $post_text);
// [acronym] and [/acronym] for italicizing text.
$post_text =str_replace("[acronym:$uid=([a-z0-9\-\.,\?!%\*_\/:;~\\&$@\/=\+]+)\]/si", "", $post_text);
$post_text =str_replace("[/acronym:$uid]", "", $post_text);