|
From: <be...@us...> - 2012-03-26 04:08:50
|
Revision: 9194
http://xoops.svn.sourceforge.net/xoops/?rev=9194&view=rev
Author: beckmi
Date: 2012-03-26 04:08:43 +0000 (Mon, 26 Mar 2012)
Log Message:
-----------
Bug 3511204: TinyEditor only loading in the 'Scoop' part of the News module
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.5/docs/changelog.250.txt
XoopsCore/branches/2.5.x/2.5.5/htdocs/class/xoopseditor/tinymce/tinymce.php
Modified: XoopsCore/branches/2.5.x/2.5.5/docs/changelog.250.txt
===================================================================
--- XoopsCore/branches/2.5.x/2.5.5/docs/changelog.250.txt 2012-03-26 02:32:07 UTC (rev 9193)
+++ XoopsCore/branches/2.5.x/2.5.5/docs/changelog.250.txt 2012-03-26 04:08:43 UTC (rev 9194)
@@ -10,6 +10,7 @@
- ID: 3494896 Image Manager category creation restrictions (voltan/mage)
- ID: 3494893 PM Messages deleted from Saved box (Danielw42/mage)
- ID: 3501897 Protector errors (cesag/XavierS)
+ - ID: 3511204 TinyEditor only loading in the 'Scoop' part of the News module (peekay/XavierS)
Improved:
- replacing "msnbot" with "bingbot" in Protector (mamba)
Modified: XoopsCore/branches/2.5.x/2.5.5/htdocs/class/xoopseditor/tinymce/tinymce.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.5/htdocs/class/xoopseditor/tinymce/tinymce.php 2012-03-26 02:32:07 UTC (rev 9193)
+++ XoopsCore/branches/2.5.x/2.5.5/htdocs/class/xoopseditor/tinymce/tinymce.php 2012-03-26 04:08:43 UTC (rev 9194)
@@ -28,13 +28,18 @@
var $rootpath;
var $config = array();
var $setting = array();
+ static $LastOfElementsTinymce="";
+ static $ListOfElementsTinymce=array();
+
// PHP 5 Constructor
function __construct($config)
{
$this->setConfig($config);
$this->rootpath = $this->config["rootpath"] . "/tinymce/jscripts/tiny_mce";
$this->xoopsPlugins = $this->get_xoopsPlugins();
+ self::$LastOfElementsTinymce=$this->config["elements"];
+ self::$ListOfElementsTinymce[]= self::$LastOfElementsTinymce;
}
// PHP 4 Contructor
@@ -76,9 +81,8 @@
$this->setting["language"] = $this->config["language"];
$configured[] = "language";
}
- $default_css = array(str_replace(XOOPS_ROOT_PATH, XOOPS_URL , str_replace('\\', '/', dirname(__FILE__) . '/style.css')));
- $content_css = array_merge($default_css, $this->loadCss());
- $this->setting["content_css"] = implode( ",", $content_css);
+
+ $this->setting["content_css"] = implode( ",", $this->loadCss() );
$configured[] = "content_css";
if ( !empty($this->config["theme"]) && is_dir(XOOPS_ROOT_PATH . $this->rootpath . "/themes/" . $this->config["theme"]) ) {
@@ -259,12 +263,28 @@
static $isTinyMceJsLoaded = false;
$this->init();
-
+ if (self::$LastOfElementsTinymce!=$this->setting["elements"]){
+ $ret = "\n<!-- 'tiny_mce.js' SCRIPT NOT YET ".$this->setting["elements"]." -->\n"; //debug
+ return $ret;
+ }
+ else {
+ $this->setting["elements"]=implode(",",self::$ListOfElementsTinymce);
+ }
if ( !empty($this->setting["callback"]) ) {
$callback = $this->setting["callback"];
unset($this->setting["callback"]);
} else {
$callback = "";
+ }
+ if ( !empty($this->setting["file_browser_callback"]) ) {
+ $fbc_name=XOOPS_ROOT_PATH . "/class/xoopseditor/tinymce/include/".$this->setting["file_browser_callback"].".js";
+ //suis passé la /lesrevespossibles/x244/class/xoopseditor/tinymce/tinymce/jscripts/include/openFinder.js
+ $file_browser_callback ="MyXoopsUrl ='".XOOPS_URL."';\n";
+ $file_browser_callback .= file_get_contents($fbc_name);
+ $file_browser_callback .="\n//suis passé la ".$fbc_name;
+ //unset($this->setting["file_browser_callback"]);
+ } else {
+ $file_browser_callback = "//suis absent";
}
// create returned string - start
@@ -330,6 +350,7 @@
$ret .= "tinymceload: true\n";
$ret .= "});\n";
$ret .= $callback . "\n";
+ $ret .= $file_browser_callback. "\n";
//$ret .= "function toggleEditor(id) {tinyMCE.execCommand('mceToggleEditor',false, id);}\n";
$ret .= "</script>\n";
$ret .= "<!-- End TinyMce Rendering -->\n";//debug
@@ -337,4 +358,4 @@
return $ret ;
}
}
-?>
+?>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|