Smartfeed Mod

Mods etc.

Moderator: Integra Moderator

Smartfeed Mod

PostAuthor: tekguru » Sun Oct 15, 2006 8:51 am

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);

//
and
for posting replies with quote, or just for quoting stuff.
$post_text =str_replace("
","", $post_text);
$post_text =str_replace("
", "", $post_text);
$post_text =str_replace("
", "", $post_text);
$post_text =str_replace("
", "", $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]*)"?)]/si", "", $post_text);
$post_text =preg_replace("/[quote]*)"?)]/si", "", $post_text);

//
    and [list type=x] for (un)ordered lists.
    // unordered lists
    $post_text =str_replace("
      ", "", $post_text);
      // li tags
      $post_text =str_replace("
    • ", "", $post_text);
      // ending tags
      $post_text =str_replace("
    ", "", $post_text);
    $post_text =str_replace("
", "", $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!
Last edited by tekguru on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
[size=99px]http][/size]
[url=http][img=left]http://www.4winmobile.com/news/MVP_Horizontal_FullColor.png[/img][/url]
User avatar
tekguru
Sr Integra Member
Sr Integra Member
 
Posts: 329
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 28, 2006 10:29 pm
Cash on hand: 0.00

PostAuthor: tekguru » Thu Oct 19, 2006 7:40 am

Erm... BUMP <img> ??
Last edited by tekguru on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
[size=99px]http][/size]
[url=http][img=left]http://www.4winmobile.com/news/MVP_Horizontal_FullColor.png[/img][/url]
User avatar
tekguru
Sr Integra Member
Sr Integra Member
 
Posts: 329
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 28, 2006 10:29 pm
Cash on hand: 0.00


Return to IntegraMOD Modifications

Who is online

Registered users: Bing [Bot], Vendethiel