Quote:
Originally Posted by dushokd
Thanks kh99, I am almost there, but there is some bug I can't figure out, I hope you can help?
|
Yeah, sorry - obviously I didn't actually try it. Anyway, more changes needed in includes/class_bbcode_alt.php. Around line 99, after the "make the "pre" tags use the correct handler" for loop (ETA ...add this under the existing foreach loop):
Code:
if (isset($this->tag_list['option']['code']))
{
$this->tag_list['option']['code']['callback'] = 'handle_preformatted_tag';
unset($this->tag_list['option']['code']['html'], $this->tag_list['option']['code']['strip_space_after']);
}
then in handle_preformatted_tag() around line 357, replace the return statement with:
Code:
return '[' . $tag_name .
($this->current_tag['option'] !== false ?
('=' . $this->current_tag['delimiter'] . $this->current_tag['option'] . $this->current_tag['delimiter']) :
''
) . ']' . $this->emulate_pre_tag($code) . "[/$tag_name]";
(which I stole from another function).
There's also another class in that file, vB_BbCodeParser_PlainText, which probably needs to be changed for when the post is represented as plain text.
Quote:
Originally Posted by DivisionByZero
why can't the dev team just put all the built-in code in the BB Code Manager in the first place? I've been meaning to ask this question for years!
|
I don't know, but the handling of some of those codes is a lot more complicated than just a replacement, so it would be difficult.