Smartfeed Mod

On 4WM I use the [url=http]Smartfeed Mod[/url] which ensures that closed forums posts are not sent out through RSS.
This works well excepting that it does not handle non-standard PhpBBS BBCodes that are used within IM. Therefore one gets problems like:
[flash=,:mnmg4dyf]http://www.4winmobile.com/news/rss_example.png[/flash:mnmg4dyf]
It seems to me it should be easy enough to fix by adding in the missing BBCodes, a la:
[code] // [code] and [ /CODE ] for posting code (HTML, PHP, C etc etc) in your posts.
$post_text =str_replace("[code]","", $post_text);
$post_text =str_replace("[/code]", "", $post_text);
$post_text =str_replace("[code]", "", $post_text);
$post_text =str_replace("[/code]", "", $post_text);
//
$post_text =str_replace("
$post_text =str_replace("
// 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]*)"?)]/si", "", $post_text);
$post_text =preg_replace("/[quote]*)"?)]/si", "", $post_text);
//
// Ordered lists
$post_text =preg_replace("/[list type=([a1])]/si", "", $post_text);
// colours
// $post_text =preg_replace("/[color=(#[0-9A-F]{6}|[a-z]+)]/si", "", $post_text);
// $post_text =str_replace("[/color]", "", $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]", "", $post_text);
// img
$post_text =str_replace("[img]","", $post_text);
$post_text =str_replace("[/img]", "", $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=99px]/si", "", $post_text);
$post_text =str_replace("[/size]", "", $post_text);
// align
$post_text =preg_replace("/[align=(left|right|center|justify):$uid]/si", "", $post_text);
$post_text =str_replace("[/align:$uid]", "", $post_text);
// and for bolding text.
$post_text =str_replace("","", $post_text);
$post_text =str_replace("", "", $post_text);
// and for underlining text.
$post_text =str_replace("", "", $post_text);
$post_text =str_replace("", "", $post_text);
// and for italicizing text.
$post_text =str_replace("", "", $post_text);
$post_text =str_replace("", "", $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);
[/code]
But this fails. Would any kind soul be free to take a look at the Smartfeed Mod and advise what needs changing so the additional codes we all use are parsed.
Thanks very much in advance!
This works well excepting that it does not handle non-standard PhpBBS BBCodes that are used within IM. Therefore one gets problems like:
[flash=,:mnmg4dyf]http://www.4winmobile.com/news/rss_example.png[/flash:mnmg4dyf]
It seems to me it should be easy enough to fix by adding in the missing BBCodes, a la:
[code] // [code] and [ /CODE ] for posting code (HTML, PHP, C etc etc) in your posts.
$post_text =str_replace("[code]","", $post_text);
$post_text =str_replace("[/code]", "", $post_text);
$post_text =str_replace("[code]", "", $post_text);
$post_text =str_replace("[/code]", "", $post_text);
//
for posting replies with quote, or just for quoting stuff.and
$post_text =str_replace("
", "", $post_text);","", $post_text);
$post_text =str_replace("
$post_text =str_replace("
", "", $post_text);", "", $post_text);
$post_text =str_replace("
// 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]*)"?)]/si", "", $post_text);
$post_text =preg_replace("/[quote]*)"?)]/si", "", $post_text);
//
- and [list type=x] for (un)ordered lists.
- ", "", $post_text);
// ending tags
$post_text =str_replace("
// unordered lists
$post_text =str_replace("
- ", "", $post_text);
// li tags
$post_text =str_replace("
$post_text =str_replace("
// Ordered lists
$post_text =preg_replace("/[list type=([a1])]/si", "", $post_text);
// colours
// $post_text =preg_replace("/[color=(#[0-9A-F]{6}|[a-z]+)]/si", "", $post_text);
// $post_text =str_replace("[/color]", "", $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]", "", $post_text);
// img
$post_text =str_replace("[img]","", $post_text);
$post_text =str_replace("[/img]", "", $post_text);
$post_text =str_replace("[email:$uid]","", $post_text);
$post_text =str_replace("[/email:$uid]", "", $post_text);
// size
$post_text =preg_replace("/[size=99px]/si", "", $post_text);
$post_text =str_replace("[/size]", "", $post_text);
// align
$post_text =preg_replace("/[align=(left|right|center|justify):$uid]/si", "", $post_text);
$post_text =str_replace("[/align:$uid]", "", $post_text);
// and for bolding text.
$post_text =str_replace("","", $post_text);
$post_text =str_replace("", "", $post_text);
// and for underlining text.
$post_text =str_replace("", "", $post_text);
$post_text =str_replace("", "", $post_text);
// and for italicizing text.
$post_text =str_replace("", "", $post_text);
$post_text =str_replace("", "", $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);
[/code]
But this fails. Would any kind soul be free to take a look at the Smartfeed Mod and advise what needs changing so the additional codes we all use are parsed.
Thanks very much in advance!