So!
Nach einer kurzen Mittagspause ist mal das untere rausgekommen.
Die Konfi.-Files liegen im
cms/includes/
Die Files sind nicht für den Inside-Editor.
Angepasst werden muss die Datei
editorclass.php im Verzeichnis
contenido/classes/
Code: Alles auswählen
function cTinyMCEEditor ($sEditorName, $sEditorContent)
{
global $belang, $cfg, $cfgClient, $client, $lang, $type, $typenr;
cWYSIWYGEditor::cWYSIWYGEditor($sEditorName, $sEditorContent);
$this->_setEditor("tinymce3");
if(!is_array($this->_aSettings))
{
$this->_aSettings = array();
}
// Retrieve all settings from File for Type & ID
if( $sEditorName == 'CMS_HTML' && $type && $typenr )
{
$sSetFile = $cfgClient[$client]["path"]["frontend"].'includes/'.'tinymce_set_'.strtolower($type).'_'.$typenr.'.php';
if( file_exists( $sSetFile ) )
{
$sSetFileContent = file_get_contents( $sSetFile )."\n"; // Get file content
$sSetFileContent = str_replace( array("\r\n", "\r"), array("\n","\n"), $sSetFileContent ); // Win & Mac<=9: del. carriage return
$sSetFileContent = preg_replace( "|(.*)//(.*)\n|Uis", "$1\n", $sSetFileContent); // del. comments
preg_match_all( "|([^:\n]*)\s*+:\s*+([^\n]*)\n|Uis" , $sSetFileContent , $result , PREG_PATTERN_ORDER ); // Find configs "name : value" + \n
$this->_aSettings = array_merge( array_combine( $result[1], $result[2] ), $this->_aSettings ); // merge Settings - priority by old settings
}
}
// Retrieve all settings from File for Type
if( $sEditorName == 'CMS_HTML' && $type )
{
$sSetFile = $cfgClient[$client]["path"]["frontend"].'includes/'.'tinymce_set_'.strtolower($type).'.php';
if( file_exists( $sSetFile ) )
{
$sSetFileContent = file_get_contents( $sSetFile )."\n";
$sSetFileContent = str_replace( array("\r\n", "\r"), array("\n","\n"), $sSetFileContent ); // Win & Mac<=9: del. carriage return
$sSetFileContent = preg_replace( "|(.*)//(.*)\n|Uis", "$1\n", $sSetFileContent);
preg_match_all( "|([^:\n]*)\s*+:\s*+([^\n]*)\n|Uis" , $sSetFileContent , $result , PREG_PATTERN_ORDER );
$this->_aSettings = array_merge( array_combine( $result[1], $result[2] ), $this->_aSettings );
}
}
# echo "<pre>".print_r($this->_aSettings,true)."</pre>";
// Retrieve all settings for tinymce
$this->_aSettings = array_merge( getEffectiveSettingsByType("tinymce"), $this->_aSettings );
// For compatibility, read settings in previous syntax also (< V4.7, type "wysiwyg" vs. "tinymce")
$this->_aSettings = array_merge( getEffectiveSettingsByType("wysiwyg"), $this->_aSettings );
// Default values
...
Eine Beispiel Datei für CMS_HTMLHEAD[1]:
Basisdatei für alle CMS_HTMLHEAD:
cms/includes/tinymce_set_cms_htmlhead.php
Code: Alles auswählen
<?php die('Illegal call'); ?>
contenido_toolbar_mode : custom
content_css : css/style_tiny.css
extended_valid_elements : *[*]
valid_elements : *[*]
plugins : table,insertdatetime,media,searchreplace,contextmenu,paste,directionality,fullscreen,template // hallo <- wird gelöscht
template_external_list_url : js/tpl_liste.js
theme_advanced_buttons1 : cut,copy,pastetext,separator,search,replace,separator,undo,redo,separator,removeformat,cleanup,code,separator,visualaid,charmap
Basisdatei für alle CMS_HTMLHEAD mit ID = 1:
cms/includes/tinymce_set_cms_htmlhead_1.php
Code: Alles auswählen
<?php die('Illegal call'); ?>
contenido_toolbar_mode : custom
content_css : css/style_tiny.css
extended_valid_elements : *[*]
valid_elements : *[*]
plugins : table,insertdatetime,media,searchreplace,contextmenu,paste,directionality,fullscreen,template // hallo
template_external_list_url : js/tpl_liste.js
theme_advanced_buttons2 : formatselect,styleselect,bold,italic,underline
theme_advanced_buttons3 : link,unlink,anchor,image,media,advhr,separator,template,separator,tablecontrols,forecolor