1

Topic: Single Tag BBCode

How can I use self closing bbcode tags but without the closing slash?

I want a line tag using [line], if I set it up it works but if you have [line] then any nested tag like list it moans that list has been started inside line.

I believe (from looking on the forums) it can be done if you close line [line /] but I haven't tested this and ideally I don't want this as I have upgraded an old forum to pun and that used [line].

// Line Tag
$tags[] = 'line';

// Then later on:

// Line Tag
$pattern[] = '#\[line]#i';
$replace[] = handle_line_tag();

Do I need to specify the tag in any of the other arrays?

Thanks for your help.
Simon

Re: Single Tag BBCode

This code should be work:

$pattern[] = '#\[line\/\]#i';
$replace[] = '<br/>';

Add it to "do_bbcode" function in "<FORUM_ROOT>/include/parser.php".