PDA

View Full Version : bbcode in [code]


januszmk6
12-09-2011, 08:17 PM
Hello.
I would be greatfull if you could tell me, how can I turn off parse any bbcode in [ CODE ] tag? Is this possible without adding tag [ noparse ] in [ CODE ] ?
Thanks in advance

kh99
12-09-2011, 09:00 PM
You can create a plugin using hook location bbcode_fetch_tags and this code:

$tag_list['no_option']['code']['stop_parse'] = true;


Then if you want it to work for existing posts you can rebuild the post cache (Maintenance -> Update Counters).

januszmk6
12-09-2011, 10:09 PM
Thanks, I already tried with stop_parse, but then I didn't rebuild the post cache.
But I have one more question. If I copy into editor link as link, not text, then I get tags [ url ] in code. Is possible to turn this off? I am using standard editor, not wysiwyg.

Edit:
I added $tag_list['no_option']['code']['url'] = false; and now it's working ok :)