hoangminh
08-12-2007, 10:00 PM
This is the vB 3.6 port of the Add other buttons to Quick Edit/ Quick Reply Toolbar (https://vborg.vbsupport.ru/showthread.php?t=102282)
Similar 3.5, this hack mod will add the extra button to the Quick Edit or Quick Reply toolbar.
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:
<td><div class="imagebutton" id="{$editorid}_cmd_underline"><img src="$stylevar/underline.gif" width="21" height="20" alt="$vbphrase" /></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 (https://vborg.vbsupport.ru/images/editor/underline.gif):
- Button Align Left, Center, Right:
<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 [I]Font Size Dropdown list:
<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"> </div></td>
<td class="popup_pickbutton"><img src="$stylevar/menupop.gif" width="11" height="16" alt="" /></td>
</tr>
</table>
</div></td>
</if>- Add the [I]Font Face drop down list
<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"> </div></td>
<td class="popup_pickbutton"><img src="$stylevar/menupop.gif" width="11" height="16" alt="" /></td>
</tr>
</table>
</div></td>
</if>
- Add [I]Copy, Cut, Paste button:
<td><img src="$stylevar/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 [I]Code button:
<if condition="$show['code_bbcode']">
<td><div class="imagebutton"><a href="#" onclick="return vbcode('CODE', '')"><img src="$stylevar/code.gif" alt="$vbphrase[wrap_code_tags]" width="21" height="20" border="0" /></a></div></td>
</if>
- Add the HTML/PHP Code button:
<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 [I]Decrease/Increase the indent button
<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/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:
<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>[I]
* Want to add the custom bbcode to the end of the toolbar ?
- Find:
<td><div class="imagebutton" id="{$editorid}_cmd_wrap0_quote"><img src="$stylevar/quote.gif" width="21" height="20" alt="$vbphrase[wrap_quote_tags]" /></div></td>[I]- Add [U]below:
<td><img src="$stylevar[imgdir_editor]/separator.gif" width="6" height="20" alt="" /></td>
<if condition="$show['editor_toolbar']">
<div>$vBeditTemplate[extrabuttons]</div>
</if>Hope that the way I written is easily to understand.
Any question, please post reply, I'm not sure to reply immediately but will reply as soon as possible
Similar 3.5, this hack mod will add the extra button to the Quick Edit or Quick Reply toolbar.
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:
<td><div class="imagebutton" id="{$editorid}_cmd_underline"><img src="$stylevar/underline.gif" width="21" height="20" alt="$vbphrase" /></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 (https://vborg.vbsupport.ru/images/editor/underline.gif):
- Button Align Left, Center, Right:
<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 [I]Font Size Dropdown list:
<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"> </div></td>
<td class="popup_pickbutton"><img src="$stylevar/menupop.gif" width="11" height="16" alt="" /></td>
</tr>
</table>
</div></td>
</if>- Add the [I]Font Face drop down list
<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"> </div></td>
<td class="popup_pickbutton"><img src="$stylevar/menupop.gif" width="11" height="16" alt="" /></td>
</tr>
</table>
</div></td>
</if>
- Add [I]Copy, Cut, Paste button:
<td><img src="$stylevar/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 [I]Code button:
<if condition="$show['code_bbcode']">
<td><div class="imagebutton"><a href="#" onclick="return vbcode('CODE', '')"><img src="$stylevar/code.gif" alt="$vbphrase[wrap_code_tags]" width="21" height="20" border="0" /></a></div></td>
</if>
- Add the HTML/PHP Code button:
<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 [I]Decrease/Increase the indent button
<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/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:
<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>[I]
* Want to add the custom bbcode to the end of the toolbar ?
- Find:
<td><div class="imagebutton" id="{$editorid}_cmd_wrap0_quote"><img src="$stylevar/quote.gif" width="21" height="20" alt="$vbphrase[wrap_quote_tags]" /></div></td>[I]- Add [U]below:
<td><img src="$stylevar[imgdir_editor]/separator.gif" width="6" height="20" alt="" /></td>
<if condition="$show['editor_toolbar']">
<div>$vBeditTemplate[extrabuttons]</div>
</if>Hope that the way I written is easily to understand.
Any question, please post reply, I'm not sure to reply immediately but will reply as soon as possible