1: <?php
2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12:
13:
14: defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
15:
16: cInclude('includes', 'functions.lang.php');
17:
18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44:
45: class cTinyMCEEditor extends cWYSIWYGEditor {
46:
47: 48: 49: 50: 51:
52: protected $_baseURL = '';
53:
54: 55: 56: 57: 58:
59: protected $_useGZIP = false;
60:
61:
62: 63: 64: 65: 66: 67:
68: public function __construct($editorName, $editorContent) {
69:
70: $belang = cRegistry::getBackendLanguage();
71: $cfgClient = cRegistry::getClientConfig();
72: $client = cRegistry::getClientId();
73: $lang = cRegistry::getLanguageId();
74: $idart = cRegistry::getArticleId();
75:
76: parent::__construct($editorName, $editorContent);
77:
78: $this->_setEditor("tinymce3");
79:
80:
81: $this->_aSettings = getEffectiveSettingsByType("tinymce");
82:
83:
84: $this->_aSettings["langid"] = cRegistry::getLanguageId();
85: $this->_aSettings["clientid"] = cRegistry::getClientId();
86:
87:
88: $this->_aSettings = array_merge(getEffectiveSettingsByType("wysiwyg"), $this->_aSettings);
89:
90:
91: $this->setSetting(null, "article_url_suffix", 'front_content.php?idart=' . $idart, true);
92:
93:
94: $this->setSetting(null, "mode", "exact");
95: $aPathFragments = explode('/', $cfgClient[$client]["path"]["htmlpath"]);
96: $this->setSetting(null, "content_css", $cfgClient[$client]["path"]["htmlpath"] . "css/style_tiny.css");
97:
98: $this->setSetting(null, "theme", "advanced");
99: $this->setSetting(null, "theme_advanced_toolbar_location", "top");
100: $this->setSetting(null, "theme_advanced_path_location", "bottom");
101: $this->setSetting(null, "remove_script_host", false);
102: $this->setSetting(null, "file_browser_callback", "Con.Tiny.customFileBrowserCallback", true);
103:
104:
105: $this->setSetting(null, "theme_advanced_resizing", true);
106: $this->setSetting(null, "pagebreak_separator", "<!-- my page break -->");
107:
108: $this->setSetting(null, "apply_source_formatting", true);
109: $this->setSetting(null, "remove_linebreaks", false);
110:
111:
112: $this->setSetting(null, "convert_urls", false);
113: $this->setSetting(null, "relative_urls", false);
114:
115:
116: $this->setSetting(null, "elements", $editorName);
117:
118:
119: $langs = i18nGetAvailableLanguages();
120: $this->setSetting(null, "language", $langs[$belang][4]);
121: unset($langs);
122:
123:
124: $this->setSetting(null, 'document_base_url', cRegistry::getFrontendUrl(), true);
125:
126:
127:
128:
129: $this->setBaseURL($this->_getEditorPath());
130:
131:
132: if (getEffectiveSetting("generator", "xhtml", false) == "true") {
133: $this->setXHTMLMode(true);
134: } else {
135: $this->setXHTMLMode(false);
136: }
137:
138:
139: if ($this->_aSettings["contenido_gzip"] == "true") {
140: $this->setGZIPMode(true);
141: } else {
142: $this->setGZIPMode(false);
143: }
144:
145:
146: if (!array_key_exists("content_css", $this->_aSettings) && array_key_exists("tinymce-stylesheet-file", $this->_aSettings)) {
147: $this->setSetting(null, "content_css", $this->_aSettings["tinymce-stylesheet-file"], true);
148: }
149:
150:
151: $this->setLists();
152:
153:
154: $this->setUserDefinedStyles();
155:
156:
157: $this->setSetting(null, "width", "100%");
158: $this->setSetting(null, "height", "480px");
159:
160:
161: $sDirection = langGetTextDirection($lang);
162: $this->setSetting(null, "directionality", $sDirection);
163:
164: if ($sDirection == "rtl") {
165: $this->setSetting(null, "theme_advanced_toolbar_align", "right", true);
166: } else {
167: $this->setSetting(null, "theme_advanced_toolbar_align", "left", true);
168: }
169:
170:
171: $this->setSetting(null, "plugin_insertdate_dateFormat", $this->convertFormat(getEffectiveSetting("dateformat", "date", "Y-m-d")));
172: $this->setSetting(null, "plugin_insertdate_timeFormat", $this->convertFormat(getEffectiveSetting("dateformat", "time", "H:i:s")));
173:
174:
175: $mode = "full";
176: if (array_key_exists("tinymce-toolbar-mode", $this->_aSettings)) {
177: $mode = $this->_aSettings["tinymce-toolbar-mode"];
178: }
179: if (array_key_exists("contenido_toolbar_mode", $this->_aSettings)) {
180: $mode = $this->_aSettings["contenido_toolbar_mode"];
181: }
182: $this->setToolbar(trim(cString::toLowerCase($mode)));
183:
184: $autoFullElements = $this->_aSettings['auto_full_elements'];
185: unset($this->_aSettings['auto_full_elements']);
186:
187:
188: if (!array_key_exists("valid_elements", $this->_aSettings) && array_key_exists("tinymce-valid-elements", $this->_aSettings)) {
189: $this->setSetting(null, "valid_elements", $this->_aSettings["tinymce-valid-elements"], true);
190: }
191:
192:
193: if ($autoFullElements === 'true') {
194: $this->setSetting(null, 'valid_elements', '*[*]');
195: $this->setSetting(null, 'extended_valid_elements', '*[*]');
196: }
197:
198: $this->setSetting(null, "valid_elements", "a[name|href|target|title],strong/b[class],em/i[class],strike[class],u[class],p[dir|class|align],ol,ul,li,br,img[class|src|alt|title|hspace|vspace|width|height|align],sub,sup,blockquote[dir|style],table[border=0|cellspacing|cellpadding|width|height|class|align|style],tr[class|rowspan|width|height|align|valign|style],td[dir|class|colspan|rowspan|width|height|align|valign|style],div[dir|class|align],span[class|align],pre[class|align],address[class|align],h1[dir|class|align],h2[dir|class|align],h3[dir|class|align],h4[dir|class|align],h5[dir|class|align],h6[dir|class|align],hr");
199:
200:
201: if (!array_key_exists("extended_valid_elements", $this->_aSettings) && array_key_exists("tinymce-extended-valid-elements", $this->_aSettings)) {
202: $this->setSetting(null, "extended_valid_elements", $this->_aSettings["tinymce-extended-valid-elements"]);
203: }
204:
205:
206:
207:
208: $this->setSetting(null, "extended_valid_elements", "form[name|action|method],textarea[name|style|cols|rows],input[type|name|value|style|onclick],a[name|href|target|title|onclick],img[class|src|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]");
209:
210:
211: $this->cleanURLs();
212:
213:
214: unset($this->_aSettings["contenido_toolbar_mode"], $this->_aSettings["contenido_lists"]);
215:
216: unset($this->_aSettings["tinymce-stylesheet-file"], $this->_aSettings["tinymce-valid-elements"], $this->_aSettings["tinymce-extended-valid-elements"], $this->_aSettings["tinymce-lists"], $this->_aSettings["tinymce-styles"], $this->_aSettings["tinymce-toolbar-mode"], $this->_aSettings["tinymce-toolbar1"], $this->_aSettings["tinymce-toolbar2"], $this->_aSettings["tinymce-toolbar3"], $this->_aSettings["tinymce-plugins"]);
217: }
218:
219: 220: 221: 222: 223: 224: 225: 226: 227:
228: public function cTinyMCEEditor($editorName, $editorContent) {
229: cDeprecated('This method is deprecated and is not needed any longer. Please use __construct() as constructor function.');
230: return $this->__construct($editorName, $editorContent);
231: }
232:
233: 234: 235: 236: 237: 238:
239: public function convertFormat($input) {
240: $aFormatCodes = array(
241: "y" => "%y", "Y" => "%Y", "d" => "%d", "m" => "%m", "H" => "%H", "h" => "%I", "i" => "%M", "s" => "%S", "a" => "%P", "A" => "%P"
242: );
243:
244: foreach ($aFormatCodes as $sFormatCode => $sReplacement) {
245: $input = str_replace($sFormatCode, $sReplacement, $input);
246: }
247:
248: return $input;
249: }
250:
251: 252: 253: 254:
255: public function setUserDefinedStyles() {
256: $styles = "";
257:
258: if (array_key_exists("theme_advanced_styles", $this->_aSettings)) {
259: $styles = $this->_aSettings["theme_advanced_styles"];
260: } else if (array_key_exists("tinymce-styles", $this->_aSettings)) {
261: $styles = $this->_aSettings["tinymce-styles"];
262: }
263:
264: if ($styles) {
265: $this->setSetting(null, "theme_advanced_styles", preg_replace('/;$/i', '', str_replace("|", "=", trim($styles))), true);
266: }
267: }
268:
269: 270: 271: 272: 273: 274: 275:
276: public function setLists($lists = "") {
277:
278: $lang = cRegistry::getLanguageId();
279: $client = cRegistry::getClientId();
280:
281: if ($lists == "") {
282: if (array_key_exists("contenido_lists", $this->_aSettings)) {
283: $lists = $this->_aSettings["contenido_lists"];
284: } else if (array_key_exists("tinymce-lists", $this->_aSettings)) {
285: $lists = $this->_aSettings["tinymce-lists"];
286: }
287: }
288:
289: $aLists = array();
290: $aLists = explode(",", cString::toLowerCase(str_replace(" ", "", $lists)));
291:
292: if (in_array("link", $aLists)) {
293: $this->setSetting(null, "external_link_list_url", $this->_baseURL . "list.php?mode=link&lang=" . $lang . "&client=" . $client . "#", true);
294: }
295: if (in_array("image", $aLists)) {
296: $this->setSetting(null, "external_image_list_url", $this->_baseURL . "list.php?mode=image&lang=" . $lang . "&client=" . $client . "#", true);
297: }
298: if (in_array("media", $aLists)) {
299: $this->setSetting(null, "media_external_list_url", $this->_baseURL . "list.php?mode=media&lang=" . $lang . "&client=" . $client . "#", true);
300: }
301: }
302:
303: 304: 305: 306: 307: 308:
309: public function setXHTMLMode($beabled = true) {
310: if ($beabled) {
311: $this->setSetting(null, "cleanup_callback", "", true);
312: } else {
313: $this->setSetting(null, "cleanup_callback", "Con.Tiny.customCleanupCallback", true);
314: }
315: }
316:
317: 318: 319: 320: 321: 322:
323: public function setGZIPMode($enabled = true) {
324: if ($enabled) {
325: $this->_useGZIP = true;
326: } else {
327: $this->_useGZIP = false;
328: }
329: }
330:
331: 332: 333: 334: 335:
336: public function getGZIPMode() {
337: return cSecurity::toBoolean($this->_useGZIP);
338: }
339:
340: 341: 342: 343: 344:
345: public function setToolbar($mode = "") {
346:
347: $cfgClient = cRegistry::getClientConfig();
348: $client = cRegistry::getClientId();
349:
350: switch ($mode) {
351: case "full":
352: $this->setSetting(null, "theme_advanced_buttons1", "cut,copy,paste,pastetext,pasteword,|,search,replace,|,undo,redo,|,bold,italic,underline,strikethrough,sub,sup,|,insertdate,inserttime,preview,|,styleselect,|,visualchars,nonbreaking,template,pagebreak,|,help,|,fullscreen", true);
353: $this->setSetting(null, "theme_advanced_buttons2", "link,unlink,anchor,image,media,advhr,|,bullist,numlist,|,outdent,indent,blockquote,|,justifyleft,justifycenter,justifyright,justifyfull,removeformat,|,forecolor,backcolor,|,ltr,rtl,|,visualaid,charmap,cleanup,|,code", true);
354: $this->setSetting(null, "theme_advanced_buttons3", "tablecontrols,|,formatselect,fontselect,fontsizeselect,|,styleprops,|,cite,abbr,acronym,del,ins,attribs", true);
355:
356: $this->setSetting(null, "plugins", "table,save,advhr,advimage,advlink,pagebreak,style,layer,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups", true);
357: $this->setSetting(null, "theme_advanced_toolbar_align", "left", true);
358:
359: $aCustSettings = getEffectiveSettingsByType("tinymce");
360: foreach ($aCustSettings as $key=> $value) {
361: $this->setSetting(null, $key, $value, true);
362: }
363:
364: break;
365: case "fullscreen":
366: $this->setSetting(null, "theme_advanced_buttons1", "cut,copy,paste,pastetext,pasteword,|,search,replace,|,undo,redo,|,bold,italic,underline,strikethrough,sub,sup,|,insertdate,inserttime,preview,|,styleselect,|,visualchars,nonbreaking,template,pagebreak,|,help,|,fullscreen", true);
367: $this->setSetting(null, "theme_advanced_buttons2", "link,unlink,anchor,image,media,advhr,|,bullist,numlist,|,outdent,indent,blockquote,|,justifyleft,justifycenter,justifyright,justifyfull,removeformat,|,forecolor,backcolor,|,ltr,rtl,|,visualaid,charmap,cleanup,|,code", true);
368: $this->setSetting(null, "theme_advanced_buttons3", "tablecontrols,|,formatselect,fontselect,fontsizeselect,|,styleprops,|,cite,abbr,acronym,del,ins,attribs", true);
369:
370: $this->setSetting(null, "plugins", "table,save,advhr,advimage,advlink,pagebreak,style,layer,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups", true);
371: $this->setSetting(null, "theme_advanced_toolbar_align", "left", true);
372:
373: $aCustSettings = getEffectiveSettingsByType("tinymce_fullscreen");
374: foreach ($aCustSettings as $key => $value) {
375: $this->setSetting(null, $key, $value, true);
376: }
377:
378: break;
379: case "simple":
380: $this->setSetting(null, "theme_advanced_buttons1", "cut,copy,paste,pastetext,pasteword,|,search,replace,|,undo,redo,|,bold,italic,underline,strikethrough,sub,sup,|,insertdate,inserttime,preview,|,styleselect", true);
381: $this->setSetting(null, "theme_advanced_buttons2", "link,unlink,anchor,image,advhr,|,bullist,numlist,|,outdent,indent,|,justifyleft,justifycenter,justifyright,justifyfull,removeformat,|,forecolor,backcolor,|,ltr,rtl,|,visualaid,charmap,cleanup,|,code", true);
382: $this->setSetting(null, "theme_advanced_buttons3", "", true);
383: $this->setSetting(null, "plugins", "advhr,advimage,advlink,insertdatetime,preview,searchreplace,print,contextmenu,paste,directionality", true);
384:
385: $aCustSettings = getEffectiveSettingsByType("tinymce_simple");
386: foreach ($aCustSettings as $key => $value) {
387: $this->setSetting(null, $key, $value, true);
388: }
389:
390: break;
391: case "mini":
392: $this->setSetting(null, "theme_advanced_buttons1", "undo,redo,|,bold,italic,underline,strikethrough,|,link", true);
393: $this->setSetting(null, "theme_advanced_buttons2", "", true);
394: $this->setSetting(null, "theme_advanced_buttons3", "", true);
395:
396: $aCustSettings = getEffectiveSettingsByType("tinymce_mini");
397: foreach ($aCustSettings as $key => $value) {
398: $this->setSetting(null, $key, $value, true);
399: }
400:
401: break;
402: case "custom":
403:
404:
405:
406: $this->setSetting(null, "theme_advanced_buttons1", $this->_aSettings["tinymce-toolbar1"]);
407: $this->setSetting(null, "theme_advanced_buttons2", $this->_aSettings["tinymce-toolbar2"]);
408: $this->setSetting(null, "theme_advanced_buttons3", $this->_aSettings["tinymce-toolbar3"]);
409: $this->setSetting(null, "plugins", $this->_aSettings["tinymce-plugins"]);
410: $this->setSetting(null, "theme_advanced_toolbar_location", "bottom");
411:
412: $aCustSettings = getEffectiveSettingsByType("tinymce_custom");
413: foreach ($aCustSettings as $key => $value) {
414: $this->setSetting(null, $key, $value, true);
415: }
416:
417: break;
418: case "inline_edit":
419: $this->setSetting(null, "theme_advanced_buttons1", "bold,italic,underline,strikethrough,separator,undo,separator,bullist,numlist,separator,forecolor,backcolor,separator,justifyleft,justifycenter,justifyright,separator,fullscreen,separator,save,close", true);
420: $this->setSetting(null, "theme_advanced_buttons2", "", true);
421: $this->setSetting(null, "theme_advanced_buttons3", "", true);
422:
423: $this->setSetting(null, "setupcontent_callback", "Con.Tiny.customSetupContentCallback", true);
424:
425: $this->_unsetSetting("width");
426: $this->_unsetSetting("theme_advanced_toolbar_location");
427: $this->setSetting(null, "theme_advanced_toolbar_location", "external");
428: $this->setSetting(null, "height", "210px", true);
429:
430: $this->setSetting(null, "plugins", "table,inlinepopups,fullscreen,close", true);
431: $this->setSetting(null, "mode", "exact", true);
432: $this->setSetting(null, "elements", "*", true);
433: $this->setSetting(null, "content_css", $cfgClient[$client]["path"]["htmlpath"] . "css/style_tiny.css", true);
434:
435: if (!array_key_exists("auto_resize", $this->_aSettings)) {
436: $this->setSetting(null, "auto_resize", "false", true);
437: }
438:
439: if (!array_key_exists("theme_advanced_toolbar_location", $this->_aSettings)) {
440: $this->setSetting(null, "theme_advanced_toolbar_location", "top", true);
441: }
442:
443: if (!array_key_exists("theme_advanced_resizing_use_cookie", $this->_aSettings)) {
444: $this->setSetting(null, "theme_advanced_resizing_use_cookie", "false", true);
445: }
446:
447: if (!array_key_exists("theme_advanced_toolbar_align", $this->_aSettings)) {
448: $this->setSetting(null, "theme_advanced_toolbar_align", "center", true);
449: }
450:
451: $aCustSettings = getEffectiveSettingsByType("tinymce_inline");
452: foreach ($aCustSettings as $key => $value) {
453: $this->setSetting(null, $key, $value, true);
454: }
455:
456: break;
457: default:
458: $this->setSetting(null, "theme_advanced_buttons1", "undo,redo,|,bold,italic,underline,strikethrough,|,link,unlink,anchor,image,advhr,|,tablecontrols", true);
459: $this->setSetting(null, "theme_advanced_buttons2", "styleselect,|,bullist,numlist,|,outdent,indent,|,justifyleft,justifycenter,justifyright,justifyfull,removeformat,|,forecolor,backcolor,|,sub,sup,|,code", true);
460: $this->setSetting(null, "theme_advanced_buttons3", "", true);
461: $this->setSetting(null, "plugins", "table,advhr,advimage,advlink,searchreplace,contextmenu,paste", true);
462:
463: $aCustSettings = getEffectiveSettingsByType("tinymce_default");
464: foreach ($aCustSettings as $key => $value) {
465: $this->setSetting(null, $key, $value, true);
466: }
467: }
468: }
469:
470: 471: 472: 473:
474: public function cleanURLs() {
475:
476: $sess = cRegistry::getBackendSessionId();
477:
478:
479: $aParameters = array(
480:
481: 'content_css', 'popups_css', 'popups_css_add', 'editor_css',
482: 'plugin_preview_pageurl',
483: 'media_external_list_url',
484: 'template_external_list_url'
485: );
486:
487: foreach ($aParameters as $sParameter) {
488: if (array_key_exists($sParameter, $this->_aSettings)) {
489: $this->setSetting(null, $sParameter, $this->addPath($this->_aSettings[$sParameter]), true);
490: }
491: }
492:
493:
494: $aParameters = array(
495: 'media_external_list_url',
496: 'template_external_list_url'
497: );
498:
499: foreach ($aParameters as $sParameter) {
500: if (array_key_exists($sParameter, $this->_aSettings) && preg_match('/\\.php$/i', $this->_aSettings[$sParameter])) {
501: $this->setSetting(null, $sParameter, $this->_aSettings[$sParameter] . '?contenido=' . $sess->id, true);
502: }
503: }
504: }
505:
506: 507: 508: 509: 510: 511:
512: public function addPath($file) {
513:
514: $cfgClient = cRegistry::getClientConfig();
515: $client = cRegistry::getClientId();
516:
517:
518: if (!preg_match('/^(http|https):\/\/((?:[a-zA-Z0-9_-]+\.?)+):?(\d*)/', $file)) {
519: if (preg_match('/^\//', $file)) {
520: $file = "http://" . $_SERVER['HTTP_HOST'] . $file;
521: } else {
522: $file = $cfgClient[$client]['htmlpath']['frontend'] . $file;
523: }
524: }
525:
526: return $file;
527: }
528:
529: 530: 531: 532: 533:
534: public function setBaseURL($baseUrl) {
535: $this->_baseURL = $baseUrl;
536: }
537:
538: 539: 540: 541: 542:
543: public function getScripts() {
544: return "\n<!-- tinyMCE -->\n" . '<script language="javascript" type="text/javascript" src="' . $this->_baseURL . 'jscripts/tiny_mce/tiny_mce.js"></script>';
545: }
546:
547: 548: 549: 550: 551:
552: public function getEditor() {
553:
554: $sess = cRegistry::getSession();
555: $cfg = cRegistry::getConfig();
556: $client = cRegistry::getClientId();
557: $cfgClient = cRegistry::getClientConfig();
558:
559:
560: $sess->register("browserparameters");
561:
562:
563: $this->setSetting(null, "setupcontent_callback", 'Con.Tiny.customSetupContentCallback', true);
564: $this->setSetting(null, "save_callback", 'Con.Tiny.customSaveCallback', true);
565:
566:
567:
568: $template = new cTemplate();
569: $template->set('s', 'IMAGEBROWSER', $cfg['path']['contenido_fullhtml'] . 'frameset.php?area=upl&contenido=' . $sess->id . '&appendparameters=imagebrowser');
570: $template->set('s', 'FILEBROWSER', $cfg['path']['contenido_fullhtml'] . 'frameset.php?area=upl&contenido=' . $sess->id . '&appendparameters=filebrowser');
571: $template->set('s', 'MEDIABROWSER', $cfg['path']['contenido_fullhtml'] . 'frameset.php?area=upl&contenido=' . $sess->id . '&appendparameters=imagebrowser');
572: $template->set('s', 'FRONTEND_PATH', $cfgClient[$client]['path']['htmlpath']);
573:
574:
575: $config = '';
576:
577: foreach ($this->_aSettings as $key => $value) {
578: if (is_bool($value)) {
579: if ($value === true) {
580: $value = "true";
581: } else {
582: $value = "false";
583: }
584: }
585:
586: if ($value == "true" || $value == "false" || $key == "oninit" || $key == "onpageload" || $key == 'style_formats') {
587: $config .= "'$key': " . $value;
588: } else {
589: $config .= "'$key': '" . $value . "'";
590: }
591: $config .= ",\n\t";
592: }
593:
594: $config = cString::getPartOfString($config, 0, -3);
595: $template->set('s', 'CONFIG', $config);
596:
597: $oTxtEditor = new cHTMLTextarea($this->_sEditorName, $this->_sEditorContent);
598: $oTxtEditor->setId($this->_sEditorName);
599:
600: $oTxtEditor->setStyle("width: " . $this->_aSettings["width"] . "; height: " . $this->_aSettings["height"] . ";");
601:
602: $return = $template->generate($cfg['path']['all_wysiwyg'] . $this->_sEditor . "/tinymce.tpl.html", true);
603: $return .= $oTxtEditor->render();
604:
605: return $return;
606: }
607:
608: 609: 610: 611: 612:
613: public function getConfigInlineEdit() {
614: $config = '';
615: $this->setToolbar('inline_edit');
616:
617: foreach ($this->_aSettings as $key => $value) {
618: if (is_bool($value)) {
619: if ($value === true) {
620: $value = "true";
621: } else {
622: $value = "false";
623: }
624: }
625:
626: if ($value == "true" || $value == "false" || $key == "oninit" || $key == "onpageload" || $key == 'style_formats') {
627: $config .= "'$key': " . $value;
628: } else {
629: $config .= "'$key': '" . $value . "'";
630: }
631: $config .= ",\n\t";
632: }
633:
634: $config = cString::getPartOfString($config, 0, -3);
635:
636: return $config;
637: }
638:
639: 640: 641: 642: 643:
644: public function getConfigFullscreen() {
645: $config = '';
646: $this->setToolbar('fullscreen');
647:
648: $config .= "'theme_advanced_buttons1': '" . $this->_aSettings['theme_advanced_buttons1'] . "',\n";
649: $config .= "'theme_advanced_buttons2': '" . $this->_aSettings['theme_advanced_buttons2'] . "',\n";
650: $config .= "'theme_advanced_buttons3': '" . $this->_aSettings['theme_advanced_buttons3'] . "',\n";
651: $config .= "'theme_advanced_toolbar_align': '" . $this->_aSettings['theme_advanced_toolbar_align'] . "',\n";
652: $config .= "'plugins': '" . $this->_aSettings['plugins'] . "'\n";
653:
654: return $config;
655: }
656:
657: 658: 659: 660: 661:
662: public function getPlugins() {
663: return $this->_aSettings['plugins'];
664: }
665:
666: 667: 668: 669: 670:
671: public function getThemes() {
672: return $this->_aSettings['theme'];
673: }
674:
675: }
676: