vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=192)
-   -   Show Thread Enhancements - Add other buttons to Quick Edit/ Quick Reply Toolbar (https://vborg.vbsupport.ru/showthread.php?t=155068)

hoangminh 08-12-2007 10:00 PM

Add other buttons to Quick Edit/ Quick Reply Toolbar
 
This is the vB 3.6 port of the Add other buttons to Quick Edit/ Quick Reply Toolbar
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:
PHP Code:

<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 (https://vborg.vbsupport.ru/images/editor/underline.gif):

- Button Align Left, Center, Right:

PHP Code:

<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 Code:

<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 Code:

<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 Code:

<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 Code:

<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 Code:

<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 Code:

<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 Code:

<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 Code:

<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 Code:

<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

hoangminh 08-13-2007 02:28 AM

May be some one will ask about the smilies drop down list to the toolbar, please have a look at: https://vborg.vbsupport.ru/showthrea...threadid=99532 :)

David Copeland 12-06-2007 04:20 PM

Can someone help me with this?

I have the strike-thru button working in the Advanced Edit, but I need it on the Quick Reply Nav Bar.

I can't seem to get the code correct in getting my strike-through button to load on the nav bar of the Quick Reply.

Here is the code that I have that is not working:

PHP Code:

<td><img src="$stylevar[imgdir_editor]/separator.gif" width="6" height="20" alt="" /></td>
<
td><a href="#" onclick="vB_Editor['$editorid'].open_smilie_window(smiliewindow_x, smiliewindow_y); return false">
<
img src="$stylevar[imgdir_editor]/strikethrough.gif" alt="Smilies" border="0" /></a></td

Here is a sample of the Quick Reply that is showing the Smilier Menu icon instead of the Strike-Through icon that I already have installed:

Tinh.Nhi 12-08-2007 10:58 AM

thank you

bartek24m 02-09-2010 12:07 PM

great mod ! thank you so much !


All times are GMT. The time now is 11:40 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01273 seconds
  • Memory Usage 1,847KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (12)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete