The Arcive of vBulletin Modifications Site. |
|
|
[vB 4.1.4] Easily add PHP/HTML/CODE buttons to showthread Quick Reply
By default, the showthread Quick Reply editor does not show the PHP/HTML/CODE buttons. If you want those to show up in Quick Reply, then just create a plugin to do so. Hook Location - editor_toolbar_filter PHP Code:
|
|
#2
|
|||
|
|||
|
Thank you Lynne,
how can I add BBCode button? How can i set the new button a line below the first row? |
|
#3
|
||||
|
||||
|
I don't know as I have not looked into that. This is a Quick Tips forum and I had seen users want to know how to do this and it's very easy. I think for adding other bbcode to the Quick Reply, it may require a bit more than a two line plugin.
|
|
#4
|
|||
|
|||
|
Quote:
Code:
if ($this->editor_type == 'qr')
{
$this->config['toolbar'][] = '/';
$this->config['toolbar'][] = array();
$this->addCustomToolbarButtons();
}
Sorry if this is OT. |
|
#5
|
|||
|
|||
|
Many thanks kh99,
it's done |
|
#6
|
|||
|
|||
|
I'm confused on editor_toolbar_filter :P
All I have is: editor_toolbar_colors, fontname, fontsize, off, on Any help? Sorry if I'm like completely off. |
|
#7
|
|||
|
|||
|
editor_toolbar_filter is a hook location. You would need to create a new plugin (Plugins and Products > Add New Plugin) and select that as the Hook Location.
|
|
#8
|
|||
|
|||
|
Quote:
--------------- Added 11 Apr 2012 at 15:41 --------------- I'm not a coder, i 'm worken on the Lynne and KH99 posts xD , and i have done... i hope. I have created a new plugin that i called ADV QR Button on the hook "editor toolbar filter" the code is: Code:
if ($this->editor_type == 'qr' || $this->editor_type == 'qe')
{
$toolbar[] = array('Code', 'Html', 'Php');
}
Is it a good solution? Or there's something wrong? Actually this solution are working fine in my board.... hoping that it is a correct work.... Thanks |
| Благодарность от: | ||
| Conehead555 | ||
|
#9
|
|||
|
|||
|
if (THIS_SCRIPT == 'showthread')
$toolbar[] = array('Code', 'Html', 'Php'); This adds the icons to advanced editor, but how can i add them to quick reply editor? The suggestion of Sworm did not work either. I use vBulletin 4.2.2 |
|
#10
|
||||
|
||||
|
Quote:
|
![]() |
|
|