Dev: Adding my own BB codes to UDDEIM messages

1 month 3 days ago #306852 by Quark Zimmerman
I am working on the site where original programmer added his own BB codes by simple "kernel hacking" just changing "function uddeIMbbcode_replace($string, $config)" in bbparser.php and so on by adding something like:
  // message tread
-		$string = preg_replace("/(\[messagequete\])(.*?)(\[\/messagequete\])/si","<div class=\"messagetreadtxt\">\\2</div>",$string);
-                // message avatar
-		$string = preg_replace("/(\[messagavatar\])(.*?)(\[\/messagavatar\])/si","<div class=\"messagavatar\">\\2</div>",$string);  

Which is not only bad practice but also not maintainable.
I want to fix it proper way , is there in UDDEIM capability to add new BB codes in template or something, without breaking the original code ?
If not I guess the proper approach would be my own plugin , right ? In such case what events I should to base it on / attach to ?

Moderators: beatnantslabbikrileon
Time to create page: 0.353 seconds
Facebook Twitter Google LinkedIn