config[$item] AS $key => $val) { $bag->add($key, $val); } } function get_config($item) { return $this->values[$item]; } function set_config($item, $value) { global $serendipity; if ($this->config[$item]['scope'] == 'global') { serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}options WHERE okey = 't_global' AND name = '" . serendipity_db_escape_string($item) . "'"); serendipity_db_query("INSERT INTO {$serendipity['dbPrefix']}options (okey, name, value) VALUES ('t_global', '" . serendipity_db_escape_string($item) . "', '" . serendipity_db_escape_string($value) . "')"); } else { serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}options WHERE okey = 't_" . serendipity_db_escape_string($serendipity['template']) . "' AND name = '" . serendipity_db_escape_string($item) . "'"); serendipity_db_query("INSERT INTO {$serendipity['dbPrefix']}options (okey, name, value) VALUES ('t_" . serendipity_db_escape_string($serendipity['template']) . "', '" . serendipity_db_escape_string($item) . "', '" . serendipity_db_escape_string($value) . "')"); } return true; } function import(&$config) { foreach($config AS $key => $item) { $this->config[$item['var']] = $item; $this->keys[$item['var']] = $item['var']; } } } if ($serendipity['GET']['adminAction'] == 'install' ) { serendipity_plugin_api::hook_event('backend_templates_fetchtemplate', $serendipity); $themeInfo = serendipity_fetchTemplateInfo(htmlspecialchars($serendipity['GET']['theme'])); serendipity_set_config_var('template', htmlspecialchars($serendipity['GET']['theme'])); serendipity_set_config_var('template_engine', isset($themeInfo['engine']) ? $themeInfo['engine'] : 'default'); echo '
' . sprintf(TEMPLATE_SET, htmlspecialchars($serendipity['GET']['theme'])) .'
'; } ?> '. WARNING_TEMPLATE_DEPRECATED .''; } echo '

' . STYLE_OPTIONS . ' (' . $serendipity['template'] . ')

'; if (file_exists($serendipity['serendipityPath'] . $serendipity['templatePath'] . $serendipity['template'] . '/config.inc.php')) { serendipity_smarty_init(); include_once $serendipity['serendipityPath'] . $serendipity['templatePath'] . $serendipity['template'] . '/config.inc.php'; } if (is_array($template_config)) { serendipity_plugin_api::hook_event('backend_templates_configuration_top', $template_config); if ($serendipity['POST']['adminAction'] == 'configure' && serendipity_checkFormToken()) { $storage = new template_option(); $storage->import($template_config); foreach($serendipity['POST']['template'] AS $option => $value) { $storage->set_config($option, $value); } echo '
' . DONE .': '. sprintf(SETTINGS_SAVED_AT, serendipity_strftime('%H:%M:%S')) . '
'; } echo '
'; echo ''; echo ''; 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 '

'; serendipity_plugin_api::hook_event('backend_templates_configuration_bottom', $template_config); } else { echo '

' . STYLE_OPTIONS_NONE . '

'; serendipity_plugin_api::hook_event('backend_templates_configuration_none', $template_config); } echo '

' . SELECT_TEMPLATE . '

'; ?>
$info) { $i++; /* Sorry, but we don't display engines */ if ( strtolower($info['engine']) == 'yes' ) { continue; } $preview = ''; $preview_link = false; if (file_exists($serendipity['serendipityPath'] . $serendipity['templatePath'] . $theme . '/preview_fullsize.jpg')) { $preview .= ''; $preview_link = true; } elseif (!empty($info['preview_fullsizeURL'])) { $preview .= ''; $preview_link = true; # } else { # echo "No large preview"; } if (file_exists($serendipity['serendipityPath'] . $serendipity['templatePath'] . $theme . '/preview.png')) { $preview .= ''; } elseif (!empty($info['previewURL'])) { $preview .= ''; } else { $preview .= ' '; } if ($preview_link) { $preview .= ''; } if (empty($info['customURI'])) { $info['customURI'] = ''; } $unmetRequirements = array(); if ( isset($info['require serendipity']) && version_compare($info['require serendipity'], serendipity_getCoreVersion($serendipity['version']), '>') ) { $unmetRequirements[] = 'Serendipity '. $info['require serendipity']; } /* TODO: Smarty versioncheck */ $class = (($i % 2 == 0) ? 'even' : 'uneven'); ?>
<?php echo SET_AS_TEMPLATE ?>
:
:
: