Register Members List Search Today's Posts Mark Forums Read

Thread Tools
Old 19 Feb 2021, 18:41
Maudlin2 Maudlin2 is offline
Join Date: Oct 2020
Custom bbcode tag - handling in editor?


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.
Reply With Quote

Similar Threads
Thread Thread Starter Forum Replies Last Post
BB Code Enhancements Editor BBcode Tags to embed EditArea code editor in posts nerbert vBulletin 4.x Add-ons 15 03 Nov 2013 04:03

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

New To Site? Need Help?

All times are GMT. The time now is 12:56.

Layout Options | Width: Wide Color: