/** * get the gs editor custom toolbar * @since 3.4 * @return str valid js nested array ([[ ]]) or escaped toolbar id ('toolbar_id') */ function getEditorToolbar() { if (getDef('GSEDITORTOOL')) { $edtool = getDef('GSEDITORTOOL'); } if ($edtool == "none") { $edtool = null; } // toolbar to use cke default // if($edtool === null) $edtool = 'null'; // not supported in cke 3.x // at this point $edtool should always be a valid js nested array ([[ ]]) or escaped toolbar id ('toolbar_id') return returnJsArray($edtool); }
echo '• <a href="backup-edit.php?p=view&id=' . $url . '" target="_blank" >' . i18n_r('BACKUP_AVAILABLE') . '</a>'; } ?> </p> <?php } ?> </form> <?php if (isset($EDTOOL)) { $EDTOOL = returnJsArray($EDTOOL); } if (isset($toolbar)) { $toolbar = returnJsArray($toolbar); } else { if (strpos(trim($EDTOOL), '[[') !== 0 && strpos(trim($EDTOOL), '[') === 0) { $EDTOOL = "[{$EDTOOL}]"; } } if (isset($toolbar) && strpos(trim($toolbar), '[[') !== 0 && strpos($toolbar, '[') === 0) { $toolbar = "[{$toolbar}]"; } $toolbar = isset($EDTOOL) ? ",toolbar: " . trim($EDTOOL, ",") : ''; $options = isset($EDOPTIONS) ? ',' . trim($EDOPTIONS, ",") : ''; ?> <?php if ($HTMLEDITOR != '') { ?> <script type="text/javascript" src="template/js/ckeditor/ckeditor.js"></script>
} if (!empty($configjs)) { echo "customConfig : '{$configjs}',"; } ?> height : '<?php echo getGlobal('EDHEIGHT'); ?> ', baseHref : '<?php echo getGlobal('SITEURL'); ?> ' <?php if (getGlobal('EDTOOL')) { echo ",toolbar: " . returnJsArray(getGlobal('EDTOOL')); } if (getGlobal('EDOPTIONS')) { echo ',' . trim(getGlobal('EDOPTIONS')); } ?> }; // wipe the ckeditor shim, so it does not interfere with the real one if(typeof CKEDITOR !== 'undefined'){ if(CKEDITOR.SHIM == true) CKEDITOR = null; } <?php if (get_filename_id() == 'snippets') { echo "htmlEditorConfig.height = '130px';";
} if (defined('GSEDITORTOOL') and !isset($EDTOOL)) { $EDTOOL = GSEDITORTOOL; } if (defined('GSEDITOROPTIONS') and !isset($EDOPTIONS) && trim(GSEDITOROPTIONS) != "") { $EDOPTIONS = GSEDITOROPTIONS; } if (!isset($EDTOOL)) { $EDTOOL = 'basic'; } // default gs toolbar if ($EDTOOL == "none") { $EDTOOL = null; } // toolbar to use cke default $EDTOOL = returnJsArray($EDTOOL); // if($EDTOOL === null) $EDTOOL = 'null'; // not supported in cke 3.x // at this point $EDTOOL should always be a valid js nested array ([[ ]]) or escaped toolbar id ('toolbar_id') /** * Timezone setup */ // set defined timezone from config if not set on user if ((!isset($TIMEZONE) || trim($TIMEZONE) == '') && defined('GSTIMEZONE')) { $TIMEZONE = GSTIMEZONE; } if (isset($TIMEZONE) && function_exists('date_default_timezone_set') && ($TIMEZONE != "" || stripos($TIMEZONE, '--'))) { date_default_timezone_set($TIMEZONE); } /** * Variable Globalization */