Page 1 of 1

Custom BBCodes in a spoiler

Posted: 26 Jul 2011, 20:12
by Stoker
Custom BBCodes in a spoiler
Written by Stoker

Puts all custom bbcodes in a spoiler. 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

<span><input type="button" class="button2" value="Show Custom BBCodes" onclick="if (this.parentNode.parentNode.getElementsByTagName('span')[1].getElementsByTagName('span')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('span')[1].getElementsByTagName('span')[0].style.display = '';      this.innerText = ''; this.value = 'Hide Custom BBCodes'; } else { this.parentNode.parentNode.getElementsByTagName('span')[1].getElementsByTagName('span')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show Custom BBCodes'; }" /></span><span style="margin:5px;"><span style="display: none;"><br /><!-- BEGIN custom_tags -->
      <input type="button" class="button2" style="margin-top:2px;" 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 -->
   </span></span>
Save, upload and refresh templates.