The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Adding New Buttons to the Editor Toolbar
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. |
#32
|
|||
|
|||
Any update of this for vb4?
|
#33
|
||||
|
||||
Im looking to add my bbcode button to the quick reply and quick edit but nothing found yet.
|
#34
|
|||
|
|||
Love to see this updated for VB4
|
#35
|
|||
|
|||
Update this to vbulletin 4..
|
#36
|
|||
|
|||
Create a BBCODE and name it "justify"
Templates to edit: editor_toolbar_on look for: Code:
<vb:if condition="$stylevar['textdirection'] == 'ltr'"> there you will have: Code:
<img src="{vb:stylevar imgdir_editor}/justifyleft.png" class="imagebutton" id="{vb:raw editorid}_cmd_justifyleft" width="20" height="20" alt="{vb:rawphrase align_left}" /> <img src="{vb:stylevar imgdir_editor}/justifycenter.png" class="imagebutton" id="{vb:raw editorid}_cmd_justifycenter" width="20" height="20" alt="{vb:rawphrase align_center}" /> <img src="{vb:stylevar imgdir_editor}/justifyright.png" class="imagebutton" id="{vb:raw editorid}_cmd_justifyright" width="20" height="20" alt="{vb:rawphrase align_right}" /> Code:
<img src="{vb:stylevar imgdir_editor}/justify.png" class="imagebutton" id="{vb:raw editorid}_cmd_wrap0_justify" width="20" height="20" alt="Wrap [JUSTIFY] tags around selected text" /> just note that name of BBCODE and id of an image are same id="{vb:raw editorid}_cmd_wrap0_justify |
#37
|
|||
|
|||
^That template isn't available on 4.15^
Assuming you were posting that as a solution for vB4... |
#38
|
|||
|
|||
It appears like the new editor no longer uses "editor_toolbar_on" template....
|
#39
|
|||
|
|||
Using VB3.8
Ive got 20 extra bbcode buttons and the layout just extends horizontally forever, anyone know where to put a linebreak between? Where exactly would i put it? Alternatively i could center my interface if i knew how to [/URL] Uploaded with ImageShack.us[/IMG] thanks! |
#40
|
|||
|
|||
Having error after editing the template
Code:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting ']' in /includes/adminfunctions_template.php(3941) : eval()'d code on line 154 |
#41
|
||||
|
||||
Quote:
HTML Code:
<table> <!-- TR starts a new table row --> <tr> <td>Table Cell Contents</td> <td>Table Cell Contents</td> </tr> <!-- TR starts a new table row --> <tr> <td>Table Cell Contents</td> <td>Table Cell Contents</td> </tr> </table> Also, looks to me like you or a modification have made additional edits to your editor template. So you would need to make certain the HTML is correct here before attempting to try and center anything. You're code is constructed improperly. You've left out something like a ] that PHP was expecting to be there. You need to double check your work closely, or revert the template and start over all the custom edits from scratch. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|