From 94d76ee5057f96926d65ed903fc9eb5f696d2975 Mon Sep 17 00:00:00 2001 From: secretr Date: Tue, 7 Jun 2011 12:57:55 +0000 Subject: [PATCH] SVN keywords fix --- e107_plugins/tinymce/e_meta.php | 14 +-- e107_plugins/tinymce/wysiwyg.php | 202 +++++++++++++++---------------- 2 files changed, 106 insertions(+), 110 deletions(-) diff --git a/e107_plugins/tinymce/e_meta.php b/e107_plugins/tinymce/e_meta.php index c86adf32e..526941db1 100644 --- a/e107_plugins/tinymce/e_meta.php +++ b/e107_plugins/tinymce/e_meta.php @@ -8,10 +8,8 @@ * * * - * $Source: /cvs_backup/e107_0.8/e107_plugins/tinymce/e_meta.php,v $ - * $Revision$ - * $Date$ - * $Author$ + * $URL$ + * $Id$ */ if (!defined('e107_INIT')) { exit; } @@ -21,15 +19,15 @@ if(e_WYSIWYG || strpos(e_SELF,"tinymce/admin_config.php")) require_once(e_PLUGIN."tinymce/wysiwyg.php"); if(deftrue('TINYMCE_CONFIG')) { - $wy = new wysiwyg(TINYMCE_CONFIG); + $wy = new wysiwyg(TINYMCE_CONFIG); } else { - $wy = new wysiwyg(); + $wy = new wysiwyg(); } - + $wy -> render(); } - + ?> \ No newline at end of file diff --git a/e107_plugins/tinymce/wysiwyg.php b/e107_plugins/tinymce/wysiwyg.php index fa54a75eb..ab396a5d6 100644 --- a/e107_plugins/tinymce/wysiwyg.php +++ b/e107_plugins/tinymce/wysiwyg.php @@ -3,10 +3,8 @@ + ----------------------------------------------------------------------------+ | e107 website system - Tiny MCE controller file. | -| $Source: /cvs_backup/e107_0.8/e107_plugins/tinymce/wysiwyg.php,v $ -| $Revision$ -| $Date$ -| $Author$ +| $URL$ +| $Id$ +----------------------------------------------------------------------------+ */ @@ -16,28 +14,28 @@ class wysiwyg var $js; var $config = array(); var $configName; - - - function wysiwyg($config=FALSE) + + + function __construct($config=FALSE) { - + $this->getConfig($config); - - - global $pref; - - - - - + $pref = e107::getConfig(); + + + + + + + /* if(strstr(varset($_SERVER["HTTP_ACCEPT_ENCODING"],""), "gzip") && (ini_get("zlib.output_compression") == false) && file_exists(e_PLUGIN."tinymce/tiny_mce_gzip.php")) { - //unset($tinymce_plugins[7]); // 'zoom' causes an error with the gzip version. + //unset($tinymce_plugins[7]); // 'zoom' causes an error with the gzip version. $text = " - + \n"; + $text = "\n"; //} - - - + + + $text .= "\n "; - + $this->js = $text; - + } - + function tinymce_lang() { $lang = e_LANGUAGE; @@ -156,28 +154,28 @@ class wysiwyg "Spanish" => "es", "Swedish" => "sv" ); - + if(!$tinylang[$lang]) { $tinylang[$lang] = "en"; } - + return $tinylang[$lang]; } - - + + function tinyMce_config() { $text = " - + function start_tinyMce() { //config as $key=>$val) { if($val != 'true' && $val !='false') @@ -186,66 +184,66 @@ class wysiwyg } $newConfig[] = "\t\t ".$key." : ".$val; } - + // foreach($this->config as $key=>$val) - // { + // { // if($val != 'true' && $val !='false') // { // $val = "'".$val."'"; // } // $text .= "\t\t ".$key." : '".$val."',\n"; // } - + $text .= implode(",\n",$newConfig); - + /* if($tinyMcePrefs['customjs']) { $text .= "\n, - + // Start Custom TinyMce JS ----- - + ".$pref['tinymce']['customjs']." - + // End Custom TinyMce JS --- - + "; - + } */ $text .= " }); - + } -"; - +"; + return $text; } - - - + + + function getConfig($config=FALSE) { $sql = e107::getDb(); - + if($config) { - $query = "SELECT * FROM #tinymce WHERE tinymce_id = ".$config." LIMIT 1"; + $query = "SELECT * FROM #tinymce WHERE tinymce_id = ".$config." LIMIT 1"; } else { - $query = "SELECT * FROM #tinymce WHERE tinymce_userclass REGEXP '".e_CLASS_REGEXP."' AND NOT (tinymce_userclass REGEXP '(^|,)(".str_replace(",", "|", e_UC_NOBODY).")(,|$)') ORDER BY Field(tinymce_userclass,250,254,253) LIMIT 1"; + $query = "SELECT * FROM #tinymce WHERE tinymce_userclass REGEXP '".e_CLASS_REGEXP."' AND NOT (tinymce_userclass REGEXP '(^|,)(".str_replace(",", "|", e_UC_NOBODY).")(,|$)') ORDER BY Field(tinymce_userclass,250,254,253) LIMIT 1"; } - + $sql -> db_Select_gen($query); $config = $sql->db_Fetch(); - + //TODO Cache! - + $plug_array = explode(",",$config['tinymce_plugins']); $this->configName = $config['tinymce_name']; - + $this->config = array( 'language' => $this->tinymce_lang(), 'mode' => 'textareas', @@ -254,9 +252,9 @@ class wysiwyg 'theme' => 'advanced', 'plugins' => $this->filter_plugins($config['tinymce_plugins']) ); - + $this->config += array( - + 'theme_advanced_buttons1' => $config['tinymce_buttons1'], 'theme_advanced_buttons2' => $config['tinymce_buttons2'], 'theme_advanced_buttons3' => $config['tinymce_buttons3'], @@ -285,18 +283,18 @@ class wysiwyg 'verify_css_classes' => 'false' ); - + // if(!in_array('e107bbcode',$plug_array)) { - $this->config['cleanup_callback'] = 'tinymce_e107Paths'; + $this->config['cleanup_callback'] = 'tinymce_e107Paths'; } - + $paste_plugin = (strpos($config['tinymce_plugins'],'paste')!==FALSE) ? TRUE : FALSE; - + if($paste_plugin) { $this->config += array( - + 'remove_linebreaks' => 'false', // remove line break stripping by tinyMCE so that we can read the HTML 'paste_create_paragraphs' => 'false', // for paste plugin - double linefeeds are converted to paragraph elements 'paste_create_linebreaks' => 'false', // for paste plugin - single linefeeds are converted to hard line break elements @@ -306,49 +304,49 @@ class wysiwyg 'paste_unindented_list_class' => 'unindentedList', // for paste plugin - specify what class to assign to the UL list of middot cl's 'paste_convert_headers_to_strong' => 'true', // for paste plugin - converts H1-6 elements to strong elements on paste 'paste_insert_word_content_callback' => 'convertWord', // for paste plugin - This callback is executed when the user pastes word content - 'auto_cleanup_word' => 'false' // auto clean pastes from Word + 'auto_cleanup_word' => 'false' // auto clean pastes from Word ); } - - + + if(ADMIN) { - $this->config['external_link_list_url'] = e_PLUGIN_ABS."tiny_mce/filelist.php"; + $this->config['external_link_list_url'] = e_PLUGIN_ABS."tiny_mce/filelist.php"; } - - + + } - - + + function filter_plugins($plugs) { - + $smile_pref = e107::getConfig()->getPref('smiley_activate'); - + $admin_only = array("ibrowser","code"); - + $plug_array = explode(",",$plugs); - + foreach($plug_array as $val) { if(in_array($val,$admin_only) && !ADMIN) { continue; } - + if(!$smile_pref && ($val=="emoticons")) { continue; } - + $tinymce_plugins[] = $val; } - + return implode(",",$tinymce_plugins); } - - + + function render() { echo $this->js;