Adding custom bbcode with no-value parameter

Started by Aradmey, August 22, 2015, 08:13:56 AM

Previous topic - Next topic

Aradmey

I added a custom bbcode to subs.php lately. Now, I want to add a parameter which will have no value, something like this:
If this is the regular use:
[mem][/mem]

I want this to work too:
[mem all][/mem]

How do I do it? I don't want the parameter to have any value whatsoever.
Thank you.

I currently do it like this without parameter:

array(
    'tag' => 'members',
    'type' => 'unparsed_content',
    'content' => '$1',
    'validate' => my function,
    'disabled_content' => '$1',
);

Advertisement: