} // reload settings $config = wysiwyg_admin_config(); } } if (isset($config['plugins']) && $config['plugins'] != '') { $seen = explode(',', $config['plugins']); foreach ($seen as $item) { $plugins_checked[$item] = 1; } } if (isset($config['filemanager']) && $config['filemanager'] != '') { $filemanager_checked[$config['filemanager']] = true; } $parser->setPath(dirname(__FILE__) . "/templates/default"); $parser->output('tool', array('width_unit_em' => '', 'width_unit_px' => '', 'width_unit_proz' => '', 'height_unit_em' => '', 'height_unit_px' => '', 'height_unit_proz' => '', 'action' => CAT_ADMIN_URL . '/admintools/tool.php?tool=wysiwyg_admin', 'id' => WYSIWYG_EDITOR, 'skins' => $skins, 'toolbars' => $toolbars, 'current_toolbar' => $c->getToolbar($config), 'width' => $width, 'height' => $height, 'current_skin' => $c->getSkin($config), 'preview' => $preview, 'settings' => $settings, 'config' => $config, 'errors' => $errors, 'plugins' => $plugins, 'filemanager' => $filemanager, 'plugins_checked' => $plugins_checked, 'filemanager_checked' => $filemanager_checked, 'htmlpurifier' => CAT_Helper_Addons::isModuleInstalled('lib_htmlpurifier'), 'enable_htmlpurifier' => $enable_htmlpurifier, 'width_unit_' . ($width_unit == '%' ? 'proz' : $width_unit) => 'checked="checked"', 'height_unit_' . ($height_unit == '%' ? 'proz' : $height_unit) => 'checked="checked"')); // get current settings function wysiwyg_admin_config() { global $backend; $query = "SELECT * from `:prefix:mod_wysiwyg_admin_v2` where `editor`='" . WYSIWYG_EDITOR . "'"; $result = $backend->db()->query($query); $config = array(); if ($result->numRows()) { while (false !== ($row = $result->fetch())) { if (substr_count($row['set_value'], '#####')) { $row['set_value'] = explode('#####', $row['set_value']); } $config[$row['set_name']] = $row['set_value']; } }