Adding New Buttons to the Editor Toolbar
by
01 Oct 2005
Start by opening the editor_toolbar_on template. That is the only template you need to edit, since in vBulletin this same template corresponds to both the standard editor and the wysiwig. Find: $vBeditTemplate[extrabuttons] Before that row is where you should add buttons. However, you can add them anywhere you want if you know what you are doing. Now about the buttons themselves: Code:
<td><img src="$stylevar[imgdir_editor]/separator.gif" width="6" height="20" alt="" /></td> Code:
<td><div class="imagebutton" id="{$editorid}_cmd_wrap0_BBCODE"><img src="$stylevar[imgdir_editor]/YOURBUTTONIMAGE" width="21" height="20" alt="$vbphrase[YOURALTPHRASE]" /></div></td> YOURBUTTONIMAGE and YOURALTPHRASE are respectively the image and the descriptive phrase for that image. You can also change the width of the image, but everything else should not be touched - esspecially the DIV ID (except the BBCODE part). So far so good. But this does not allow a user to define a parameter for the bbcode tag. To fix, open vbulletin_textedit.js located in clientscript folder, and find: Code:
case 'PHP': { this.apply_format('removeformat'); } Code:
case 'BBCODE': { useoption = true; } Done! If anyone wants to add some information on how to make the buttons perform your own functions, do it. |
Similar Mods
Thread and Post Buttons for the Editor Toolbar | vBulletin 3.5 Add-ons |