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!
Post Reply
User avatar
Stoker
Site Admin
Site Admin
Posts: 3536
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Custom BBCodes in a select box

Post 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.
Board rules! No PM support
User avatar
Solidjeuh
BBCoder IV
BBCoder IV
Posts: 257
Joined: 16 Oct 2011, 02:15
BBCodes: 7
Favourite MOD: Top stats
Location: Aalst / Belgium
Contact:

Custom BBCodes in a select box

Post by Solidjeuh »

Also very nice!
Thank you!
Looks way better on the forum!
Wij promoten UW muziek in ons forum & delen alles via Sociale media!
Mail uw single + hoesje + info naar: info@muziekpromo.net of Solidjeuh@textradio.be
===============
Onze Website: https://www.muziekpromo.net
User avatar
Rhyno
BBCoder III
BBCoder III
Posts: 100
Joined: 25 Jan 2012, 06:06
BBCodes: 10
Favourite MOD: Top Stats
Location: Australia
Contact:

Custom BBCodes in a select box

Post by Rhyno »

Can this be done for smileys?
User avatar
Rhyno
BBCoder III
BBCoder III
Posts: 100
Joined: 25 Jan 2012, 06:06
BBCodes: 10
Favourite MOD: Top Stats
Location: Australia
Contact:

Custom BBCodes in a select box

Post by Rhyno »

All good found this : viewtopic.php?f=9&t=465
User avatar
Sniper_E
BBCoder II
BBCoder II
Posts: 44
Joined: 04 Dec 2011, 06:30
BBCodes: 1
Contact:

Custom BBCodes in a select box

Post 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>
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: 765
Joined: 25 Jul 2011, 13:29
BBCodes: 34
Favourite MOD: Ban button
Location: Down south!
Contact:

Custom BBCodes in a select box

Post by martin123456 »

Code: Select all

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