/**
* Sets the toolbar options in the editor based on the editor type requested
*
* @var int Toolbar type 0 - Simple / 1 - Standard / 2 - WYSIWYG
*/
protected function setToolbar($toolbartype)
{
$toolbar = array();
$iespell = (is_browser('ie') AND !is_browser('ie64bit') AND !is_browser('mac'));
$justify = (vB::$vbulletin->stylevars['textdirection']['string'] == 'ltr' ? array('JustifyLeft', 'JustifyCenter', 'JustifyRight') : array('JustifyRight', 'JustifyCenter', 'JustifyLeft'));
if ($this->editor_type == 'qr')
{
$toolbar[] = array('RemoveFormat');
$toolbar[] = array('PasteText', '-', 'Bold', 'Italic', 'Underline');
$toolbar[] = array('Font', 'FontSize', 'TextColor');
$toolbar[] = array('Smiley');
$toolbar[] = array('Link', 'Email', 'Unlink', 'Image', 'Video', '-', 'Quote', 'Code');
if ($iespell)
{
$toolbar[] = array('iespell');
}
$this->config['toolbar'] = $toolbar;
}
else if ($this->editor_type == 'qr_small')
{
$toolbar[] = array('RemoveFormat');
$toolbar[] = array('PasteText', '-', 'Bold', 'Italic', 'Underline');
$toolbar[] = array('Font', 'FontSize', 'TextColor');
$toolbar[] = array('Smiley');
$toolbar[] = array('Link', 'Email', 'Unlink', 'Image', 'Video');
if ($iespell)
{
$toolbar[] = array('iespell');
}
$this->config['toolbar'] = $toolbar;
}
else if ($this->editor_type == 'qe')
{
$toolbar[] = array('RemoveFormat');
$toolbar[] = array('PasteText', '-', 'Bold', 'Italic', 'Underline');
$toolbar[] = array('Font', 'FontSize', 'TextColor');
$toolbar[] = array('Smiley');
$toolbar[] = array('Link', 'Email', 'Unlink', 'Image', 'Video', '-', 'Quote', 'Code');
if ($iespell)
{
$toolbar[] = array('iespell');
}
$this->config['toolbar'] = $toolbar;