vBulletin ModsThe Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=97295 |
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. |
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 :) |
1 Attachment(s)
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. |
A big thank for this nice tutorial :) Very usefull
|
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 |
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; } |
Yet another useful tutorial, thanks PV. :)
|
All times are GMT. The time now is 02:36. |
Powered by vBulletin® Version 3.8.14
Copyright © 2021, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.