function convert_quote_tag($text = "", $quote_table_class, $quote_head_class, $quote_body_class) { global $QUOTE_ERROR, $QUOTE_OPENED, $QUOTE_CLOSED; if ($text == '') { return ''; } $text = stripslashes($text); $helper = new CConvertorsPregReplaceHelper(""); $helper->setQuoteClasses($quote_table_class, $quote_head_class, $quote_body_class); $txt = $text; $txt = preg_replace_callback("#\\[quote\\]#i", array($helper, "convertOpenQuoteTag"), $txt); $txt = preg_replace_callback("#\\[/quote\\]#i", array($helper, "convertCloseQuoteTag"), $txt); if ($helper->checkQuoteError()) { return $txt; } else { return $text; } }