Hi Michal,
This seemed very strange, so I ruled out plugin conflicts and went straight to the PHP file.
I worked the code a little bit and found the following solution. Perhaps this is something only affecting my site, but it seems that as soon as single quotes were introduced (\') in the html, the editor broke. Thus, I changed all the single quotes to double quotes, and everything worked. In addition, I had to remove $vbphrase['vbenterprisetranslator_postin_noselection'] and replace it with the string 'English'. See code change below in vbenterprisetranslator_functions_hooks.php:
FIND:
PHP Code:
function vbet_editor_toolbar_end(&$editor_template_name) {
if (!$vbulletin->templatecache["$editor_template_name"]) {
fetch_template("$editor_template_name");
}
$toReplace = '<div id=\"$editorid';
if (false === strpos($vbulletin->templatecache["$editor_template_name"], $toReplace)) {
$toReplace = '<div id=\"{$editorid';
}
require_once(DIR. '/includes/vbenterprisetranslator_functions_utils.php');
global $vbphrase, $vbulletin, $stylevar;
$additionalScript = '<div class=\'smallfont\' style=\'text-align:left;\'>'
.$vbphrase['vbenterprisetranslator_postin']
.' <label for=\'vbet_addbbcodes\'><input id=\'vbet_addbbcodes\' type=\'radio\' name=\'vbet_postInLanguage\' value=\''
.$vbulletin->userinfo['vbet_def_lang'].'\' checked>'
.'<img src=\'images/vbet/flags/'
.$vbulletin->userinfo['vbet_def_lang'].'.gif\' alt=\'$name\' border=\'0\'/>'
.$vbphrase['vbenterprisetranslator_flag_'.strtr($vbulletin->userinfo['vbet_def_lang'], '-', '_')]
.'</label> <label for=\'vbet_nobbcodes\'><input id=\'vbet_nobbcodes\' type=\'radio\' name=\'vbet_postInLanguage\' value=\'0\'>'
.$vbphrase['vbenterprisetranslator_postin_noselection']
.'</label></div>'.$toReplace;
$vbulletin->templatecache[$editor_template_name] =& vbet_replaceFirst($toReplace, $additionalScript, $vbulletin->templatecache["$editor_template_name"]);
}
REPLACE:
PHP Code:
function vbet_editor_toolbar_end(&$editor_template_name) {
if (!$vbulletin->templatecache["$editor_template_name"]) {
fetch_template("$editor_template_name");
}
$toReplace = '<div id=\"{$editorid';
require_once(DIR. '/includes/vbenterprisetranslator_functions_utils.php');
global $vbphrase, $vbulletin, $stylevar;
$additionalScript = '<div class=\"smallfont\" style=\"text-align:left;\">'
.$vbphrase['vbenterprisetranslator_postin']
.' <label for=\"vbet_addbbcodes\"><input id=\"vbet_addbbcodes\" type=\"radio\" name=\"vbet_postInLanguage\" value=\"'
.$vbulletin->userinfo['vbet_def_lang'].'\" checked>'
.'<img src=\"images/vbet/flags/'
.$vbulletin->userinfo['vbet_def_lang'].'.gif\" alt=\"$name\" border=\"0\"/>'
.$vbphrase['vbenterprisetranslator_flag_'.strtr($vbulletin->userinfo['vbet_def_lang'], '-', '_')]
.'</label> <label for=\"vbet_nobbcodes\"><input id=\"vbet_nobbcodes\" type=\"radio\" name=\"vbet_postInLanguage\" value=\"0\">'
. 'English</label></div>'
. $toReplace;
$vbulletin->templatecache[$editor_template_name] = vbet_replaceFirst($toReplace, $additionalScript, $vbulletin->templatecache[$editor_template_name]);
}
I also got rid of the strpos call to save resources, as the hard-coded version seems to work