Add other buttons to Quick Edit/ Quick Reply Toolbar

Daz

New Member
In vB 3.6, the showthread_quickedit has been changed to the postbit_quickedit.

To add the extra button to Quick Reply toolbar, add below code as instruction to the template showthread_quickreply.

To add the extra button to Quick Edit toolbar, add below code as instruction to the template postbit_quickedit.

In the appropriate template, find:

PHP:
<td><div class="imagebutton" id="{$editorid}_cmd_underline"><img src="$stylevar[imgdir_editor]/underline.gif" width="21" height="20" alt="$vbphrase[underline]" /></div></td>
<td><img src="$stylevar[imgdir_editor]/separator.gif" width="6" height="20" alt="" /></td>
</if>

Add the desired button as below. We will add these button next to the Underline button (
underline.gif
):

- Button Align Left, Center, Right:

PHP:
<if condition="$show['align_bbcode']">
    <if condition="$stylevar['textdirection'] == 'ltr'">
    <td><div class="imagebutton" id="{$editorid}_cmd_justifyleft"><img src="$stylevar[imgdir_editor]/justifyleft.gif" width="21" height="20" alt="$vbphrase[align_left]" /></div></td>
    <td><div class="imagebutton" id="{$editorid}_cmd_justifycenter"><img src="$stylevar[imgdir_editor]/justifycenter.gif" width="21" height="20" alt="$vbphrase[align_center]" /></div></td>
    <td><div class="imagebutton" id="{$editorid}_cmd_justifyright"><img src="$stylevar[imgdir_editor]/justifyright.gif" width="21" height="20" alt="$vbphrase[align_right]" /></div></td>
    <else />
    <td><div class="imagebutton" id="{$editorid}_cmd_justifyright"><img src="$stylevar[imgdir_editor]/justifyright.gif" width="21" height="20" alt="$vbphrase[align_right]" /></div></td>
    <td><div class="imagebutton" id="{$editorid}_cmd_justifycenter"><img src="$stylevar[imgdir_editor]/justifycenter.gif" width="21" height="20" alt="$vbphrase[align_center]" /></div></td>
    <td><div class="imagebutton" id="{$editorid}_cmd_justifyleft"><img src="$stylevar[imgdir_editor]/justifyleft.gif" width="21" height="20" alt="$vbphrase[align_left]" /></div></td>
    </if>
    <td><img src="$stylevar[imgdir_editor]/separator.gif" width="6" height="20" alt="" /></td>
</if>

- Add the Font Size Dropdown list:

PHP:
<if condition="$show['size_bbcode']">
    <td><div class="imagebutton" id="{$editorid}_popup_fontsize" title="$vbphrase[sizes]">
     <table cellpadding="0" cellspacing="0" border="0">
     <tr>
     <td class="popup_feedback"><div id="{$editorid}_size_out" style="width:25px">&nbsp;</div></td>
     <td class="popup_pickbutton"><img src="$stylevar[imgdir_editor]/menupop.gif" width="11" height="16" alt="" /></td>
     </tr>
     </table>
    </div></td>
</if>

- Add the Font Face drop down list

PHP:
<if condition="$show['font_bbcode']"> 
                <td><div class="imagebutton" id="{$editorid}_popup_fontname" title="$vbphrase[fonts]">
                    <table cellpadding="0" cellspacing="0" border="0">
                    <tr>
                        <td class="popup_feedback"><div id="{$editorid}_font_out" style="width:91px">&nbsp;</div></td>
                        <td class="popup_pickbutton"><img src="$stylevar[imgdir_editor]/menupop.gif" width="11" height="16" alt="" /></td>
                    </tr>
                    </table>                
                </div></td>
            </if>

- Add Copy, Cut, Paste button:

PHP:
<td><img src="$stylevar[imgdir_editor]/separator.gif" width="6" height="20" alt="" /></td>
                <td><div class="imagebutton" id="{$editorid}_cmd_cut"><img src="$stylevar[imgdir_editor]/cut.gif" width="21" height="20" alt="$vbphrase[cut]" /></div></td>
                <td><div class="imagebutton" id="{$editorid}_cmd_copy"><img src="$stylevar[imgdir_editor]/copy.gif" width="21" height="20" alt="$vbphrase[copy]" /></div></td>
                <td><div class="imagebutton" id="{$editorid}_cmd_paste"><img src="$stylevar[imgdir_editor]/paste.gif" width="21" height="20" alt="$vbphrase[paste]" /></div></td>

- Add the Code button:

PHP:
<if condition="$show['code_bbcode']">
            <td><div class="imagebutton"><a href="#" onclick="return vbcode('CODE', '')"><img src="$stylevar[imgdir_editor]/code.gif" alt="$vbphrase[wrap_code_tags]" width="21" height="20" border="0" /></a></div></td>
            </if>

- Add the HTML/PHP Code button:

PHP:
<if condition="$show['html_bbcode']">
            <td><div class="imagebutton"><a href="#" onclick="return vbcode('HTML', '')"><img src="$stylevar[imgdir_editor]/html.gif" alt="$vbphrase[wrap_html_tags]" width="21" height="20" border="0" /></a></div></td>
            </if>
            <if condition="$show['php_bbcode']">
            <td><div class="imagebutton"><a href="#" onclick="return vbcode('PHP', '')"><img src="$stylevar[imgdir_editor]/php.gif" alt="$vbphrase[wrap_php_tags]" width="21" height="20" border="0" /></a></div></td>
            </if>

- Add the Decrease/Increase the indent button

PHP:
<if condition="$show['align_bbcode'] OR $show['list_bbcode']">
    <if condition="$stylevar['textdirection'] == 'ltr'">
    <td><div class="imagebutton" id="{$editorid}_cmd_outdent"><img src="$stylevar[imgdir_editor]/outdent.gif" width="21" height="20" alt="$vbphrase[decrease_indent]" /></div></td>
    <td><div class="imagebutton" id="{$editorid}_cmd_indent"><img src="$stylevar[imgdir_editor]/indent.gif" width="21" height="20" alt="$vbphrase[increase_indent]" /></div></td>
    <else />
    <td><div class="imagebutton" id="{$editorid}_cmd_outdent"><img src="$stylevar[imgdir_editor]/indent.gif" width="21" height="20" alt="$vbphrase[decrease_indent]" /></div></td>
    <td><div class="imagebutton" id="{$editorid}_cmd_indent"><img src="$stylevar[imgdir_editor]/outdent.gif" width="21" height="20" alt="$vbphrase[increase_indent]" /></div></td>
    </if>
  <td><img src="$stylevar[imgdir_editor]/separator.gif" width="6" height="20" alt="" /></td>
   </if>

- Add the Order/Unorder List button:

PHP:
<if condition="$show['list_bbcode']">
    <td><div class="imagebutton" id="{$editorid}_cmd_insertorderedlist"><img src="$stylevar[imgdir_editor]/insertorderedlist.gif" width="21" height="20" alt="$vbphrase[ordered_list]" /></div></td>
    <td><div class="imagebutton" id="{$editorid}_cmd_insertunorderedlist"><img src="$stylevar[imgdir_editor]/insertunorderedlist.gif" width="21" height="20" alt="$vbphrase[unordered_list]" /></div></td>
   </if>



* Want to add the custom bbcode to the end of the toolbar ?
- Find:

PHP:
<td><div class="imagebutton" id="{$editorid}_cmd_wrap0_quote"><img src="$stylevar[imgdir_editor]/quote.gif" width="21" height="20" alt="$vbphrase[wrap_quote_tags]" /></div></td>
- Add below:

PHP:
<td><img src="$stylevar[imgdir_editor]/separator.gif" width="6" height="20" alt="" /></td>
        <if condition="$show['editor_toolbar']">
                <div>$vBeditTemplate[extrabuttons]</div>
        </if>

Quick_edit.jpg
 
Back
Top