Page 1 of 1

Custom BBCodes in a select box

Posted: 27 Jul 2011, 08:39
by Stoker
Custom BBCodes in a select box
Written by Simon

Puts all custom bbcodes in a select box. This makes the posting page look nicer and save some space.


Open styles/{YOURTHEME}/template/posting_buttons.html
Find:

Code: Select all

<!-- BEGIN custom_tags -->
      <input type="button" class="button2" name="addbbcode{custom_tags.BBCODE_ID}" value="{custom_tags.BBCODE_TAG}" onclick="bbstyle({custom_tags.BBCODE_ID})" title="{custom_tags.BBCODE_HELPLINE}" />
   <!-- END custom_tags -->
Replace with:

Code: Select all

<select name="addbbcode_custom" onchange="bbstyle(this.form.addbbcode_custom.options[this.form.addbbcode_custom.selectedIndex].value*1);this.form.addbbcode_custom.selectedIndex = 0;">
      <option value="#" selected="selected">Custom BBCodes</option>
      <!-- BEGIN custom_tags -->
      <option value="{custom_tags.BBCODE_ID}" title="{custom_tags.BBCODE_HELPLINE}">{custom_tags.BBCODE_TAG}</option>
      <!-- END custom_tags -->   
     </select>
Save, upload and refresh template.

Custom BBCodes in a select box

Posted: 17 Oct 2011, 16:53
by Solidjeuh
Also very nice!
Thank you!
Looks way better on the forum!

Custom BBCodes in a select box

Posted: 26 Jun 2012, 02:36
by Rhyno
Can this be done for smileys?

Custom BBCodes in a select box

Posted: 26 Jun 2012, 03:06
by Rhyno
All good found this : viewtopic.php?f=9&t=465

Custom BBCodes in a select box

Posted: 04 Oct 2014, 21:34
by Sniper_E
I'd prefer not to have Custom BBCodes showing in my drop down select box, it's not a selection.

Code: Select all

      <option value="#" selected="selected" style="display: none">Custom BBCodes</option>

Custom BBCodes in a select box

Posted: 05 Oct 2014, 16:25
by martin123456

Code: Select all

<option value="#" selected="selected" style="display: none">Select BBCode</option>
Is better