The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Adding Buttons for BBCode-Solved
So, obviously for the advanced editor, you can add a button image for a simple BBCode. But what about adding buttons for this to the quick reply editor?
And how about BBCodes that you had to manually add á la template hooks due to the necessity of a PHP function or impracticality of HTML to describe them; I have two such that are quite important to the forum and no idea how to add buttons for them to either the advanced editor or the quick reply. |
#2
|
||||
|
||||
This thread has a nice tutorial for adding bbCode buttons to your advanced editor. To add buttons to the quick reply, use the same tutorial except edit the showthread_quickreply template instead of the editor_toolbar_on template.
Read the article before viewing my alteration mentioned below. However, instead of adding (just to be clear, do NOT add this) from the tutorial Code:
[S]case 'BBCODE':[/S] { [S]useoption = true;[/S] } Code:
<td><div class="imagebutton" id="{$editorid}_cmd_wrap1_BBCODE"><img src="$stylevar[imgdir_editor]/YOURBUTTONIMAGE" width="21" height="20" alt="$vbphrase[YOURALTPHRASE]" /></div></td> This works for bbCode that depends on a hook, too. All you need to do is chage the red BBCODE to the actual value of the bbCode... Say your hook defined bbCode is "[video][/video]" - then just put the word video in place of BBCODE in the sample code above. As for more dynamic things (like a color picker drop down menu), I'm still not sure how to go about that. It would probably involve editing the /clientscript/vbulletin_textedit.js file. If you find out how to do it without altering the .js file , let me know - If I find out I'll post how. |
#3
|
|||
|
|||
That worked, thanks!
How about to the quick reply editor? |
#4
|
||||
|
||||
I already told you how to do that.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|