Thank you chapi, it worked well, cool the feature that checks for IE Version and if its not opera acting like it...
@wfsection: maybe you could insert that function in wfsection 2.01 and Wfchannel 1.6 cos now it seems to check only if its MSIE and not its version, also, acting that way, every opera browser set to identify as IE will get the wysiwyg...not working...
This is wfchannel/admin/index.php code around line 133
if (!$xoopsModuleConfig['usespaw'] || !strstr($_SERVER["HTTP_USER_AGENT"], "MSIE"))
{
$sform->addElement(new XoopsFormDhtmlTextArea(_AM_CHANA . _AM_WORDCOUNT . $total_words, 'page', $page, 15, 60), false);
}
else
{
ob_start();
$sw = new SPAW_Wysiwyg('page', $page, 'en', 'full', 'default', '99%', '600px');
$sw->show();
$sform->addElement(new XoopsFormLabel(_AM_CHANA . _AM_WORDCOUNT . $total_words , ob_get_contents(), 1));
ob_end_clean();
}
i would change it using that function like this starting from line 133:
// checks browser compatibility with the control
function checkBrowser() {
global $HTTP_SERVER_VARS;
$browser = $HTTP_SERVER_VARS['HTTP_USER_AGENT'];
// check if msie
if (eregi("MSIE[^;]*",$browser,$msie)) {
// get version
if (eregi("[0-9]+.[0-9]+",$msie[0],$version)) {
// check version
if ((float)$version[0]>=5.5) {
// finally check if it's not opera impersonating ie
if (!eregi("opera",$browser)) {
return true;
}
}
}
}
return false;
}
if (!$xoopsModuleConfig['usespaw'] || checkBrowser())
{
ob_start();
$sw = new SPAW_Wysiwyg('page', $page, 'en', 'full', 'default', '99%', '600px');
$sw->show();
$sform->addElement(new XoopsFormLabel(_AM_CHANA . _AM_WORDCOUNT . $total_words , ob_get_contents(), 1));
ob_end_clean();
}
else
{
$sform->addElement(new XoopsFormDhtmlTextArea(_AM_CHANA . _AM_WORDCOUNT . $total_words, 'page', $page, 15, 60), false);
}
that was for wfchannel 1.6
Thanx to both for infos.
Cya
Astuni