echo '<br /><a href="plugins/' . $plugin->act_pluginPath . '/README">' . PLUGIN_DOCUMENTATION_LOCAL . '</a>'; } ?> </td> </tr> <?php if (!empty($license)) { echo '<tr><th>' . MEDIA_PROPERTY_COPYRIGHT . '</th><td>' . $license . '</td></tr>'; } ?> </table> <br /> <?php serendipity_plugin_config($plugin, $bag, $name, $desc, $config_names); ?> </form> <?php } elseif ($serendipity['GET']['adminAction'] == 'addnew') { if ($serendipity['GET']['type'] == 'event') { ?> <h2><?php echo EVENT_PLUGINS; ?> </h2> <?php } else { ?> <h2><?php echo SIDEBAR_PLUGINS;
$storage->import($template_config); foreach ($serendipity['POST']['template'] as $option => $value) { $storage->set_config($option, $value); } echo '<div class="serendipityAdminMsgSuccess"><img style="height: 22px; width: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_success.png') . '" alt="" />' . DONE . ': ' . sprintf(SETTINGS_SAVED_AT, serendipity_strftime('%H:%M:%S')) . '</div>'; } echo '<form method="post" action="serendipity_admin.php">'; echo '<input type="hidden" name="serendipity[adminModule]" value="templates" />'; echo '<input type="hidden" name="serendipity[adminAction]" value="configure" />'; echo serendipity_setFormToken(); include S9Y_INCLUDE_PATH . 'include/functions_plugins_admin.inc.php'; $template_vars =& serendipity_loadThemeOptions($template_config); $template_options = new template_option(); $template_options->import($template_config); $template_options->values =& $template_vars; serendipity_plugin_config($template_options, $template_vars, $serendipity['template'], $serendipity['template'], $template_options->keys, true, true, true, true, 'template', $template_config_groups); echo '</form><br />'; serendipity_plugin_api::hook_event('backend_templates_configuration_bottom', $template_config); } else { echo '<p>' . STYLE_OPTIONS_NONE . '</p>'; serendipity_plugin_api::hook_event('backend_templates_configuration_none', $template_config); } echo '<h3>' . SELECT_TEMPLATE . '</h3>'; ?> <br /> <?php $i = 0; $stack = array(); serendipity_plugin_api::hook_event('backend_templates_fetchlist', $stack); $themes = serendipity_fetchTemplates(); foreach ($themes as $theme) {
function template_options($template, $catid) { global $serendipity, $template_config; if (!serendipity_checkPermission('adminTemplates')) { return; } $template = str_replace('.', '', urldecode($template)); $catid = (int) $catid; $tpl_path = $serendipity['serendipityPath'] . $serendipity['templatePath'] . $template; if (!is_dir($tpl_path)) { return false; } $serendipity['GET']['adminModule'] == 'templates'; $serendipity['smarty_vars']['template_option'] = $template . '_' . $catid; echo '<h3>' . STYLE_OPTIONS . '</h3>'; if (file_exists($tpl_path . '/config.inc.php')) { serendipity_smarty_init(); include_once $tpl_path . '/config.inc.php'; } if (is_array($template_config)) { serendipity_plugin_api::hook_event('backend_templates_configuration_top', $template_config); if ($serendipity['POST']['adminSubAction'] == 'configure') { foreach ($serendipity['POST']['template'] as $option => $value) { categorytemplate_option::set_config($option, $value, $serendipity['smarty_vars']['template_option']); } echo '<div class="serendipityAdminMsgSuccess"><img style="height: 22px; width: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_success.png') . '" alt="" />' . DONE . ': ' . sprintf(SETTINGS_SAVED_AT, serendipity_strftime('%H:%M:%S')) . '</div>'; } echo '<form method="post" action="serendipity_admin.php">'; echo '<input type="hidden" name="serendipity[adminModule]" value="templates" />'; echo '<input type="hidden" name="serendipity[adminSubAction]" value="configure" />'; echo '<input type="hidden" name="serendipity[adminAction]" value="cattemplate" />'; echo '<input type="hidden" name="serendipity[adminModule]" value="event_display" />'; echo '<input type="hidden" name="serendipity[catid]" value="' . $catid . '" />'; echo '<input type="hidden" name="serendipity[cat_template]" value="' . urlencode($template) . '" />'; include S9Y_INCLUDE_PATH . 'include/functions_plugins_admin.inc.php'; $template_vars =& serendipity_loadThemeOptions($template_config, $serendipity['smarty_vars']['template_option']); $template_options = new categorytemplate_option(); $template_options->import($template_config); $template_options->values =& $template_vars; serendipity_plugin_config($template_options, $template_vars, $serendipity['template'], $serendipity['template'], $template_options->keys, true, true, true, true, 'template'); echo '</form><br />'; serendipity_plugin_api::hook_event('backend_templates_configuration_bottom', $template_config); } else { echo '<p>' . STYLE_OPTIONS_NONE . '</p>'; serendipity_plugin_api::hook_event('backend_templates_configuration_none', $template_config); } }
$data['documentation'] = $documentation; $data['plugin'] = $plugin; if (@file_exists(dirname($plugin->pluginFile) . '/ChangeLog')) { $data['changelog'] = true; } if (@file_exists(dirname($plugin->pluginFile) . '/documentation_' . $serendipity['lang'] . '.html')) { $data['documentation_local'] = '/documentation_' . $serendipity['lang'] . '.html'; } elseif (@file_exists(dirname($plugin->pluginFile) . '/documentation_en.html')) { $data['documentation_local'] = '/documentation_en.html'; } elseif (@file_exists(dirname($plugin->pluginFile) . '/documentation.html')) { $data['documentation_local'] = '/documentation.html'; } elseif (@file_exists(dirname($plugin->pluginFile) . '/README')) { $data['documentation_local'] = '/README'; } $data['license'] = $license; $data['config'] = serendipity_plugin_config($plugin, $bag, $name, $desc, $config_names, true, true, true, true, 'plugin', $config_groups); } elseif ($serendipity['GET']['adminAction'] == 'addnew') { $data['adminAction'] = 'addnew'; $data['type'] = $serendipity['GET']['type']; $foreignPlugins = $pluginstack = $errorstack = array(); serendipity_plugin_api::hook_event('backend_plugins_fetchlist', $foreignPlugins); $pluginstack = array_merge((array) $foreignPlugins['pluginstack'], $pluginstack); $errorstack = array_merge((array) $foreignPlugins['errorstack'], $errorstack); $plugins = serendipity_plugin_api::get_installed_plugins(); $classes = serendipity_plugin_api::enum_plugin_classes($serendipity['GET']['type'] === 'event'); usort($classes, 'serendipity_pluginListSort'); $counter = 0; foreach ($classes as $class_data) { $pluginFile = serendipity_plugin_api::probePlugin($class_data['name'], $class_data['classname'], $class_data['pluginPath']); $plugin =& serendipity_plugin_api::getPluginInfo($pluginFile, $class_data, $serendipity['GET']['type']); if (is_object($plugin)) {