help adding more bbcode (General)

by mazdarx7, Thursday, March 31, 2016, 22:06 (2945 days ago)

Been trying to find how to add more bbcode options into the functions.inc.php file but without success and since it works a bit different than other boards, it is even harder.

Anyone was able to add extra codes like to create tables or add youtube videos?


$bbcode->addCode ('u', 'simple_replace', null, array ('start_tag' => '<span class="underline">', 'end_tag' => '</span>'), 'inline', array ('listitem', 'block', 'inline', 'link', 'quote', 'pre', 'monospace'), array ());
Avatar

help adding more bbcode

by Auge ⌂, Friday, April 01, 2016, 11:46 (2944 days ago) @ mazdarx7

Been trying to find how to add more bbcode options into the functions.inc.php file but without success and since it works a bit different than other boards, it is even harder.

$bbcode->addCode ('u', 'simple_replace', null, array ('start_tag' => '<span class="underline">', 'end_tag' => '</span>'), 'inline', array ('listitem', 'block', 'inline', 'link', 'quote', 'pre', 'monospace'), array ());

I used a very similar code (see below). The only difference is the listing of element types, where the "u" is allowed. (my 'listitem', 'block', 'inline' versus your 'listitem', 'block', 'inline', 'link', 'quote', 'pre', 'monospace')

$bbcode->addCode('u', 'simple_replace', null, array ('start_tag' => '<span class="underline">', 'end_tag' => '</span>'), 'inline', array ('listitem', 'block', 'inline'), array ());

Anyone was able to add extra codes like to create tables or add youtube videos?

You can find some threads about embedding video-codes in this forum. Because of the over the time differing Youtube-embedding-code implementations, I don't know, if one of the solutions is actual working.

I further suggest to forget tables. It's complicated and error-prone to build the structure and I don't know a single working implementation for Christian Seiler's BB-Code-Class that is used in mlf2.

Tschö, Auge

--
Trenne niemals Müll, denn er hat nur eine Silbe!

RSS Feed of thread