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': Code:
case 'BBCODE': Done! If anyone wants to add some information on how to make the buttons perform your own functions, do it. |
Excellent! I'll definately be using this! Will this affect the Quick Reply box or would something different need to be edited?
|
yay! I did this before and didn't know what the hell I was doing! I added a glow button.
Actually... If I remember correctly there is an area in the ADMINCP that allows you to do this automatically. Regardless, this is sick because it now shows me the code effected. Thanks! |
Quote:
Quote:
|
I thought when creating a new bbcode vbulletin let us insert a new button in the toolbar already ?
|
Yes, it does.
But: - You cannot use it for pre-existing bbcodes, such as thread and post - You cannot use it for CUSTOM hardcoded bbcodes, such as ones found in my [HIDE] hack. |
ok thats very nice
but how can I make my bbcode converted or displayed right in both standard & wysiwig editors ? & is the bbcode manager in admincp can replace the js file editing ? sory but i didn't understand the role of this file editing & i'm new to the tool box 3.5 |
The role of file editing: It tells the script that the tag has an OPTION, which makes it pop up the input box.
When you do the template edit, it works for both standard and wysiwyg editors. |
i do my best & try to make mmy own buttons & teel you the results ( am sure i'll need help :) )
|
Great!
Thanks a lot :) |
All times are GMT. The time now is 08:51 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|