Quote:
Originally Posted by msmayz
It was automatically added to the Go Advanced editor, but to the very end of the last row, along with the other buttons I've added (strikethrough and spoiler).
I don't need the "no parse" button to show up in the Quick Reply editor, but I do want to change its location in the Go Advanced editor (or at least duplicate the button so that I can place it where I want, since there seems to be no way to remove the added buttons from the end of the last row).
Was the code I posted incorrect? How do I add (duplicate) the button so that it shows up to the left of the Code button in the Go Advanced editor?
|
Here are some button plugins for one of my projects. The title is "Editor" and the tagname is "editor". It puts a code editor in posts. I wrote these plugins a long time ago so I'm not sure why and how they work. Try altering them for your project.
In editor_toolbar_start
Code:
$do_cache_editor = true;
foreach($vbulletin->bbcodecache AS $cache)
{
if($cache['title'] == 'Editor')
{
$do_cache_editor = false;
}
}
if($do_cache_editor)
{
$vbulletin->bbcodecache[] = array(
bbcodeid => 200,
bbcodetag => 'editor',
title => 'Editor',
buttonimage => 'clientscript/codemirror-3.0/images/editor.png'
);
}
in editor_custom_toolbar_loop
Code:
if($title == 'Editor')
{
$handled = true;
}
in editor_toolbar_set
Code:
if($this->editor_type == 'fe')
{
if($iespell)
{
$this->config['toolbar'][12][] = 'Editor';
}
else
{
$this->config['toolbar'][11][] = 'Editor';
}
}