3 # this converts the "bulletin board code" to the easier
4 # wiki syntax internally
8 $ewiki_plugins["format_source"][] = "ewiki_format_emulate_bbcode";
12 function ewiki_format_emulate_bbcode(&$source) {
14 #-- for super-correct translation, we'll need a regex:
15 $source = preg_replace('/\[(link|url|img|email)[:=]([^\]\s]+)]/', '[$1|', $source);
17 #-- else simple string replacements will do:
33 '[list' => '<!-- [list',
38 foreach ($repl as $from => $to) {
39 $source = str_replace($from, $to, $source);