0) { foreach ($groups[$i+1] as $code) { if ($tpl_codes[$code]) $separator = true; } } if ($separator) { $tpl_groups[$i] = true; $count = 0; } } $template->assign(array( 'BBC' => $tpl_codes, 'SEP' => $tpl_groups, 'BBCODE_PATH' => BBcode_PATH, 'BBCODE_ID' => $textarea_id, )); $template->set_prefilter($prefilter, 'set_bbcode_bar_prefilter'); // smilies support > 2.3 ## must be parsed after bbcode_bar, because the javascript must be after bbc's one if (isset($pwg_loaded_plugins['SmiliesSupport'])) { set_smiliessupport($prefilter, $textarea_id); } } function set_bbcode_bar_prefilter($content, &$smarty) { $search = '#(
|
|
)#'; $replace = file_get_contents(BBcode_PATH.'/template/bbcode_bar.tpl').'$1'; return preg_replace($search, $replace, $content); } // check tags and eventually close malformed tags, return BBCoded String function CheckTags($str) { //storage stack $tags = array(); for ($pos = 0; $pos