![]() |
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. |
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] 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. |
That worked, thanks! :D
How about to the quick reply editor? |
I already told you how to do that. :)
Quote:
|
All times are GMT. The time now is 12:16 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|