Custom BBCodes in a select box

Mixed forum with code snippets, guides and styles
Forum rules
Everything in this forum is for everybody
But support only for Donators!
User avatar
Stoker
Site Admin
Site Admin
Posts: 3502
Joined: 12 May 2008, 21:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark

Custom BBCodes in a select box

Post by Stoker » 27 Jul 2011, 06:39

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.
Board rules! No PM support
Sure, I can install the Mod for you ;)
Like the site? Then buy me a bear


User avatar
Solidjeuh
BBCoder IV
BBCoder IV
Posts: 257
Joined: 16 Oct 2011, 00:15
BBCodes: 7
Favourite MOD: Top stats
Location: Aalst / Belgium

Custom BBCodes in a select box

Post by Solidjeuh » 17 Oct 2011, 14:53

Also very nice!
Thank you!
Looks way better on the forum!
Yeah I'm crazy.. So What!?! Live Your Life The Way You Want It To be!
Download +30.000 arcade extension games @ ~ http://www.froddelpower.be ~

User avatar
Rhyno
BBCoder III
BBCoder III
Posts: 100
Joined: 25 Jan 2012, 04:06
BBCodes: 10
Favourite MOD: Top Stats
Location: Australia

Custom BBCodes in a select box

Post by Rhyno » 26 Jun 2012, 00:36

Can this be done for smileys?

User avatar
Rhyno
BBCoder III
BBCoder III
Posts: 100
Joined: 25 Jan 2012, 04:06
BBCodes: 10
Favourite MOD: Top Stats
Location: Australia

Custom BBCodes in a select box

Post by Rhyno » 26 Jun 2012, 01:06

All good found this : viewtopic.php?f=9&t=465

User avatar
Sniper_E
BBCoder II
BBCoder II
Posts: 43
Joined: 04 Dec 2011, 04:30
BBCodes: 1

Custom BBCodes in a select box

Post by Sniper_E » 04 Oct 2014, 19:34

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>
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!


User avatar
martin123456
BBCoder VI
BBCoder VI
Posts: 763
Joined: 25 Jul 2011, 11:29
BBCodes: 34
Favourite MOD: Ban button
Location: Down south!

Custom BBCodes in a select box

Post by martin123456 » 05 Oct 2014, 14:25

Code: Select all

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