Ok, I put this into some other plugin I use, it was attempt to use bootstrap classes with bbcodes...
Create file label.bb
return "<div class='{$parm}'> {$code_text}</div> ";
In file e_bb.php
(it's tricky if this file already exists - if you plan to use spoiler plugin for this)
This is for display list options:
$bootstrap_classes = array('default','primary','success','info','warning','danger');
$i = 0;
$labelselect = "<select class='btn btn-default btn-secondary e-bb bbcode_buttons e-pointer' id='labelselect'
title='Format text' onchange=\"addtext(this.value);this.value=''\">
<option value=''>Labels</option>";
//{$class}
foreach ($bootstrap_classes as $class) {
++$i;
$bb[$i]['name'] = 'label-'.$class;
$bb[$i]['onclick_var'] = "[label=label label-{$class}][/label]";
$bb[$i]['menutext'] = "Label ".$class;
$bb[$i]['helptext'] = "Help: [label=class]Text to be displayed as label[/label]";
$labelselect .= "<option value='[label=label label-{$class}][/label]' style='font-size:12px;' class='label label-{$class}'>".$bb[$i]['menutext']."</option>\n";
$eplug_bb[] = $bb[$i];
}
$labelselect .= "</select>";
++$i;
To parse:
$eplug_bb[] = $bb[$i];
$BBCODE_TEMPLATE .= $labelselect;
$BBCODE_TEMPLATE_SUBMITNEWS .= $labelselect;
$BBCODE_TEMPLATE_NEWSPOST .= $labelselect;
$BBCODE_TEMPLATE_ADMIN .= $labelselect;
$BBCODE_TEMPLATE_CPAGE .= $labelselect;
But now there is new template for forum, if I am not mistaken.