![]() |
|
Article Options |
Adding New Buttons to the Editor Toolbar
by
![]() 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:
Standard vBulletin Button Separator, does not do anything except separating buttons.
BBCODE - this part is what defines the bbcode to be insterted. Whatever you put instead of "BBCODE" goes into the square tag brackets. 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:
And below add:
Where BBCODE, of course, is the same bbcode you added earlier. Must be capitalized. Done! If anyone wants to add some information on how to make the buttons perform your own functions, do it. |
||||||||||||||||
Views: 28844
|
Comments |
#2
|
||||
|
||||
Excellent! I'll definately be using this! Will this affect the Quick Reply box or would something different need to be edited?
__________________
Former vBulletin.org Staff Member Please feel free to re-use any of the code in any of my projects submitted to vB.org, so long as original attribution is retained. ![]() No members have liked this post.
|
#3
|
||||
|
||||
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! No members have liked this post.
|
#4
|
||||
|
||||
Originally Posted by ProperMethodz
When you add bbcode through the bbcode manager the last option is:
No members have liked this post.
|
#5
|
||||
|
||||
I thought when creating a new bbcode vbulletin let us insert a new button in the toolbar already ?
No members have liked this post.
|
#6
|
|||
|
|||
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.
__________________
I can no longer support any of my hacks. Please do not contact me for that. Feel free to create and post new versions of my hacks, as long as you give me credit for the original work. No members have liked this post.
|
#7
|
||||
|
||||
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
__________________
Me & My Productions: Omranic | vBulletin.org | Github | Premium PHP & vBulletin Solutions! » ---------------------------------------------------------------------------- « Keep Moving Forward! No members have liked this post.
Last edited by Omranic; 11 Nov 2005 at 13:18. |
#8
|
|||
|
|||
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 can no longer support any of my hacks. Please do not contact me for that. Feel free to create and post new versions of my hacks, as long as you give me credit for the original work. No members have liked this post.
|
#9
|
||||
|
||||
i do my best & try to make mmy own buttons & teel you the results ( am sure i'll need help
![]()
__________________
Me & My Productions: Omranic | vBulletin.org | Github | Premium PHP & vBulletin Solutions! » ---------------------------------------------------------------------------- « Keep Moving Forward! No members have liked this post.
|
#10
|
|||
|
|||
Great!
Thanks a lot ![]() No members have liked this post.
|
#11
|
||||
|
||||
I've added a custom BB code at my board which justifies text equally to margin. I did that through the Admin CP's BB Code Manager. I put a one line code:
then designed a 21 x 20 button image for it. Everything goes alright & the text was showing justified correctly without any problems. But, when I switch to the advanced mode (WYSIWYG) & selecting some text to justify it, it only show between the [justify][justify/] tags! (though they then justified correctly in the post). My question is: how can I make that BB code takes effect "visually" as a "WYSIWYG"? Also, how can I place the button image in other place in the editor interface? By default, it's added to the right (See the attached image). I have to say that I asked these questions at vBulletin.com & I were told they simply can't be done! I got a little disappointed for I thought these were simple things to customize in vBulletin.
__________________
Freedom or the Deluge. No members have liked this post.
Last edited by simsimt; 21 Dec 2005 at 10:31. |
#12
|
||||
|
||||
A big thank for this nice tutorial
![]() No members have liked this post.
|
#13
|
||||||||
|
||||||||
I cannot seem to get this right. Maybe someone can see what I am doing wrong.
editor_toolbar_on
vbulletin_textedit.js
It is a code for VBA formatting, and I just need the button to wrap the text in [VBA][/VBA]. But with these changes there is nothing on the toolbar. Any ideas? Thanks for you assistance. Jake No members have liked this post.
|
#14
|
|||
|
|||
Nice tut, got me on the right track. Im making a custom function for a button. So just a side not if you want to make a function do a return false; at the end, this way it wont add the bbcode.
case 'Function': { put your code here and what not then like you want to create a popup window or whatever you want to do here. return false; } No members have liked this post.
|
#15
|
||||
|
||||
Yet another useful tutorial, thanks PV.
![]() No members have liked this post.
|
![]() |
![]() |
||||
Article | Author | Type | Replies | Last Post |
Thread and Post Buttons for the Editor Toolbar | akanevsky | vBulletin 3.5 Add-ons | 20 | 15 Oct 2007 13:41 |
«
Previous Article
|
Next Article
»
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Article Options | |
|
|
New To Site? | Need Help? |
All times are GMT. The time now is 16:49.