Hi Michal,
Dan deher stramba ħafna, so I eskluż kunflitti plugin u marru dritti għall-fajl PHP.
I maħduma l-kodiċi ftit u sabet-soluzzjoni li ġejja. Forsi din hija xi ħaġa unika li jaffettwaw is-sit tiegħi, iżda jidher li hekk kif kwotazzjonijiet uniku kienu introdotti (\\ ') fil-html, l-editur kissru. Għalhekk, I biddel il-kwotazzjonijiet uniku għall-kwotazzjonijiet doppja, u kollox maħduma. Barra minn hekk, kelli biex jitneħħew $ vbphrase ["vbenterprisetranslator_postin_noselection"] u tibdilha ma "Ingliż" l-sekwenza. Ara l-bidla fil-kodiċi hawn taħt fil vbenterprisetranslator_functions_hooks.php:
ISSIB:
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 wkoll ħassar l-strpos sejħa biex jiffrankaw ir-riżorsi, bħala l-verżjoni hard-kodifikati jidher li qed jaħdem