|
From: <be...@us...> - 2014-08-27 03:30:42
|
Revision: 12745
http://sourceforge.net/p/xoops/svn/12745
Author: beckmi
Date: 2014-08-27 03:30:37 +0000 (Wed, 27 Aug 2014)
Log Message:
-----------
Updating copyrights, adding couple of "isset" checks
Modified Paths:
--------------
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/editor_registry.php
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/formtinymce.php
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/include/xoopscode.php
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/include/xoopsemotions.php
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/include/xoopsimagemanager.php
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/include/xoopsmlcontent.php
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/include/xoopsquote.php
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/language/english.php
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/settings.php
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/spellchecker/editor_plugin.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopscode/editor_plugin.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsemotions/xoopsemotions.php
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsimagemanager/js/xoopsimagemanager.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsimagemanager/xoopsimagebrowser.php
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsimagemanager/xoopsimagemanager.php
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsmlcontent/xoopsmlcontent.php
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsquote/editor_plugin.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce.php
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/editor_registry.php
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/editor_registry.php 2014-08-27 03:28:51 UTC (rev 12744)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/editor_registry.php 2014-08-27 03:30:37 UTC (rev 12745)
@@ -2,13 +2,13 @@
/**
* TinyMCE adapter for XOOPS
*
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @copyright (c) 2000-2014 XOOPS Project (www.xoops.org)
* @license http://www.fsf.org/copyleft/gpl.html GNU public license
* @package class
* @subpackage editor
* @since 2.3.0
* @author Taiwen Jiang <ph...@us...>
- * @version $Id: editor_registry.php 8066 2011-11-06 05:09:33Z beckmi $
+ * @version $Id: editor_registry.php 12666 2014-06-30 10:02:07Z beckmi $
*/
return $config = array(
@@ -19,4 +19,3 @@
"order" => 5,
"nohtml" => 0
);
-?>
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/formtinymce.php
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/formtinymce.php 2014-08-27 03:28:51 UTC (rev 12744)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/formtinymce.php 2014-08-27 03:30:37 UTC (rev 12745)
@@ -12,17 +12,20 @@
/**
* TinyMCE adapter for XOOPS
*
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @copyright (c) 2000-2014 XOOPS Project (www.xoops.org)
* @license http://www.fsf.org/copyleft/gpl.html GNU public license
* @package class
* @subpackage editor
* @since 2.3.0
* @author Taiwen Jiang <ph...@us...>
- * @version $Id: formtinymce.php 8066 2011-11-06 05:09:33Z beckmi $
+ * @version $Id: formtinymce.php 12666 2014-06-30 10:02:07Z beckmi $
*/
xoops_load('XoopsEditor');
+/**
+ * Class XoopsFormTinymce
+ */
class XoopsFormTinymce extends XoopsEditor
{
var $language;
@@ -33,12 +36,12 @@
/**
* Constructor
*
- * @param array $configs Editor Options
+ * @param array $configs Editor Options
*/
function __construct($configs)
{
$current_path = __FILE__;
- if ( DIRECTORY_SEPARATOR != "/" ) {
+ if (DIRECTORY_SEPARATOR != "/") {
$current_path = str_replace( strpos( $current_path, "\\\\", 2 ) ? "\\\\" : DIRECTORY_SEPARATOR, "/", $current_path);
}
@@ -51,10 +54,13 @@
$this->configs["area_height"] = isset($this->configs["height"]) ? $this->configs["height"] : $this->height;
$this->configs["fonts"] = $this->getFonts();
- require_once dirname(__FILE__) . "/tinymce.php";
+ require_once __DIR__ . "/tinymce.php";
$this->editor = new TinyMCE($this->configs);
}
+ /**
+ * @param $configs
+ */
function XoopsFormTinymce($configs)
{
$this->__construct($configs);
@@ -66,7 +72,7 @@
* I'VE USED THIS EXAMPLE TO WRITE VALIDATION CODE
* http://tinymce.moxiecode.com/punbb/viewtopic.php?id=12616
*
- * @return string
+ * @return string
*/
function renderValidationJS()
{
@@ -78,15 +84,17 @@
$ret = "\n";
$ret.= "if ( tinyMCE.get('{$eltname}').getContent() == \"\" || tinyMCE.get('{$eltname}').getContent() == null) ";
$ret.= "{ window.alert(\"{$eltmsg}\"); tinyMCE.get('{$eltname}').focus(); return false; }";
+
return $ret;
}
+
return '';
}
/**
* get language
*
- * @return string
+ * @return string
*/
function getLanguage()
{
@@ -97,7 +105,7 @@
$this->language = strtolower(constant("_XOOPS_EDITOR_TINYMCE_LANGUAGE"));
} else {
$this->language = str_replace('_', '-', strtolower(_LANGCODE));
- if(strtolower(_CHARSET) == "utf-8") {
+ if (strtolower(_CHARSET) == "utf-8") {
$this->language .= "_utf8";
}
}
@@ -105,6 +113,9 @@
return $this->language;
}
+ /**
+ * @return mixed
+ */
function getFonts()
{
if (empty($this->config["fonts"]) && defined("_XOOPS_EDITOR_TINYMCE_FONTS")) {
@@ -117,7 +128,7 @@
/**
* prepare HTML for output
*
- * @return sting HTML
+ * @return sting HTML
*/
function render()
{
@@ -130,11 +141,10 @@
/**
* Check if compatible
*
- * @return
+ * @return bool
*/
function isActive()
{
return is_readable(XOOPS_ROOT_PATH . $this->rootPath . "/tinymce.php");
}
}
-?>
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/include/xoopscode.php
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/include/xoopscode.php 2014-08-27 03:28:51 UTC (rev 12744)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/include/xoopscode.php 2014-08-27 03:30:37 UTC (rev 12745)
@@ -2,18 +2,17 @@
/**
* TinyMCE adapter for XOOPS
*
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @copyright (c) 2000-2014 XOOPS Project (www.xoops.org)
* @license http://www.fsf.org/copyleft/gpl.html GNU public license
* @package class
* @subpackage editor
* @since 2.3.0
* @author Laurent JEN <du...@fr...>
- * @version $Id: xoopscode.php 8066 2011-11-06 05:09:33Z beckmi $
+ * @version $Id: xoopscode.php 12666 2014-06-30 10:02:07Z beckmi $
*/
if (!defined("XOOPS_ROOT_PATH")) { die("XOOPS root path not defined"); }
-// Add your code here to check acces by groups
+// Add your code here to check access by groups
return true;
-?>
\ No newline at end of file
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/include/xoopsemotions.php
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/include/xoopsemotions.php 2014-08-27 03:28:51 UTC (rev 12744)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/include/xoopsemotions.php 2014-08-27 03:30:37 UTC (rev 12745)
@@ -2,19 +2,18 @@
/**
* TinyMCE adapter for XOOPS
*
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @copyright (c) 2000-2014 XOOPS Project (www.xoops.org)
* @license http://www.fsf.org/copyleft/gpl.html GNU public license
* @package class
* @subpackage editor
* @since 2.3.0
* @author Laurent JEN <du...@fr...>
- * @version $Id: xoopsemotions.php 8066 2011-11-06 05:09:33Z beckmi $
+ * @version $Id: xoopsemotions.php 12666 2014-06-30 10:02:07Z beckmi $
*/
if (!defined("XOOPS_ROOT_PATH")) { die("XOOPS root path not defined"); }
include_once XOOPS_ROOT_PATH . "/modules/system/constants.php";
-// Add your code here to check acces by groups
+// Add your code here to check access by groups
return true;
-?>
\ No newline at end of file
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/include/xoopsimagemanager.php
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/include/xoopsimagemanager.php 2014-08-27 03:28:51 UTC (rev 12744)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/include/xoopsimagemanager.php 2014-08-27 03:30:37 UTC (rev 12745)
@@ -2,13 +2,13 @@
/**
* TinyMCE adapter for XOOPS
*
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @copyright (c) 2000-2014 XOOPS Project (www.xoops.org)
* @license http://www.fsf.org/copyleft/gpl.html GNU public license
* @package class
* @subpackage editor
* @since 2.3.0
* @author Laurent JEN <du...@fr...>
- * @version $Id: xoopsimagemanager.php 8066 2011-11-06 05:09:33Z beckmi $
+ * @version $Id: xoopsimagemanager.php 12666 2014-06-30 10:02:07Z beckmi $
*/
if (!defined("XOOPS_ROOT_PATH")) { die("XOOPS root path not defined"); }
@@ -20,4 +20,3 @@
return false;
}
return true;
-?>
\ No newline at end of file
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/include/xoopsmlcontent.php
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/include/xoopsmlcontent.php 2014-08-27 03:28:51 UTC (rev 12744)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/include/xoopsmlcontent.php 2014-08-27 03:30:37 UTC (rev 12745)
@@ -2,13 +2,13 @@
/**
* TinyMCE adapter for XOOPS
*
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @copyright (c) 2000-2014 XOOPS Project (www.xoops.org)
* @license http://www.fsf.org/copyleft/gpl.html GNU public license
* @package class
* @subpackage editor
* @since 2.3.0
* @author Laurent JEN <du...@fr...>
- * @version $Id: xoopsmlcontent.php 8066 2011-11-06 05:09:33Z beckmi $
+ * @version $Id: xoopsmlcontent.php 12666 2014-06-30 10:02:07Z beckmi $
*/
if (!defined("XOOPS_ROOT_PATH")) { die("XOOPS root path not defined"); }
@@ -24,4 +24,3 @@
}
return false;
-?>
\ No newline at end of file
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/include/xoopsquote.php
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/include/xoopsquote.php 2014-08-27 03:28:51 UTC (rev 12744)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/include/xoopsquote.php 2014-08-27 03:30:37 UTC (rev 12745)
@@ -2,18 +2,17 @@
/**
* TinyMCE adapter for XOOPS
*
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @copyright (c) 2000-2014 XOOPS Project (www.xoops.org)
* @license http://www.fsf.org/copyleft/gpl.html GNU public license
* @package class / xoopseditor
* @subpackage tinymce
* @since 2.3.0
* @author Laurent JEN <du...@fr...>
- * @version $Id: xoopsquote.php 8066 2011-11-06 05:09:33Z beckmi $
+ * @version $Id: xoopsquote.php 12666 2014-06-30 10:02:07Z beckmi $
*/
if (!defined("XOOPS_ROOT_PATH")) { die("XOOPS root path not defined"); }
-// Add your code here to check acces by groups
+// Add your code here to check access by groups
return true;
-?>
\ No newline at end of file
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/language/english.php
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/language/english.php 2014-08-27 03:28:51 UTC (rev 12744)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/language/english.php 2014-08-27 03:30:37 UTC (rev 12745)
@@ -2,13 +2,13 @@
/**
* TinyMCE adapter for XOOPS
*
- * @copyright The XOOPS project http://www.xoops.org/
+ * @copyright (c) 2000-2014 XOOPS Project (www.xoops.org)
* @license http://www.fsf.org/copyleft/gpl.html GNU public license
* @package core
* @subpackage xoopseditor
* @since 2.3.0
* @author Taiwen Jiang <ph...@us...>
- * @version $Id: english.php 11531 2013-05-12 07:46:06Z beckmi $
+ * @version $Id: english.php 12666 2014-06-30 10:02:07Z beckmi $
*/
/*
* Assocated with editor_registry.php
@@ -20,4 +20,3 @@
define('_XOOPS_EDITOR_TINYMCE_LANGUAGE',"en");
// FONT LIST, FORMAT: "Name=value1,value2;Name=value"
define('_XOOPS_EDITOR_TINYMCE_FONTS',"Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,times new roman,times,serif;Tahoma=tahoma,arial,helvetica,sans-serif;Times New Roman=times new roman,times,serif;Verdana=verdana,arial,helvetica,sans-serif;Impact=impact;WingDings=wingdings");
-?>
\ No newline at end of file
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/settings.php
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/settings.php 2014-08-27 03:28:51 UTC (rev 12744)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/settings.php 2014-08-27 03:30:37 UTC (rev 12745)
@@ -12,7 +12,7 @@
/**
* TinyMCE settings for XOOPS
*
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @copyright (c) 2000-2014 XOOPS Project (www.xoops.org)
* @license http://www.fsf.org/copyleft/gpl.html GNU public license
* @package class
* @subpackage editor
@@ -20,7 +20,7 @@
* @author Taiwen Jiang <ph...@us...>
* @author Lucio Rota <luc...@gm...>
* @author Laurent JEN <du...@fr...>
- * @version $Id: settings.php 8290 2011-11-15 01:57:18Z beckmi $
+ * @version $Id: settings.php 12666 2014-06-30 10:02:07Z beckmi $
*/
return array(
@@ -342,4 +342,3 @@
."|title]",
);
-?>
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/spellchecker/editor_plugin.js
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/spellchecker/editor_plugin.js 2014-08-27 03:28:51 UTC (rev 12744)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/spellchecker/editor_plugin.js 2014-08-27 03:30:37 UTC (rev 12745)
@@ -1 +1 @@
-(function(){var a=tinymce.util.JSONRequest,c=tinymce.each,b=tinymce.DOM;tinymce.create("tinymce.plugins.SpellcheckerPlugin",{getInfo:function(){return{longname:"Spellchecker",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker",version:tinymce.majorVersion+"."+tinymce.minorVersion}},init:function(e,f){var g=this,d;g.url=f;g.editor=e;g.rpcUrl=e.getParam("spellchecker_rpc_url","{backend}");if(g.rpcUrl=="{backend}"){if(tinymce.isIE){return}g.hasSupport=true;e.onContextMenu.addToTop(function(h,i){if(g.active){return false}})}e.addCommand("mceSpellCheck",function(){if(g.rpcUrl=="{backend}"){g.editor.getBody().spellcheck=g.active=!g.active;return}if(!g.active){e.setProgressState(1);g._sendRPC("checkWords",[g.selectedLang,g._getWords()],function(h){if(h.length>0){g.active=1;g._markWords(h);e.setProgressState(0);e.nodeChanged()}else{e.setProgressState(0);if(e.getParam("spellchecker_report_no_misspellings",true)){e.windowManager.alert("spellchecker.no_mpell")}}})}else{g._done()}});if(e.settings.content_css!==false){e.contentCSS.push(f+"/css/content.css")}e.onClick.add(g._showMenu,g);e.onContextMenu.add(g._showMenu,g);e.onBeforeGetContent.add(function(){if(g.active){g._removeWords()}});e.onNodeChange.add(function(i,h){h.setActive("spellchecker",g.active)});e.onSetContent.add(function(){g._done()});e.onBeforeGetContent.add(function(){g._done()});e.onBeforeExecCommand.add(function(h,i){if(i=="mceFullScreen"){g._done()}});g.languages={};c(e.getParam("spellchecker_languages","+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv","hash"),function(i,h){if(h.indexOf("+")===0){h=h.substring(1);g.selectedLang=i}g.languages[h]=i})},createControl:function(h,d){var f=this,g,e=f.editor;if(h=="spellchecker"){if(f.rpcUrl=="{backend}"){if(f.hasSupport){g=d.createButton(h,{title:"spellchecker.desc",cmd:"mceSpellCheck",scope:f})}return g}g=d.createSplitButton(h,{title:"spellchecker.desc",cmd:"mceSpellCheck",scope:f});g.onRenderMenu.add(function(j,i){i.add({title:"spellchecker.langs","class":"mceMenuItemTitle"}).setDisabled(1);f.menuItems={};c(f.languages,function(n,m){var p={icon:1},l;p.onclick=function(){if(n==f.selectedLang){return}f._updateMenu(l);f.selectedLang=n};p.title=m;l=i.add(p);l.setSelected(n==f.selectedLang);f.menuItems[n]=l;if(n==f.selectedLang){f.selectedItem=l}})});return g}},setLanguage:function(e){var d=this;if(e==d.selectedLang){return}if(tinymce.grep(d.languages,function(f){return f===e}).length===0){throw"Unknown language: "+e}d.selectedLang=e;if(d.menuItems){d._updateMenu(d.menuItems[e])}if(d.active){d._done()}},_updateMenu:function(d){d.setSelected(1);this.selectedItem.setSelected(0);this.selectedItem=d},_walk:function(i,g){var h=this.editor.getDoc(),e;if(h.createTreeWalker){e=h.createTreeWalker(i,NodeFilter.SHOW_TEXT,null,false);while((i=e.nextNode())!=null){g.call(this,i)}}else{tinymce.walk(i,g,"childNodes")}},_getSeparators:function(){var e="",d,f=this.editor.getParam("spellchecker_word_separator_chars",'\\s!"#$%&()*+,-./:;<=>?@[]^_{|}\xA7\xA9\xAB\xAE\xB1\xB6\xB7\xB8\xBB\xBC\xBD\xBE\xBF\xD7\xF7\xA4\u201d\u201c');for(d=0;d<f.length;d++){e+="\\"+f.charAt(d)}return e},_getWords:function(){var e=this.editor,g=[],d="",f={},h=[];this._walk(e.getBody(),function(i){if(i.nodeType==3){d+=i.nodeValue+" "}});if(e.getParam("spellchecker_word_pattern")){h=d.match("("+e.getParam("spellchecker_word_pattern")+")","gi")}else{d=d.replace(new RegExp("([0-9]|["+this._getSeparators()+"])","g")," ");d=tinymce.trim(d.replace(/(\s+)/g," "));h=d.split(" ")}c(h,function(i){if(!f[i]){g.push(i);f[i]=1}});return g},_removeWords:function(d){var e=this.editor,h=e.dom,g=e.selection,f=g.getRng(true);c(h.select("span").reverse(),function(i){if(i&&(h.hasClass(i,"mceItemHiddenSpellWord")||h.hasClass(i,"mceItemHidden"))){if(!d||h.decode(i.innerHTML)==d){h.remove(i,1)}}});g.setRng(f)},_markWords:function(l){var h=this.editor,g=h.dom,j=h.getDoc(),i=h.selection,d=i.getRng(true),e=[],k=l.join("|"),m=this._getSeparators(),f=new RegExp("(^|["+m+"])("+k+")(?=["+m+"]|$)","g");this._walk(h.getBody(),function(o){if(o.nodeType==3){e.push(o)}});c(e,function(t){var r,q,o,s,p=t.nodeValue;f.lastIndex=0;if(f.test(p)){p=g.encode(p);q=g.create("span",{"class":"mceItemHidden"});if(tinymce.isIE){p=p.replace(f,"$1<mcespell>$2</mcespell>");while((s=p.indexOf("<mcespell>"))!=-1){o=p.substring(0,s);if(o.length){r=j.createTextNode(g.decode(o));q.appendChild(r)}p=p.substring(s+10);s=p.indexOf("</mcespell>");o=p.substring(0,s);p=p.substring(s+11);q.appendChild(g.create("span",{"class":"mceItemHiddenSpellWord"},o))}if(p.length){r=j.createTextNode(g.decode(p));q.appendChild(r)}}else{q.innerHTML=p.replace(f,'$1<span class="mceItemHiddenSpellWord">$2</span>')}g.replace(q,t)}});i.setRng(d)},_showMenu:function(h,j){var i=this,h=i.editor,d=i._menu,l,k=h.dom,g=k.getViewPort(h.getWin()),f=j.target;j=0;if(!d){d=h.controlManager.createDropMenu("spellcheckermenu",{"class":"mceNoIcons"});i._menu=d}if(k.hasClass(f,"mceItemHiddenSpellWord")){d.removeAll();d.add({title:"spellchecker.wait","class":"mceMenuItemTitle"}).setDisabled(1);i._sendRPC("getSuggestions",[i.selectedLang,k.decode(f.innerHTML)],function(m){var e;d.removeAll();if(m.length>0){d.add({title:"spellchecker.sug","class":"mceMenuItemTitle"}).setDisabled(1);c(m,function(n){d.add({title:n,onclick:function(){k.replace(h.getDoc().createTextNode(n),f);i._checkDone()}})});d.addSeparator()}else{d.add({title:"spellchecker.no_sug","class":"mceMenuItemTitle"}).setDisabled(1)}if(h.getParam("show_ignore_words",true)){e=i.editor.getParam("spellchecker_enable_ignore_rpc","");d.add({title:"spellchecker.ignore_word",onclick:function(){var n=f.innerHTML;k.remove(f,1);i._checkDone();if(e){h.setProgressState(1);i._sendRPC("ignoreWord",[i.selectedLang,n],function(o){h.setProgressState(0)})}}});d.add({title:"spellchecker.ignore_words",onclick:function(){var n=f.innerHTML;i._removeWords(k.decode(n));i._checkDone();if(e){h.setProgressState(1);i._sendRPC("ignoreWords",[i.selectedLang,n],function(o){h.setProgressState(0)})}}})}if(i.editor.getParam("spellchecker_enable_learn_rpc")){d.add({title:"spellchecker.learn_word",onclick:function(){var n=f.innerHTML;k.remove(f,1);i._checkDone();h.setProgressState(1);i._sendRPC("learnWord",[i.selectedLang,n],function(o){h.setProgressState(0)})}})}d.update()});l=b.getPos(h.getContentAreaContainer());d.settings.offset_x=l.x;d.settings.offset_y=l.y;h.selection.select(f);l=k.getPos(f);d.showMenu(l.x,l.y+f.offsetHeight-g.y);return tinymce.dom.Event.cancel(j)}else{d.hideMenu()}},_checkDone:function(){var e=this,d=e.editor,g=d.dom,f;c(g.select("span"),function(h){if(h&&g.hasClass(h,"mceItemHiddenSpellWord")){f=true;return false}});if(!f){e._done()}},_done:function(){var d=this,e=d.active;if(d.active){d.active=0;d._removeWords();if(d._menu){d._menu.hideMenu()}if(e){d.editor.nodeChanged()}}},_sendRPC:function(e,g,d){var f=this;a.sendRPC({url:f.rpcUrl,method:e,params:g,success:d,error:function(i,h){f.editor.setProgressState(0);f.editor.windowManager.alert(i.errstr||("Error response: "+h.responseText))}})}});tinymce.PluginManager.add("spellchecker",tinymce.plugins.SpellcheckerPlugin)})();
\ No newline at end of file
+(function(){var a=tinymce.util.JSONRequest,c=tinymce.each,b=tinymce.DOM;tinymce.create("tinymce.plugins.SpellcheckerPlugin",{getInfo:function(){return{longname:"Spellchecker",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker",version:tinymce.majorVersion+"."+tinymce.minorVersion}},init:function(e,f){var g=this,d;g.url=f;g.editor=e;g.rpcUrl=e.getParam("spellchecker_rpc_url","{backend}");if(g.rpcUrl=="{backend}"){if(tinymce.isIE){return}g.hasSupport=true;e.onContextMenu.addToTop(function(h,i){if(g.active){return false}})}e.addCommand("mceSpellCheck",function(){if(g.rpcUrl=="{backend}"){g.editor.getBody().spellcheck=g.active=!g.active;return}if(!g.active){e.setProgressState(1);g._sendRPC("checkWords",[g.selectedLang,g._getWords()],function(h){if(h.length>0){g.active=1;g._markWords(h);e.setProgressState(0);e.nodeChanged()}else{e.setProgressState(0);if(e.getParam("spellchecker_report_no_misspellings",true)){e.windowManager.alert("spellchecker.no_mpell")}}})}else{g._done()}});if(e.settings.content_css!==false){e.contentCSS.push(f+"/css/content.css")}e.onClick.add(g._showMenu,g);e.onContextMenu.add(g._showMenu,g);e.onBeforeGetContent.add(function(){if(g.active){g._removeWords()}});e.onNodeChange.add(function(i,h){h.setActive("spellchecker",g.active)});e.onSetContent.add(function(){g._done()});e.onBeforeGetContent.add(function(){g._done()});e.onBeforeExecCommand.add(function(h,i){if(i=="mceFullScreen"){g._done()}});g.languages={};c(e.getParam("spellchecker_languages","+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv","hash"),function(i,h){if(h.indexOf("+")===0){h=h.substring(1);g.selectedLang=i}g.languages[h]=i})},createControl:function(h,d){var f=this,g,e=f.editor;if(h=="spellchecker"){if(f.rpcUrl=="{backend}"){if(f.hasSupport){g=d.createButton(h,{title:"spellchecker.desc",cmd:"mceSpellCheck",scope:f})}return g}g=d.createSplitButton(h,{title:"spellchecker.desc",cmd:"mceSpellCheck",scope:f});g.onRenderMenu.add(function(j,i){i.add({title:"spellchecker.langs","class":"mceMenuItemTitle"}).setDisabled(1);f.menuItems={};c(f.languages,function(n,m){var p={icon:1},l;p.onclick=function(){if(n==f.selectedLang){return}f._updateMenu(l);f.selectedLang=n};p.title=m;l=i.add(p);l.setSelected(n==f.selectedLang);f.menuItems[n]=l;if(n==f.selectedLang){f.selectedItem=l}})});return g}},setLanguage:function(e){var d=this;if(e==d.selectedLang){return}if(tinymce.grep(d.languages,function(f){return f===e}).length===0){throw"Unknown language: "+e}d.selectedLang=e;if(d.menuItems){d._updateMenu(d.menuItems[e])}if(d.active){d._done()}},_updateMenu:function(d){d.setSelected(1);this.selectedItem.setSelected(0);this.selectedItem=d},_walk:function(i,g){var h=this.editor.getDoc(),e;if(h.createTreeWalker){e=h.createTreeWalker(i,NodeFilter.SHOW_TEXT,null,false);while((i=e.nextNode())!=null){g.call(this,i)}}else{tinymce.walk(i,g,"childNodes")}},_getSeparators:function(){var e="",d,f=this.editor.getParam("spellchecker_word_separator_chars",'\\s!"#$%&()*+,-./:;<=>?@[]^_{|}§©«®±¶·¸»¼½¾¿×÷¤\u201d\u201c');for(d=0;d<f.length;d++){e+="\\"+f.charAt(d)}return e},_getWords:function(){var e=this.editor,g=[],d="",f={},h=[];this._walk(e.getBody(),function(i){if(i.nodeType==3){d+=i.nodeValue+" "}});if(e.getParam("spellchecker_word_pattern")){h=d.match("("+e.getParam("spellchecker_word_pattern")+")","gi")}else{d=d.replace(new RegExp("([0-9]|["+this._getSeparators()+"])","g")," ");d=tinymce.trim(d.replace(/(\s+)/g," "));h=d.split(" ")}c(h,function(i){if(!f[i]){g.push(i);f[i]=1}});return g},_removeWords:function(d){var e=this.editor,h=e.dom,g=e.selection,f=g.getRng(true);c(h.select("span").reverse(),function(i){if(i&&(h.hasClass(i,"mceItemHiddenSpellWord")||h.hasClass(i,"mceItemHidden"))){if(!d||h.decode(i.innerHTML)==d){h.remove(i,1)}}});g.setRng(f)},_markWords:function(l){var h=this.editor,g=h.dom,j=h.getDoc(),i=h.selection,d=i.getRng(true),e=[],k=l.join("|"),m=this._getSeparators(),f=new RegExp("(^|["+m+"])("+k+")(?=["+m+"]|$)","g");this._walk(h.getBody(),function(o){if(o.nodeType==3){e.push(o)}});c(e,function(t){var r,q,o,s,p=t.nodeValue;f.lastIndex=0;if(f.test(p)){p=g.encode(p);q=g.create("span",{"class":"mceItemHidden"});if(tinymce.isIE){p=p.replace(f,"$1<mcespell>$2</mcespell>");while((s=p.indexOf("<mcespell>"))!=-1){o=p.substring(0,s);if(o.length){r=j.createTextNode(g.decode(o));q.appendChild(r)}p=p.substring(s+10);s=p.indexOf("</mcespell>");o=p.substring(0,s);p=p.substring(s+11);q.appendChild(g.create("span",{"class":"mceItemHiddenSpellWord"},o))}if(p.length){r=j.createTextNode(g.decode(p));q.appendChild(r)}}else{q.innerHTML=p.replace(f,'$1<span class="mceItemHiddenSpellWord">$2</span>')}g.replace(q,t)}});i.setRng(d)},_showMenu:function(h,j){var i=this,h=i.editor,d=i._menu,l,k=h.dom,g=k.getViewPort(h.getWin()),f=j.target;j=0;if(!d){d=h.controlManager.createDropMenu("spellcheckermenu",{"class":"mceNoIcons"});i._menu=d}if(k.hasClass(f,"mceItemHiddenSpellWord")){d.removeAll();d.add({title:"spellchecker.wait","class":"mceMenuItemTitle"}).setDisabled(1);i._sendRPC("getSuggestions",[i.selectedLang,k.decode(f.innerHTML)],function(m){var e;d.removeAll();if(m.length>0){d.add({title:"spellchecker.sug","class":"mceMenuItemTitle"}).setDisabled(1);c(m,function(n){d.add({title:n,onclick:function(){k.replace(h.getDoc().createTextNode(n),f);i._checkDone()}})});d.addSeparator()}else{d.add({title:"spellchecker.no_sug","class":"mceMenuItemTitle"}).setDisabled(1)}if(h.getParam("show_ignore_words",true)){e=i.editor.getParam("spellchecker_enable_ignore_rpc","");d.add({title:"spellchecker.ignore_word",onclick:function(){var n=f.innerHTML;k.remove(f,1);i._checkDone();if(e){h.setProgressState(1);i._sendRPC("ignoreWord",[i.selectedLang,n],function(o){h.setProgressState(0)})}}});d.add({title:"spellchecker.ignore_words",onclick:function(){var n=f.innerHTML;i._removeWords(k.decode(n));i._checkDone();if(e){h.setProgressState(1);i._sendRPC("ignoreWords",[i.selectedLang,n],function(o){h.setProgressState(0)})}}})}if(i.editor.getParam("spellchecker_enable_learn_rpc")){d.add({title:"spellchecker.learn_word",onclick:function(){var n=f.innerHTML;k.remove(f,1);i._checkDone();h.setProgressState(1);i._sendRPC("learnWord",[i.selectedLang,n],function(o){h.setProgressState(0)})}})}d.update()});l=b.getPos(h.getContentAreaContainer());d.settings.offset_x=l.x;d.settings.offset_y=l.y;h.selection.select(f);l=k.getPos(f);d.showMenu(l.x,l.y+f.offsetHeight-g.y);return tinymce.dom.Event.cancel(j)}else{d.hideMenu()}},_checkDone:function(){var e=this,d=e.editor,g=d.dom,f;c(g.select("span"),function(h){if(h&&g.hasClass(h,"mceItemHiddenSpellWord")){f=true;return false}});if(!f){e._done()}},_done:function(){var d=this,e=d.active;if(d.active){d.active=0;d._removeWords();if(d._menu){d._menu.hideMenu()}if(e){d.editor.nodeChanged()}}},_sendRPC:function(e,g,d){var f=this;a.sendRPC({url:f.rpcUrl,method:e,params:g,success:d,error:function(i,h){f.editor.setProgressState(0);f.editor.windowManager.alert(i.errstr||("Error response: "+h.responseText))}})}});tinymce.PluginManager.add("spellchecker",tinymce.plugins.SpellcheckerPlugin)})();
\ No newline at end of file
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopscode/editor_plugin.js
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopscode/editor_plugin.js 2014-08-27 03:28:51 UTC (rev 12744)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopscode/editor_plugin.js 2014-08-27 03:30:37 UTC (rev 12745)
@@ -2,7 +2,7 @@
* $Id$
*
* @author Moxiecode
- * @copyright Copyright \xA9 2004-2008, Moxiecode Systems AB, All rights reserved.
+ * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
*/
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsemotions/xoopsemotions.php
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsemotions/xoopsemotions.php 2014-08-27 03:28:51 UTC (rev 12744)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsemotions/xoopsemotions.php 2014-08-27 03:30:37 UTC (rev 12745)
@@ -2,7 +2,7 @@
/**
* Xoopsemotions plugin for tinymce
*
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @copyright (c) 2000-2014 XOOPS Project (www.xoops.org)
* @license http://www.fsf.org/copyleft/gpl.html GNU public license
* @package class / xoopseditor
* @subpackage tinymce / xoops plugins
@@ -14,7 +14,7 @@
*/
// load mainfile.php - start
-$current_path = dirname(__FILE__);
+$current_path = __DIR__;
if (DIRECTORY_SEPARATOR != "/") {
$current_path = str_replace( DIRECTORY_SEPARATOR, "/", $current_path);
}
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsimagemanager/js/xoopsimagemanager.js
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsimagemanager/js/xoopsimagemanager.js 2014-08-27 03:28:51 UTC (rev 12744)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsimagemanager/js/xoopsimagemanager.js 2014-08-27 03:30:37 UTC (rev 12745)
@@ -1,6 +1,6 @@
/**
* @author Moxiecode
- * @copyright Copyright \xA9 2004-2008, Moxiecode Systems AB, All rights reserved.
+ * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
*
* @author ralf57
* @author luciorota (luc...@gm...)
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsimagemanager/xoopsimagebrowser.php
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsimagemanager/xoopsimagebrowser.php 2014-08-27 03:28:51 UTC (rev 12744)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsimagemanager/xoopsimagebrowser.php 2014-08-27 03:30:37 UTC (rev 12745)
@@ -2,7 +2,7 @@
/**
* Xoopsemotions plugin for tinymce
*
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @copyright (c) 2000-2014 XOOPS Project (www.xoops.org)
* @license http://www.fsf.org/copyleft/gpl.html GNU public license
* @package class / xoopseditor
* @subpackage tinymce / xoops plugins
@@ -14,7 +14,7 @@
*/
// load mainfile.php
-$current_path = dirname(__FILE__);
+$current_path = __DIR__;
if (DIRECTORY_SEPARATOR != "/") {
$current_path = str_replace( DIRECTORY_SEPARATOR, "/", $current_path);
}
@@ -177,7 +177,7 @@
}
// Add new image - end
- // Add new cat\xE9gorie - start
+ // Add new category - start
if ( !empty($_POST["op"]) && $op == "addcat" ) {
if (!$GLOBALS["xoopsSecurity"]->check()) {
redirect_header($current_file . "?target=" . $target, 3, implode("<br />", $GLOBALS["xoopsSecurity"]->getErrors()));
@@ -230,7 +230,7 @@
}
redirect_header($current_file . "?target=" . $target, 3,_MD_AM_DBUPDATED);
}
- // Add new cat\xE9gorie - end
+ // Add new category - end
// Update categorie - start
if ( !empty($_POST["op"]) && $op == "updatecat" ) {
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsimagemanager/xoopsimagemanager.php
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsimagemanager/xoopsimagemanager.php 2014-08-27 03:28:51 UTC (rev 12744)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsimagemanager/xoopsimagemanager.php 2014-08-27 03:30:37 UTC (rev 12745)
@@ -2,7 +2,7 @@
/**
* Xoopsemotions plugin for tinymce
*
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @copyright (c) 2000-2014 XOOPS Project (www.xoops.org)
* @license http://www.fsf.org/copyleft/gpl.html GNU public license
* @package class / xoopseditor
* @subpackage tinymce / xoops plugins
@@ -14,7 +14,7 @@
*/
// load mainfile.php
-$current_path = dirname(__FILE__);
+$current_path = __DIR__;
if (DIRECTORY_SEPARATOR != "/") {
$current_path = str_replace( DIRECTORY_SEPARATOR, "/", $current_path);
}
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsmlcontent/xoopsmlcontent.php
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsmlcontent/xoopsmlcontent.php 2014-08-27 03:28:51 UTC (rev 12744)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsmlcontent/xoopsmlcontent.php 2014-08-27 03:30:37 UTC (rev 12745)
@@ -2,7 +2,7 @@
/**
* Xoopsmlcontent plugin for tinymce
*
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @copyright (c) 2000-2014 XOOPS Project (www.xoops.org)
* @license http://www.fsf.org/copyleft/gpl.html GNU public license
* @package class / xoopseditor
* @subpackage tinymce / xoops plugins
@@ -14,7 +14,7 @@
*/
// load mainfile.php - start
-$current_path = dirname(__FILE__);
+$current_path = __DIR__;
if (DIRECTORY_SEPARATOR != "/") {
$current_path = str_replace( DIRECTORY_SEPARATOR, "/", $current_path);
}
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsquote/editor_plugin.js
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsquote/editor_plugin.js 2014-08-27 03:28:51 UTC (rev 12744)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsquote/editor_plugin.js 2014-08-27 03:30:37 UTC (rev 12745)
@@ -2,7 +2,7 @@
* $Id$
*
* @author Moxiecode
- * @copyright Copyright \xA9 2004-2008, Moxiecode Systems AB, All rights reserved.
+ * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
*/
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce.php
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce.php 2014-08-27 03:28:51 UTC (rev 12744)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce/tinymce.php 2014-08-27 03:30:37 UTC (rev 12745)
@@ -12,7 +12,7 @@
/**
* TinyMCE adapter for XOOPS
*
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @copyright (c) 2000-2014 XOOPS Project (www.xoops.org)
* @license http://www.fsf.org/copyleft/gpl.html GNU public license
* @package class
* @subpackage editor
@@ -31,23 +31,33 @@
static $LastOfElementsTinymce="";
static $ListOfElementsTinymce=array();
-
// PHP 5 Constructor
+ /**
+ * @param $config
+ */
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;
+ self::$ListOfElementsTinymce[]= self::$LastOfElementsTinymce;
}
// PHP 4 Contructor
+ /**
+ * @param $config
+ */
function TinyMCE($config)
{
$this->__construct($config) ;
}
+ /**
+ * @param $config
+ *
+ * @return TinyMCE
+ */
function &instance( $config )
{
static $instance;
@@ -56,9 +66,13 @@
} else {
$instance->setConfig($config);
}
+
return $instance;
}
+ /**
+ * @param $config
+ */
function setConfig( $config )
{
foreach ($config as $key => $val) {
@@ -66,6 +80,9 @@
}
}
+ /**
+ * @return bool
+ */
function init()
{
// list of configured options
@@ -73,11 +90,11 @@
// Load default settings
if ( ! ($this->setting = @include( $GLOBALS['xoops']->path( "var/configs/tinymce.php" ) ) ) ) {
- $this->setting = include dirname(__FILE__) . "/settings.php";
+ $this->setting = include __DIR__ . "/settings.php";
}
// get editor language (from ...)
- if (is_readable(XOOPS_ROOT_PATH . $this->rootpath . '/langs/' . $this->config["language"] . '.js')) {
+ if (isset($this->config["language"]) && is_readable(XOOPS_ROOT_PATH . $this->rootpath . '/langs/' . $this->config["language"] . '.js')) {
$this->setting["language"] = $this->config["language"];
$configured[] = "language";
}
@@ -99,7 +116,7 @@
$this->setting["plugins"] = implode(",", $this->loadPlugins());
$configured[] = "plugins";
- if ( $this->setting["theme"] != "simple" ) {
+ if ($this->setting["theme"] != "simple") {
if (empty($this->config["buttons"])) {
$this->config["buttons"][] = array(
"before" => "",
@@ -168,11 +185,11 @@
$configured[] = "fonts";
}
- for ($i=1 ; $i <= 4 ; $i++ ) {
+ for ($i=1 ; $i <= 4 ; $i++) {
$buttons = array();
if ( isset($this->setting["theme_" . $this->setting["theme"] . "_buttons{$i}"]) ) {
$checklist = explode(",", $this->setting["theme_" . $this->setting["theme"] . "_buttons{$i}"] );
- foreach ( $checklist as $plugin ) {
+ foreach ($checklist as $plugin) {
if ( strpos( strtolower($plugin), "xoops") != false ) {
if ( in_array( $plugin, $this->xoopsPlugins ) ) {
$buttons[] = $plugin;
@@ -204,6 +221,9 @@
}
// load all plugins execpt the plugins in setting["exclude_plugins"]
+ /**
+ * @return array
+ */
function loadPlugins()
{
$plugins = array();
@@ -219,23 +239,34 @@
if (!empty($this->config["plugins"])) {
$plugins = array_merge($plugins, $this->config["plugins"]);
}
+
return $plugins;
}
// return all xoops plugins
- function get_xoopsPlugins() {
+ /**
+ * @return array
+ */
+ function get_xoopsPlugins()
+ {
$xoopsPlugins = array();
$allplugins = XoopsLists::getDirListAsArray( XOOPS_ROOT_PATH . $this->rootpath . "/plugins" );
- foreach ( $allplugins as $plugin ) {
+ foreach ($allplugins as $plugin) {
if ( strpos( strtolower($plugin), "xoops") != false && file_exists(XOOPS_ROOT_PATH . $this->config["rootpath"] . "/include/$plugin.php") ) {
- if ( $right = @include XOOPS_ROOT_PATH . $this->config["rootpath"] . "/include/$plugin.php" ) {
+ if ($right = @include XOOPS_ROOT_PATH . $this->config["rootpath"] . "/include/$plugin.php") {
$xoopsPlugins[$plugin] = $plugin;
}
}
}
+
return $xoopsPlugins;
}
+ /**
+ * @param string $css_file
+ *
+ * @return array
+ */
function loadCss($css_file = 'style.css')
{
static $css_url, $css_path;
@@ -251,35 +282,39 @@
// get all import css files
if ( preg_match_all("~\@import url\((.*\.css)\);~sUi", $css_content, $matches, PREG_PATTERN_ORDER) ) {
- foreach( $matches[1] as $key => $css_import ) {
+ foreach ($matches[1] as $key => $css_import) {
$css = array_merge( $css, $this->loadCss( $css_import) );
}
}
+
return $css;
}
+ /**
+ * @return string
+ */
function render()
{
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 (isset($this->setting["elements"]) && 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";
+ $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"]);
@@ -298,24 +333,24 @@
// http://www.sixteensmallstones.org/ie-javascript-bugs-overriding-internet-explorers-documentgetelementbyid-to-be-w3c-compliant-exposes-an-additional-bug-in-getattributes
$ret =<<<EOF
<script language='javascript' type='text/javascript'>
- if (/msie/i.test (navigator.userAgent)) //only override IE
- {
+ if (/msie/i.test (navigator.userAgent)) { //only override IE
document.nativeGetElementById = document.getElementById;
document.getElementById = function(id) {
var elem = document.nativeGetElementById(id);
- if(elem) {
+ if (elem) {
//make sure that it is a valid match on id
- if(elem.attributes['id'].value == id) {
+ if (elem.attributes['id'].value == id) {
return elem;
} else {
//otherwise find the correct element
- for(var i=1;i<document.all[id].length;i++) {
- if(document.all[id][i].attributes['id'].value == id) {
+ for (var i=1;i<document.all[id].length;i++) {
+ if (document.all[id][i].attributes['id'].value == id) {
return document.all[id][i];
}
}
}
}
+
return null;
};
}
@@ -329,10 +364,10 @@
if ($isTinyMceJsLoaded) {
$ret .= "<!-- 'tiny_mce.js' SCRIPT IS ALREADY LOADED -->\n"; //debug
} else {
- $ret .= "<script language='javascript' type='text/javascript' src='" . XOOPS_URL . $this->rootpath . "/tiny_mce.js'></script>\n";
+ $ret .= "<script type='text/javascript' src='" . XOOPS_URL . $this->rootpath . "/tiny_mce.js'></script>\n";
$isTinyMceJsLoaded = true;
}
- $ret .= "<script language='javascript' type='text/javascript'>\n";
+ $ret .= "<script type='text/javascript'>\n";
$ret .= "tinyMCE.init({\n";
// set options - start
foreach ($this->setting as $key => $val) {
@@ -350,7 +385,7 @@
$ret .= "tinymceload: true\n";
$ret .= "});\n";
$ret .= $callback . "\n";
- $ret .= $file_browser_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
@@ -358,4 +393,3 @@
return $ret ;
}
}
-?>
\ No newline at end of file
|