Put all custom bbcodes in a dropdown box

Articles and Information - phpBB 3.0 modifications and tweaks

Put all custom bbcodes in a dropdown box

Postby Mick » Sun Mar 19, 2017 12:47 pm

Puts all custom bbcodes in a select box, this makes the posting page look nicer and saves 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>


Refresh the template
"The more connected we get the more alone we become" - Kyle Broflovski
User avatar
Mick
 
Posts: 24
Joined: Wed Mar 15, 2017 9:14 am

Return to Articles and information

Who is online

Users browsing this forum: No registered users and 1 guest

cron