2013-07-22, 06:32 PM
2013-07-22, 06:38 PM
Something like that would require a core edit to the parser class (or you could use the Patches plugin).
There is no other way that I know of to disable [code] tags.
There is no other way that I know of to disable [code] tags.
2013-07-22, 06:53 PM
hi,
thank you for reply.
changes to core file including only this inc/class_parser.php ??
thank you for reply.
changes to core file including only this inc/class_parser.php ??
2013-07-22, 07:00 PM
In inc/class_parser.php change this:
To this:
// If MyCode needs to be replaced, first filter out [code] and [php] tags.
if($this->options['allow_mycode'])
{
preg_match_all("#\[(code|php)\](.*?)\[/\\1\](\r\n?|\n?)#si", $message, $code_matches, PREG_SET_ORDER);
$message = preg_replace("#\[(code|php)\](.*?)\[/\\1\](\r\n?|\n?)#si", "<mybb-code>\n", $message);
}
To this:
// If MyCode needs to be replaced, first filter out [code] and [php] tags.
if($this->options['allow_mycode'])
{
preg_match_all("#\[(php)\](.*?)\[/\\1\](\r\n?|\n?)#si", $message, $code_matches, PREG_SET_ORDER);
$message = preg_replace("#\[(php)\](.*?)\[/\\1\](\r\n?|\n?)#si", "<mybb-code>\n", $message);
}
2013-07-22, 07:27 PM
thank you very much Wildcard
it works
it works
2013-07-22, 07:33 PM
You're welcome. Glad to help.