Dev: Adding my own BB codes to UDDEIM messages

5 years 8 months ago #306852 by Quark Zimmerman
Dev: Adding my own BB codes to UDDEIM messages was created by Quark Zimmerman
Hi,
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 ?

Thanks.

Please Log in to join the conversation.

Moderators: beatnantslabbikrileon
Time to create page: 0.151 seconds

Facebook Twitter LinkedIn