News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Making it so my custom bbc tag cannot be a child of certain other bbc tags?

Started by JoshuaD, January 13, 2020, 08:56:44 PM

Previous topic - Next topic

JoshuaD

I have a custom tag for my RPG gaming forum: [ooc].  I have it working.

However, the user can apply additional tags around the OOC tag, which I don't like. Here is a screenshot illustrating:



I went into Subs.php and looked around, and saw the flag `disallowed_children` being used on the FTP tag. I thought maybe that would be what I wanted, so I added it to the glow tag, but it didn't disallow my custom tag from being a child of the ooc tag:

          array(
             'tag' => 'glow',
             'type' => 'unparsed_commas',
             'test' => '[#0-9a-zA-Z\-]{3,12},([012]\d{1,2}|\d{1,2})(,[^]]+)?\]',
             'before' => $context['browser']['is_ie'] ? '<table border="0" cellpadding="0" cellspacing="0" style="display: inline; vertical-align: middle; font: inherit;">
             <tr><td style="filter: Glow(color=$1, strength=$2); font: inherit;">' : '<span style="text-shadow: $1 1px 1px 1px">',
             'after' => $context['browser']['is_ie'] ? '</td></tr></table> ' : '</span>',
             'disallowed_children' => array('ooc'),
          ),


How do I make it so the user cannot make my custom tag the child of certain other tags?

Advertisement: