vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Add other buttons to Quick Edit/ Quick Reply Toolbar (https://vborg.vbsupport.ru/showthread.php?t=102282)

hoangminh 12-04-2005 10:00 PM

Add other buttons to Quick Edit/ Quick Reply Toolbar
 
The quickreply and quickedit is not enough button for formating Text. So I decide to add some other and share with you.

If you want to add to quick Reply, go to showthread_quickreply template to edit or showthread_quickedit template if you want to add more buttons to Quick Edit toolbar.

Now, let's begin:

If you want to add align button (left, center, justify or right) next to underline button,
find:
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>

add below:
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>

if you want to add Font Size Popup Menu, Add below (the above code):

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>

If you want to add Extra BBCode Button (Custom BBCode that has Button Image):

Find:
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 After:

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>

I will give some more code for other buttons in post #1.


If you like this hack, Click Install to receive updates

hoangminh 12-05-2005 05:39 PM

Some more Button


Code to add Order List and Unorder List Buttons:

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>

Code to add Decrease Indent/Increase Indent Buttons
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>


hoangminh 12-05-2005 05:48 PM

I've post in incorrect forum, please move to Template Modification forum please.

Thanks

zzzxxzzz 12-05-2005 06:09 PM

damn hoang minh, sao nhieu du dzi, cho xin nhe thanks a lot bro

murrtex 12-06-2005 12:27 AM

i did only left, center, justify or right ,but i did not work on me.
when i clik quickedit it goes advanced edit.

hoangminh 12-06-2005 12:34 AM

Quote:

Originally Posted by murrtex
i did only left, center, justify or right ,but i did not work on me.
when i clik quickedit it goes advanced edit.

Do you have another hack on showthread_quickreply template? I've test this hack in new test board without hackmod before, it runs correctly

murrtex 12-06-2005 01:16 AM

i will try tomorrow.i'll goto bed

G-Force 199 12-06-2005 03:21 AM

Can u give a ZIP or TXT file ?

hoangminh 12-06-2005 04:02 AM

Quote:

Originally Posted by G-Force 199
Can u give a ZIP or TXT file ?

Okie, I've updated the txt file.

Snake 12-06-2005 11:33 AM

Nice one man. I will install this tonight.


All times are GMT. The time now is 03:27 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.03016 seconds
  • Memory Usage 1,749KB
  • 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
  • (7)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete