<?php defined('COT_CODE') or die('Wrong URL'); /* ==================== [BEGIN_COT_EXT] Hooks=editor [END_COT_EXT] ==================== */ global $lang; $epic_lang = $cfg['plugins_dir'] . "/epiceditor/js/lang/{$lang}.lang.js"; if (!file_exists($epic_lang)) { $epic_lang = $cfg['plugins_dir'] . '/epiceditor/js/lang/en.lang.js'; } cot_rc_link_footer($epic_lang); cot_rc_link_footer($cfg['plugins_dir'] . '/epiceditor/lib/js/epiceditor.min.js'); cot_rc_link_footer($cfg['plugins_dir'] . '/epiceditor/js/js.js');
} $parser = new Less_Parser($options); $parser->SetImportDirs(array($cfg['themes_dir'] . '/admin/' . $theme . '/less' => $cfg['themes_dir'] . '/admin/' . $theme . '/less', $cfg['plugins_dir'] . "/bootstrap/bootstrap/less" => $cfg['plugins_dir'] . "/bootstrap/bootstrap/less")); $parser->parseFile($input); $css = $parser->getCss(); if (!file_exists($cfg['themes_dir'] . '/admin/' . $theme . '/css')) { mkdir($cfg['themes_dir'] . '/admin/' . $theme . '/css'); } file_put_contents($output, $css); return true; } compile_botstrap_less_adm($cfg['admintheme'], $cfg['admintheme'] . '', $cfg['admintheme'] . ''); } cot_rc_add_file($cfg['themes_dir'] . '/admin/' . $cfg['admintheme'] . '/css/' . $cfg['admintheme'] . '.css'); cot_rc_add_file($cfg['themes_dir'] . '/admin/' . $cfg['admintheme'] . '/css/font-awesome.css'); cot_rc_link_footer($cfg['themes_dir'] . '/admin/' . $cfg['admintheme'] . '/js/comaterial.js'); $R['input_checkbox'] = '<input type="hidden" name="{$name}" value="{$value_off}" /><label><input type="checkbox" name="{$name}" value="{$value}"{$checked}{$attrs} /> {$title}</label>'; $R['input_check'] = '<label><input type="checkbox" name="{$name}" value="{$value}"{$checked}{$attrs} /> {$title}</label>'; $R['input_default'] = '<input type="{$type}" class="form-control" name="{$name}" value="{$value}"{$attrs} />{$error}'; $R['input_password'] = '******'; $R['input_option'] = '<option value="{$value}"{$selected}>{$title}</option>'; $R['input_radio'] = '<label><input type="radio" name="{$name}" value="{$value}"{$checked}{$attrs} /> {$title}</label>'; $R['input_radio_separator'] = ' '; $R['input_select'] = '<select name="{$name}" class="form-control" {$attrs}>{$options}</select>{$error}'; $R['input_submit'] = '<button type="submit" name="{$name}" {$attrs}>{$value}</button>'; $R['input_text'] = '<input type="text" name="{$name}" value="{$value}" class="form-control" {$attrs} />{$error}'; $R['input_textarea'] = '<textarea name="{$name}" rows="{$rows}" cols="{$cols}" class="form-control"{$attrs}>{$value}</textarea>{$error}'; $R['input_textarea_editor'] = '<textarea class="editor" name="{$name}" rows="{$rows}" cols="{$cols}"{$attrs}>{$value}</textarea>{$error}'; $R['input_textarea_medieditor'] = '<textarea class="medieditor" name="{$name}" rows="{$rows}" cols="{$cols}"{$attrs}>{$value}</textarea>{$error}'; $R['input_textarea_minieditor'] = '<textarea class="minieditor" name="{$name}" rows="{$rows}" cols="{$cols}"{$attrs}>{$value}</textarea>{$error}'; $R['input_filebox'] = '<a href="{$filepath}">{$value}</a><br /><input type="file" name="{$name}" {$attrs} /><br /><label><input type="checkbox" name="{$delname}" value="1" />' . $L['Delete'] . '</label>{$error}';
$smile_lang = './images/smilies/lang/en.lang.js'; } // BBcode or HTML preset $mkup_set = $sys['parser'] == 'bbcode' ? 'bbcode' : 'html'; // Load resources $mkup_skin_path = $cfg['plugins_dir'] . '/markitup/skins/' . $cfg['plugin']['markitup']['skin'] . '/style.css'; $mkup_skin = cot_rc('code_rc_css_file', array('url' => $mkup_skin_path)); $mkup_style_path = $cfg['plugins_dir'] . '/markitup/style.css'; $mkup_style = cot_rc('code_rc_css_file', array('url' => $mkup_style_path)); cot_rc_link_footer($smile_lang); cot_rc_link_footer('images/smilies/set.js'); cot_rc_link_footer($cfg['plugins_dir'] . '/markitup/js/jquery.markitup.min.js'); cot_rc_link_footer($mkup_lang); cot_rc_link_footer($cfg['plugins_dir'] . "/markitup/js/{$mkup_set}.set.js"); if ($cfg['plugin']['markitup']['chili']) { cot_rc_link_footer($cfg['plugins_dir'] . '/markitup/js/chili.js'); } // User-specific setup $autorefresh = $cfg['plugin']['markitup']['autorefresh'] ? 'true' : 'false'; cot_rc_embed_footer('$(document).ready(function() { if (document.createStyleSheet) { document.createStyleSheet("' . $mkup_skin_path . '"); } else { $("head").append(\'' . $mkup_skin . '\'); } if (document.createStyleSheet) { document.createStyleSheet("' . $mkup_style_path . '"); } else { $("head").append(\'' . $mkup_style . '\'); } mySettings.previewAutorefresh = ' . $autorefresh . '; mySettings.previewParserPath = "index.php?r=markitup&x=" + $("input[name=\'x\'][type=\'hidden\']").eq(0).val(); mediSettings.previewAutorefresh = ' . $autorefresh . '; mediSettings.previewParserPath = mySettings.previewParserPath; miniSettings.previewAutorefresh = ' . $autorefresh . '; miniSettings.previewParserPath = mySettings.previewParserPath; $("textarea.editor").markItUp(mySettings); $("textarea.medieditor").markItUp(mediSettings); $("textarea.minieditor").markItUp(miniSettings);
closedir($dp); return $maxtime; } } global $ckeditor_timestamp; if (!$ckeditor_timestamp) { $ckeditor_timestamp = ckeditor_max_timestamp($cfg['plugins_dir'] . '/ckeditor/lib'); } // Main CKEditor file cot_rc_link_footer($cfg['plugins_dir'] . '/ckeditor/lib/ckeditor.js?' . $ckeditor_timestamp); // Load preset and connector if ($usr['id'] > 0) { $preset_name = 'group_' . $usr['maingrp']; if (!file_exists($cfg['plugins_dir'] . "/ckeditor/presets/ckeditor.{$preset_name}.set.js")) { $preset_name = 'default'; } } else { $preset_name = file_exists($cfg['plugins_dir'] . "/ckeditor/presets/ckeditor.group_1.set.js") ? 'group_1' : 'default'; } cot_rc_link_footer($cfg['plugins_dir'] . "/ckeditor/presets/ckeditor.{$preset_name}.set.js?" . $ckeditor_timestamp); if ($ckeditor_css_to_load && is_array($ckeditor_css_to_load)) { foreach ($ckeditor_css_to_load as $key => $css_file) { if (!file_exists($css_file)) { unset($ckeditor_css_to_load[$key]); } } if (sizeof($ckeditor_css_to_load)) { $ckeditor_css_connector = "CKEDITOR.config.contentsCss = ['" . implode("','", $ckeditor_css_to_load) . "'];"; } } cot_rc_embed_footer("CKEDITOR.timestamp = {$ckeditor_timestamp}; " . $ckeditor_css_connector);