vBulletin Mods

The Official vBulletin Modifications Site

Custom bbcode tag - handling in editor?
by Maudlin2
19 Feb 2021 18:41


I'm trying to add a tag that needs to do more than html or js (so I can't use the manager), but I bumped into a puzzler right away.

I did the following:

- in core/vb/api/bbcode.php, fetchTagList(), added:

$tag_list['no_option']['test'] = array('callback'=> 'handle_bbcode_code', etc

Basically, the same assignment as for the code tag, using the same handler function, just changing the tag name.

- in core/includes/class_bbcode.php, fetch_tag_list(), the same thing.

Now when I make a post that has (without the space):

[c ode]Foo[/code]


Both are properly and identically formatted. Great. However, when I then edit that post, it looks like this in the editor:

[c ode]Foo[/code]


When I save that post, the test tags are lost. Is there another hook for handling the tags inside the editor that I'm missing somewhere?

Thanks in advance.

All times are GMT. The time now is 15:51.

Powered by vBulletin® Version 3.8.14
Copyright © 2022, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.