2k11 is default template, included admin-tpls, and made it installable

This commit is contained in:
onli 2013-05-30 22:19:07 +02:00
parent 7f72419e3c
commit ae74401668
38 changed files with 37 additions and 92 deletions

View File

@ -199,9 +199,6 @@ if (!is_object($serendipity['smarty'])) {
serendipity_smarty_init();
}
$serendipity['smarty']->assign($data);
$tfile = dirname(__FILE__) . "/tpl/category.inc.tpl";
$content = $serendipity['smarty']->fetch('file:'. $tfile); // short notation with Smarty3 in S9y 1.7 and up
echo $content;
echo serendipity_smarty_show('admin/category.inc.tpl', $data);
/* vim: set sts=4 ts=4 expandtab : */

View File

@ -415,9 +415,6 @@ if (!is_object($serendipity['smarty'])) {
serendipity_smarty_init();
}
$serendipity['smarty']->assign($data);
$tfile = dirname(__FILE__) . "/tpl/comments.inc.tpl";
$content = $serendipity['smarty']->fetch('file:'. $tfile); // short notation with Smarty3 in S9y 1.7 and up
echo $content;
echo serendipity_smarty_show('admin/comments.inc.tpl', $data);
/* vim: set sts=4 ts=4 expandtab : */

View File

@ -79,10 +79,7 @@ if (!is_object($serendipity['smarty'])) {
serendipity_smarty_init();
}
$serendipity['smarty']->assign($data);
$tfile = dirname(__FILE__) . "/tpl/configuration.inc.tpl";
$content = $serendipity['smarty']->fetch('file:'. $tfile);
echo $content;
echo serendipity_smarty_show('admin/configuration.inc.tpl', $data);
/* vim: set sts=4 ts=4 expandtab : */
?>

View File

@ -420,9 +420,6 @@ if (!is_object($serendipity['smarty'])) {
serendipity_smarty_init();
}
$serendipity['smarty']->assign($data);
$tfile = dirname(__FILE__) . "/tpl/entries.inc.tpl";
$content = $serendipity['smarty']->fetch('file:'. $tfile);
echo $content;
echo serendipity_smarty_show('admin/entries.inc.tpl', $data);
/* vim: set sts=4 ts=4 expandtab : */

View File

@ -8,7 +8,7 @@ if (!is_object($serendipity['smarty'])) {
serendipity_smarty_init();
}
$tfile = dirname(__FILE__) . "/tpl/entries_overview.inc.tpl";
$serendipity['smarty']->display('file:'. $tfile);
echo serendipity_smarty_show('admin/entries_overview.inc.tpl');
/* vim: set sts=4 ts=4 expandtab : */

View File

@ -8,7 +8,7 @@ if (!is_object($serendipity['smarty'])) {
serendipity_smarty_init();
}
$tfile = dirname(__FILE__) . "/tpl/export.inc.tpl";
$serendipity['smarty']->display('file:'. $tfile);
echo serendipity_smarty_show('admin/export.inc.tpl');
/* vim: set sts=4 ts=4 expandtab : */

View File

@ -125,10 +125,7 @@ if ($serendipity['GET']['adminAction'] == 'edit' || isset($_POST['NEW'])) {
$data['formToken'] = serendipity_setFormToken();
}
$serendipity['smarty']->assign($data);
$tfile = dirname(__FILE__) . "/tpl/groups.inc.tpl";
$content = $serendipity['smarty']->fetch('file:'. $tfile);
echo $content;
echo serendipity_smarty_show('admin/groups.inc.tpl', $data);
/* vim: set sts=4 ts=4 expandtab : */
?>

View File

@ -733,9 +733,7 @@ function showMediaLibrary($messages=false, $addvar_check = false) {
$data['get']['fid'] = $serendipity['GET']['fid']; // don't trust {$smarty.get.vars} if not proofed, as we often change GET vars via serendipty['GET'] by runtime
$data['get']['only_path'] = $serendipity['GET']['only_path']; // we dont need other GET vars in images.inc.tpl
$serendipity['smarty']->assign($data);
$tfile = dirname(__FILE__) . "/tpl/images.inc.tpl";
$content = $serendipity['smarty']->fetch('file:'. $tfile); // short notation with Smarty3 in S9y 1.7 and up
echo $content;
echo serendipity_smarty_show('admin/images.inc.tpl', $data);
/* vim: set sts=4 ts=4 expandtab : */

View File

@ -258,10 +258,7 @@ if (!is_object($serendipity['smarty'])) {
serendipity_smarty_init();
}
$serendipity['smarty']->assign($data);
$tfile = dirname(__FILE__) . "/tpl/import.inc.tpl";
$content = $serendipity['smarty']->fetch('file:'. $tfile);
echo $content;
echo serendipity_smarty_show('admin/import.inc.tpl', $data);
/* vim: set sts=4 ts=4 expandtab : */

View File

@ -385,13 +385,14 @@ if (!is_object($serendipity['smarty'])) {
}
$serendipity['smarty']->assign($data);
$tfile = dirname(__FILE__) . "/tpl/installer.inc.tpl";
$tfile = serendipity_getTemplateFile("admin/installer.inc.tpl");
ob_start();
include $tfile;
$content = ob_get_contents();
ob_end_clean();
#$content = $serendipity['smarty']->fetch('file:'. $tfile); // short notation with Smarty3 in S9y 1.7 and up
#echo $content;

View File

@ -40,9 +40,6 @@ if (!is_object($serendipity['smarty'])) {
serendipity_smarty_init();
}
$serendipity['smarty']->assign($data);
$tfile = dirname(__FILE__) . "/tpl/overview.inc.tpl";
$content = $serendipity['smarty']->fetch('file:'. $tfile); // short notation with Smarty3 in S9y 1.7 and up
echo $content;
echo serendipity_smarty_show('admin/overview.inc.tpl', $data);
/* vim: set sts=4 ts=4 expandtab : */

View File

@ -118,9 +118,6 @@ if (!is_object($serendipity['smarty'])) {
serendipity_smarty_init();
}
$serendipity['smarty']->assign($data);
$tfile = dirname(__FILE__) . "/tpl/personal.inc.tpl";
$content = $serendipity['smarty']->fetch('file:'. $tfile);
echo $content;
echo serendipity_smarty_show('admin/personal.inc.tpl', $data);
/* vim: set sts=4 ts=4 expandtab : */

View File

@ -422,9 +422,6 @@ if (!is_object($serendipity['smarty'])) {
serendipity_smarty_init();
}
$serendipity['smarty']->assign($data);
$tfile = dirname(__FILE__) . "/tpl/plugins.inc.tpl";
$content = $serendipity['smarty']->fetch('file:'. $tfile);
echo $content;
echo serendipity_smarty_show('admin/plugins.inc.tpl', $data);
/* vim: set sts=4 ts=4 expandtab : */

View File

@ -190,9 +190,6 @@ if (!is_object($serendipity['smarty'])) {
serendipity_smarty_init();
}
$serendipity['smarty']->assign($data);
$tfile = dirname(__FILE__) . "/tpl/templates.inc.tpl";
$content = $serendipity['smarty']->fetch('file:'. $tfile); // short notation with Smarty3 in S9y 1.7 and up
echo $content;
echo serendipity_smarty_show('admin/templates.inc.tpl', $data);
/* vim: set sts=4 ts=4 expandtab : */

View File

@ -384,9 +384,6 @@ if (!is_object($serendipity['smarty'])) {
/* see on top */
#$serendipity['smarty']->registerPlugin('function', 'serendipity_upgraderResultDiagnose', 'serendipity_smarty_backend_upgraderResultDiagnose');
$serendipity['smarty']->assign($data);
$tfile = dirname(__FILE__) . "/tpl/upgrader.inc.tpl";
$content = $serendipity['smarty']->fetch('file:'. $tfile); // short notation with Smarty3 in S9y 1.7 and up
echo $content;
echo serendipity_smarty_show('admin/upgrader.inc.tpl', $data);
/* vim: set sts=4 ts=4 expandtab : */

View File

@ -250,10 +250,8 @@ if (!is_object($serendipity['smarty'])) {
serendipity_smarty_init();
}
$serendipity['smarty']->assign($data);
$tfile = dirname(__FILE__) . "/tpl/users.inc.tpl";
$content = $serendipity['smarty']->fetch('file:'. $tfile);
echo $content;
echo serendipity_smarty_show('admin/users.inc.tpl', $data);
/* vim: set sts=4 ts=4 expandtab : */
?>

View File

@ -210,11 +210,7 @@ function show_plugins($event_only = false, $sidebars = null)
}
$data['total'] = $total;
$serendipity['smarty']->assign($data);
$tfile = dirname(__FILE__) . "/admin/tpl/show_plugins.fnc.tpl";
$serendipity['smarty']->display('file:'. $tfile);
echo serendipity_smarty_show('admin/show_plugins.fnc.tpl', $data);
}
/**
@ -242,10 +238,7 @@ function ownership($authorid, $name, $is_plugin_owner = false) {
$data['name'] = $name;
$data['show_ownership'] = true;
$serendipity['smarty']->assign($data);
$tfile = dirname(__FILE__) . "/admin/tpl/show_ownership.fnc.tpl";
$serendipity['smarty']->display('file:'. $tfile);
echo serendipity_smarty_show('admin/show_ownership.fnc.tpl', $data);
}
/**
@ -318,7 +311,8 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
if (!is_object($serendipity['smarty'])) {
serendipity_smarty_init();
}
$tfile = dirname(__FILE__) . "/admin/tpl/out_stack_loop.tpl";
$tfile = "/admin/out_stack_loop.tpl";
$data = array();
@ -392,8 +386,7 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
switch ($ctype) {
case 'seperator':
$data['ctype'] = 'seperator';
$serendipity['smarty']->assign($data);
$serendipity['smarty']->display('file:'. $tfile);
echo serendipity_smarty_show($tfile, $data);
break;
@ -416,8 +409,7 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
$data['select_size'] = $select_size = $cbag->get('select_size');
$data['select'] = $select = $cbag->get('select_values');
$serendipity['smarty']->assign($data);
$serendipity['smarty']->display('file:'. $tfile);
echo serendipity_smarty_show($tfile, $data);
break;
@ -469,8 +461,7 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
$data['radio_button'][$radio_index]['index'] = htmlspecialchars($radio['desc'][$radio_index]);
}
$serendipity['smarty']->assign($data);
$serendipity['smarty']->display('file:'. $tfile);
echo serendipity_smarty_show($tfile, $data);
break;
@ -483,8 +474,7 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
}
}
$data['input_type'] = $input_type;
$serendipity['smarty']->assign($data);
$serendipity['smarty']->display('file:'. $tfile);
echo serendipity_smarty_show($tfile, $data);
break;
@ -504,32 +494,28 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
}
serendipity_emit_htmlarea_code('nuggets', 'nuggets', true);
}
$serendipity['smarty']->assign($data);
$serendipity['smarty']->display('file:'. $tfile);
echo serendipity_smarty_show($tfile, $data);
break;
case 'content':
$data['ctype'] = 'content';
$data['cbag_default'] = $cbag->get('default');
$serendipity['smarty']->assign($data);
$serendipity['smarty']->display('file:'. $tfile);
echo serendipity_smarty_show($tfile, $data);
break;
case 'custom':
$data['ctype'] = 'custom';
$data['cbag_custom'] = $cbag->get('custom');
$serendipity['smarty']->assign($data);
$serendipity['smarty']->display('file:'. $tfile);
echo serendipity_smarty_show($tfile, $data);
break;
case 'hidden':
$data['ctype'] = 'hidden';
$data['cbag_value'] = $cbag->get('value');
$serendipity['smarty']->assign($data);
$serendipity['smarty']->display('file:'. $tfile);
echo serendipity_smarty_show($tfile, $data);
break;
@ -553,8 +539,7 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
$data['preview_width'] = $preview_width;
$data['preview_height'] = $preview_height;
$serendipity['smarty']->assign($data);
$serendipity['smarty']->display('file:'. $tfile);
echo serendipity_smarty_show($tfile, $data);
break;
@ -681,8 +666,7 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
}
// Print the Javascript to drag-n-drop the list
// Finish the row
$serendipity['smarty']->assign($data);
$serendipity['smarty']->display('file:'. $tfile);
echo serendipity_smarty_show($tfile, $data);
break;
@ -749,10 +733,7 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
$data['ev'] = $ev;
}
$serendipity['smarty']->assign($data);
$tfile = dirname(__FILE__) . "/admin/tpl/serendipity_plugin_config.fnc.tpl";
$content = $serendipity['smarty']->fetch('file:'. $tfile);
echo $content;
echo serendipity_smarty_show('admin/serendipity_plugin_config.fnc.tpl', $data);
return true;
}

View File

@ -121,7 +121,7 @@ $serendipity['use_iframe'] = true;
$serendipity['autolang'] = 'en';
/* Name of folder for the default theme */
$serendipity['defaultTemplate'] = 'bulletproof';
$serendipity['defaultTemplate'] = '2k11';
/* Availiable languages */
if (!isset($serendipity['languages'])) {