From: Yves K. <yku...@us...> - 2004-10-26 18:45:29
|
Update of /cvsroot/phpwebsite-comm/modules/xwysiwyg/mod/xwysiwyg/class In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1881/xwysiwyg/mod/xwysiwyg/class Modified Files: xwysiwyg.php Log Message: a few modifications Index: xwysiwyg.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/xwysiwyg/mod/xwysiwyg/class/xwysiwyg.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** xwysiwyg.php 26 Oct 2004 07:31:54 -0000 1.2 --- xwysiwyg.php 26 Oct 2004 18:45:19 -0000 1.3 *************** *** 21,24 **** --- 21,46 ---- if($result) return TRUE; else return FALSE; + + /* + require_once(PHPWS_SOURCE_DIR.'mod/xwysiwyg/class/phpSniff.class.php');//include the browser checking code + //First thing, check browser version + //Since I haven't tested, you'll have to add a better list of supported browsers + $client =& new phpSniff($GET_VARS['UA']); + //Now we want an inclusion list of browsers + //These browsers are supposed to work, Galleon or aol versions + $supported = FALSE; + $browsers = array("fb.6+", "NS7+","ie5.5+","mz1.3+","op7+","kq3+","ga","aol","ca"); + foreach($browsers as $search) { + if($client->browser_is($search)) $supported = TRUE; + } + if($supported){ + $answer['wysiwyg'] = TRUE; + if($settings['request_mode']) { + $answer['request'] = TRUE; + } + if($_SESSION["OBJ_user"]->allow_access("xwysiwyg","settings")) $answer['button'] = TRUE;// $xw_button = TRUE; + } + */ + } *************** *** 154,177 **** if($settings['request_mode']) { // HtmlArea-Main in Request-Mode $main = " ! <script type=\"text/javascript\"> _editor_lang = \"".$lang."\"; _editor_url = \"mod/xwysiwyg/_htmlarea/\"; ! </script> <!-- load the main HTMLArea files --> <script type=\"text/javascript\" src=\"mod/xwysiwyg/_htmlarea/htmlarea.js\"></script> ! <script type=\"text/javascript\"> ".$loadplugs." $editors ! </script> "; } else { // HtmlArea-Main in Normal-Mode $main = " ! <script type=\"text/javascript\"> _editor_lang = \"".$lang."\"; _editor_url = \"mod/xwysiwyg/_htmlarea/\"; ! </script> <!-- load the main HTMLArea files --> <script type=\"text/javascript\" src=\"mod/xwysiwyg/_htmlarea/htmlarea.js\"></script> ! <script type=\"text/javascript\"> ".$loadplugs." window.onload = function initEditor() { // create the editor(s) for the related textbox(es) --- 176,199 ---- if($settings['request_mode']) { // HtmlArea-Main in Request-Mode $main = " ! <script type=\"text/javascript\">\n//<[[CDATA _editor_lang = \"".$lang."\"; _editor_url = \"mod/xwysiwyg/_htmlarea/\"; ! //]]>\n</script> <!-- load the main HTMLArea files --> <script type=\"text/javascript\" src=\"mod/xwysiwyg/_htmlarea/htmlarea.js\"></script> ! <script type=\"text/javascript\">\n//<[[CDATA ".$loadplugs." $editors ! //]]>\n</script> "; } else { // HtmlArea-Main in Normal-Mode $main = " ! <script type=\"text/javascript\">\n//<[[CDATA _editor_lang = \"".$lang."\"; _editor_url = \"mod/xwysiwyg/_htmlarea/\"; ! //]]>\n</script> <!-- load the main HTMLArea files --> <script type=\"text/javascript\" src=\"mod/xwysiwyg/_htmlarea/htmlarea.js\"></script> ! <script type=\"text/javascript\">\n//<[[CDATA ".$loadplugs." window.onload = function initEditor() { // create the editor(s) for the related textbox(es) *************** *** 179,183 **** return false; } ! </script> "; } --- 201,205 ---- return false; } ! //]]>\n</script> "; } *************** *** 187,194 **** <!-- load the main FCKeditor files --> <script type=\"text/javascript\" src=\"mod/fckeditor/fck/fckeditor.js\"></script> ! <script type=\"text/javascript\"> ".$loadplugs." $editors ! </script> "; } else { // FCK-Main in Normal-Mode --- 209,216 ---- <!-- load the main FCKeditor files --> <script type=\"text/javascript\" src=\"mod/fckeditor/fck/fckeditor.js\"></script> ! <script type=\"text/javascript\">\n//<[[CDATA ".$loadplugs." $editors ! //]]>\n</script> "; } else { // FCK-Main in Normal-Mode *************** *** 196,200 **** <!-- load the main FCKeditor files --> <script type=\"text/javascript\" src=\"mod/fckeditor/fck/fckeditor.js\"></script> ! <script type=\"text/javascript\"> ".$loadplugs." window.onload = function initEditor() { // create the editor(s) for the related textbox(es) --- 218,222 ---- <!-- load the main FCKeditor files --> <script type=\"text/javascript\" src=\"mod/fckeditor/fck/fckeditor.js\"></script> ! <script type=\"text/javascript\">\n//<[[CDATA ".$loadplugs." window.onload = function initEditor() { // create the editor(s) for the related textbox(es) *************** *** 202,206 **** return false; } ! </script> "; } --- 224,228 ---- return false; } ! //]]>\n</script> "; } *************** *** 226,229 **** --- 248,252 ---- $main = PHPWS_xwysiwyg::makeMain($settings,$editors,$loadplugs,$lang); } + $main = "//]]>\n</script>".$main."<script type=\"text/javascript\">\n//<[[CDATA"; //ugly hack to work with $GLOBALS['core']->js_func[] return $main; } |