Commit 318e86f9 authored by lrargerich's avatar lrargerich

Now themes can redefine the base templates if they want editing the templates in

templates/styles/theme_name thus allowing a theme to redefine the
layout, add images, decorations etc.
parent f0362526
......@@ -7,7 +7,7 @@ include_once ("lib/ziplib.php");
if($tiki_p_admin != 'y') {
$smarty->assign('msg',tra("You dont have permission to use this feature"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
......@@ -1138,7 +1138,7 @@ if(isset($_REQUEST["createtag"])) {
// Check existance
if($tikilib->tag_exists($_REQUEST["tagname"])) {
$smarty->assign('msg',tra("Tag already exists"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
$tikilib->create_tag($_REQUEST["tagname"]);
......@@ -1147,7 +1147,7 @@ if(isset($_REQUEST["restoretag"])) {
// Check existance
if(!$tikilib->tag_exists($_REQUEST["tagname"])) {
$smarty->assign('msg',tra("Tag not found"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
$tikilib->restore_tag($_REQUEST["tagname"]);
......@@ -1161,7 +1161,7 @@ if(isset($_REQUEST["removetag"])) {
if(isset($_REQUEST["newadminpass"])) {
if($_REQUEST["adminpass"] <> $_REQUEST["again"]) {
$smarty->assign('msg',tra("The passwords dont match"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
$userlib->set_admin_pass($_REQUEST["adminpass"]);
......@@ -1277,5 +1277,5 @@ $smarty->assign_by_ref('title',$title);
$smarty->assign_by_ref('maxRecords',$maxRecords);
// Display the template
$smarty->assign('mid','tiki-admin.tpl');
$smarty->display('tiki.tpl');
$smarty->display("styles/$style_base/tiki.tpl");
?>
\ No newline at end of file
......@@ -6,7 +6,7 @@ require_once('tiki-setup.php');
if($user != 'admin') {
if($tiki_p_admin != 'y') {
$smarty->assign('msg',tra("You dont have permission to use this feature"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
}
......@@ -15,5 +15,5 @@ if($user != 'admin') {
// Display the template
$smarty->assign('mid','tiki-edit_banner.tpl');
$smarty->display('tiki.tpl');
$smarty->display("styles/$style_base/tiki.tpl");
?>
\ No newline at end of file
......@@ -4,13 +4,13 @@ require_once('tiki-setup.php');
if($feature_categories != 'y') {
$smarty->assign('msg',tra("This feature is disabled"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
if($tiki_p_admin_categories != 'y') {
$smarty->assign('msg',tra("You dont have permission to use this feature"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
......@@ -182,5 +182,5 @@ $smarty->assign_by_ref('articles',$articles["data"]);
// Display the template
$smarty->assign('mid','tiki-admin_categories.tpl');
$smarty->display('tiki.tpl');
$smarty->display("styles/$style_base/tiki.tpl");
?>
\ No newline at end of file
......@@ -4,7 +4,7 @@ require_once('tiki-setup.php');
if($tiki_p_admin_chat != 'y') {
$smarty->assign('msg',tra("You dont have permission to use this feature"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
......@@ -84,5 +84,5 @@ $smarty->assign_by_ref('channels',$channels["data"]);
// Display the template
$smarty->assign('mid','tiki-admin_chat.tpl');
$smarty->display('tiki.tpl');
$smarty->display("styles/$style_base/tiki.tpl");
?>
\ No newline at end of file
......@@ -4,7 +4,7 @@ require_once('tiki-setup.php');
if($tiki_p_edit_content_templates != 'y') {
$smarty->assign('msg',tra("You dont have permission to use this feature"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
......@@ -147,5 +147,5 @@ $smarty->assign_by_ref('channels',$channels["data"]);
// Display the template
$smarty->assign('mid','tiki-admin_content_templates.tpl');
$smarty->display('tiki.tpl');
$smarty->display("styles/$style_base/tiki.tpl");
?>
\ No newline at end of file
......@@ -4,7 +4,7 @@ require_once('tiki-setup.php');
if($tiki_p_edit_cookies != 'y') {
$smarty->assign('msg',tra("You dont have permission to use this feature"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
......@@ -47,7 +47,7 @@ if(isset($_FILES['userfile1'])&&is_uploaded_file($_FILES['userfile1']['tmp_name'
$type = $_FILES['userfile1']['type'];
} else {
$smarty->assign('msg',tra("Upload failed"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
}
......@@ -103,5 +103,5 @@ $smarty->assign_by_ref('channels',$channels["data"]);
// Display the template
$smarty->assign('mid','tiki-admin_cookies.tpl');
$smarty->display('tiki.tpl');
$smarty->display("styles/$style_base/tiki.tpl");
?>
\ No newline at end of file
......@@ -5,13 +5,13 @@ require_once('tiki-setup.php');
if($feature_drawings != 'y') {
$smarty->assign('msg',tra("Feature disabled"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
if($tiki_p_admin_drawings != 'y') {
$smarty->assign('msg',tra("You dont have permission to use this feature"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
......@@ -47,5 +47,5 @@ $smarty->assign('files',$files);
$smarty->assign('mid','tiki-admin_drawings.tpl');
$smarty->display('tiki.tpl');
$smarty->display("styles/$style_base/tiki.tpl");
?>
\ No newline at end of file
......@@ -9,7 +9,7 @@ $smarty->assign('forumId',$_REQUEST["forumId"]);
if($feature_forums != 'y') {
$smarty->assign('msg',tra("This feature is disabled"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
......@@ -34,7 +34,7 @@ if($userlib->object_has_one_permission($_REQUEST["forumId"],'forum')) {
if($tiki_p_admin_forum != 'y') {
$smarty->assign('msg',tra("You dont have permission to use this feature"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
......@@ -239,5 +239,5 @@ $smarty->assign_by_ref('sections',$sections);
// Display the template
$smarty->assign('mid','tiki-admin_forums.tpl');
$smarty->display('tiki.tpl');
$smarty->display("styles/$style_base/tiki.tpl");
?>
\ No newline at end of file
......@@ -4,7 +4,7 @@ require_once('tiki-setup.php');
if($feature_hotwords != 'y') {
$smarty->assign('msg',tra("This feature is disabled"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
......@@ -12,7 +12,7 @@ if($feature_hotwords != 'y') {
if($user != 'admin') {
if($tiki_p_admin != 'y') {
$smarty->assign('msg',tra("You dont have permission to use this feature"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
}
......@@ -75,5 +75,5 @@ $smarty->assign_by_ref('words',$words["data"]);
// Display the template
$smarty->assign('mid','tiki-admin_hotwords.tpl');
$smarty->display('tiki.tpl');
$smarty->display("styles/$style_base/tiki.tpl");
?>
\ No newline at end of file
......@@ -4,19 +4,19 @@ require_once('tiki-setup.php');
if($feature_html_pages != 'y') {
$smarty->assign('msg',tra("This feature is disabled"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
if($tiki_p_edit_html_pages != 'y') {
$smarty->assign('msg',tra("You dont have permission to use this feature"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
if(!isset($_REQUEST["pageName"])) {
$smarty->assign('msg',tra("No page indicated"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
$smarty->assign('pageName',$_REQUEST["pageName"]);
......@@ -105,5 +105,5 @@ $smarty->assign_by_ref('channels',$channels["data"]);
// Display the template
$smarty->assign('mid','tiki-admin_html_page_content.tpl');
$smarty->display('tiki.tpl');
$smarty->display("styles/$style_base/tiki.tpl");
?>
\ No newline at end of file
......@@ -4,14 +4,14 @@ require_once('tiki-setup.php');
if($feature_html_pages != 'y') {
$smarty->assign('msg',tra("This feature is disabled"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
if($tiki_p_edit_html_pages != 'y') {
$smarty->assign('msg',tra("You dont have permission to use this feature"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
......@@ -113,5 +113,5 @@ $smarty->assign_by_ref('templates',$templates["data"]);
// Display the template
$smarty->assign('mid','tiki-admin_html_pages.tpl');
$smarty->display('tiki.tpl');
$smarty->display("styles/$style_base/tiki.tpl");
?>
\ No newline at end of file
......@@ -4,14 +4,14 @@ require_once('tiki-setup.php');
if($layout_section != 'y') {
$smarty->assign('msg',tra("This feature is disabled"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
if($tiki_p_admin != 'y') {
$smarty->assign('msg',tra("You dont have permission to use this feature"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
......@@ -80,7 +80,7 @@ $smarty->assign('sections',$sections_smt);
// Display the template
$smarty->assign('mid','tiki-admin_layout.tpl');
$smarty->display('tiki.tpl');
$smarty->display("styles/$style_base/tiki.tpl");
?>
......@@ -4,7 +4,7 @@ require_once('tiki-setup.php');
if($feature_featuredLinks != 'y') {
$smarty->assign('msg',tra("This feature is disabled"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
......@@ -12,7 +12,7 @@ if($feature_featuredLinks != 'y') {
if($user != 'admin') {
if($tiki_p_admin != 'y') {
$smarty->assign('msg',tra("You dont have permission to use this feature"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
}
......@@ -32,7 +32,7 @@ if($_REQUEST["editurl"]!='n') {
$info = $tikilib->get_featured_link($_REQUEST["editurl"]);
if(!$info) {
$smarty->assign('msg',tra("Unexistant link"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
$smarty->assign('title',$info["title"]);
......@@ -61,7 +61,7 @@ $smarty->assign_by_ref('links',$links);
$smarty->assign('mid','tiki-admin_links.tpl');
$smarty->display('tiki.tpl');
$smarty->display("styles/$style_base/tiki.tpl");
?>
\ No newline at end of file
......@@ -4,13 +4,13 @@ require_once('tiki-setup.php');
if($tiki_p_admin != 'y') {
$smarty->assign('msg',tra("You dont have permission to use this feature"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
if(!isset($_REQUEST["menuId"])) {
$smarty->assign('msg',tra("No menu indicated"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
......@@ -93,5 +93,5 @@ $smarty->assign_by_ref('channels',$channels["data"]);
// Display the template
$smarty->assign('mid','tiki-admin_menu_options.tpl');
$smarty->display('tiki.tpl');
$smarty->display("styles/$style_base/tiki.tpl");
?>
\ No newline at end of file
......@@ -4,7 +4,7 @@ require_once('tiki-setup.php');
if($tiki_p_admin != 'y') {
$smarty->assign('msg',tra("You dont have permission to use this feature"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
......@@ -78,5 +78,5 @@ $smarty->assign_by_ref('channels',$channels["data"]);
// Display the template
$smarty->assign('mid','tiki-admin_menus.tpl');
$smarty->display('tiki.tpl');
$smarty->display("styles/$style_base/tiki.tpl");
?>
\ No newline at end of file
......@@ -5,7 +5,7 @@ require_once('tiki-setup.php');
if($user != 'admin') {
if($tiki_p_admin != 'y') {
$smarty->assign('msg',tra("You dont have permission to use this feature"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
}
......@@ -196,7 +196,7 @@ $smarty->assign_by_ref('left',$left);
$smarty->assign_by_ref('right',$right);
$smarty->assign('mid','tiki-admin_modules.tpl');
$smarty->display('tiki.tpl');
$smarty->display("styles/$style_base/tiki.tpl");
?>
\ No newline at end of file
......@@ -5,13 +5,13 @@ include_once('lib/newsletters/nllib.php');
if($feature_newsletters != 'y') {
$smarty->assign('msg',tra("This feature is disabled"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
if(!isset($_REQUEST["nlId"])) {
$smarty->assign('msg',tra("No newsletter indicated"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
$smarty->assign('nlId',$_REQUEST["nlId"]);
......@@ -37,7 +37,7 @@ if($userlib->object_has_one_permission($_REQUEST["nlId"],'newsletter')) {
if($tiki_p_admin_newsletters != 'y') {
$smarty->assign('msg',tra("You dont have permission to use this feature"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
......@@ -119,7 +119,7 @@ include_once("categorize_list.php");
// Display the template
$smarty->assign('mid','tiki-admin_newsletter_subscriptions.tpl');
$smarty->display('tiki.tpl');
$smarty->display("styles/$style_base/tiki.tpl");
?>
......@@ -5,7 +5,7 @@ include_once('lib/newsletters/nllib.php');
if($feature_newsletters != 'y') {
$smarty->assign('msg',tra("This feature is disabled"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
......@@ -36,7 +36,7 @@ if($userlib->object_has_one_permission($_REQUEST["nlId"],'newsletter')) {
if($tiki_p_admin_newsletters != 'y') {
$smarty->assign('msg',tra("You dont have permission to use this feature"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
......@@ -138,5 +138,5 @@ include_once("categorize_list.php");
// Display the template
$smarty->assign('mid','tiki-admin_newsletters.tpl');
$smarty->display('tiki.tpl');
$smarty->display("styles/$style_base/tiki.tpl");
?>
......@@ -4,7 +4,7 @@ require_once('tiki-setup.php');
if($tiki_p_admin != 'y') {
$smarty->assign('msg',tra("You dont have permission to use this feature"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
......@@ -64,5 +64,5 @@ $smarty->assign('admin_mail',$admin_mail);
// Display the template
$smarty->assign('mid','tiki-admin_notifications.tpl');
$smarty->display('tiki.tpl');
$smarty->display("styles/$style_base/tiki.tpl");
?>
\ No newline at end of file
......@@ -5,13 +5,13 @@ require_once('lib/tikilib.php'); # httpScheme()
if($tiki_p_admin != 'y') {
$smarty->assign('msg',tra("You dont have permission to use this feature"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
if(!isset($_REQUEST["pollId"])) {
$smarty->assign('msg',tra("No poll indicated"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
......@@ -86,5 +86,5 @@ $smarty->assign_by_ref('channels',$channels["data"]);
// Display the template
$smarty->assign('mid','tiki-admin_poll_options.tpl');
$smarty->display('tiki.tpl');
$smarty->display("styles/$style_base/tiki.tpl");
?>
\ No newline at end of file
......@@ -4,7 +4,7 @@ require_once('tiki-setup.php');
if($tiki_p_admin != 'y') {
$smarty->assign('msg',tra("You dont have permission to use this feature"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
......@@ -102,5 +102,5 @@ include_once("categorize_list.php");
// Display the template
$smarty->assign('mid','tiki-admin_polls.tpl');
$smarty->display('tiki.tpl');
$smarty->display("styles/$style_base/tiki.tpl");
?>
\ No newline at end of file
......@@ -4,7 +4,7 @@ require_once('tiki-setup.php');
if($tiki_p_admin != 'y') {
$smarty->assign('msg',tra("You dont have permission to use this feature"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
......@@ -88,5 +88,5 @@ $smarty->assign_by_ref('channels',$channels["data"]);
// Display the template
$smarty->assign('mid','tiki-admin_rssmodules.tpl');
$smarty->display('tiki.tpl');
$smarty->display("styles/$style_base/tiki.tpl");
?>
\ No newline at end of file
......@@ -5,13 +5,13 @@ require_once('tiki-setup.php');
if($feature_surveys != 'y') {
$smarty->assign('msg',tra("This feature is disabled"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
if(!isset($_REQUEST["surveyId"])) {
$smarty->assign('msg',tra("No survey indicated"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
$smarty->assign('surveyId',$_REQUEST["surveyId"]);
......@@ -37,7 +37,7 @@ if($userlib->object_has_one_permission($_REQUEST["surveyId"],'survey')) {
if($tiki_p_admin_surveys != 'y') {
$smarty->assign('msg',tra("You dont have permission to use this feature"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
......@@ -127,5 +127,5 @@ $smarty->assign('positions',$positions);
// Display the template
$smarty->assign('mid','tiki-admin_survey_questions.tpl');
$smarty->display('tiki.tpl');
$smarty->display("styles/$style_base/tiki.tpl");
?>
\ No newline at end of file
......@@ -4,7 +4,7 @@ require_once('tiki-setup.php');
if($feature_surveys != 'y') {
$smarty->assign('msg',tra("This feature is disabled"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
......@@ -35,7 +35,7 @@ if($userlib->object_has_one_permission($_REQUEST["surveyId"],'survey')) {
if($tiki_p_admin_surveys != 'y') {
$smarty->assign('msg',tra("You dont have permission to use this feature"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
......@@ -150,5 +150,5 @@ include_once("categorize_list.php");
// Display the template
$smarty->assign('mid','tiki-admin_surveys.tpl');
$smarty->display('tiki.tpl');
$smarty->display("styles/$style_base/tiki.tpl");
?>
......@@ -4,7 +4,7 @@ require_once('tiki-setup.php');
if($feature_articles != 'y') {
$smarty->assign('msg',tra("This feature is disabled"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
......@@ -13,7 +13,7 @@ if($feature_articles != 'y') {
if($tiki_p_admin_cms != 'y') {
$smarty->assign('msg',tra("You dont have permission to use this feature"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
......@@ -28,7 +28,7 @@ if(isset($_REQUEST["addtopic"])) {
$imgname = $_FILES['userfile1']['name'];
} else {
$smarty->assign('msg',tra("No image uploaded"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
// Store the image
......@@ -71,7 +71,7 @@ for($i=0;$i<count($topics);$i++) {
$smarty->assign('topics',$topics);
$smarty->assign('mid','tiki-admin_topics.tpl');
$smarty->display('tiki.tpl');
$smarty->display("styles/$style_base/tiki.tpl");
?>
\ No newline at end of file
......@@ -4,7 +4,7 @@ require_once('tiki-setup.php');
if($feature_trackers != 'y') {
$smarty->assign('msg',tra("This feature is disabled"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
......@@ -12,14 +12,14 @@ if($feature_trackers != 'y') {
// To admin tracker fields the user must have permission to admin trackers
if($tiki_p_admin_trackers != 'y') {
$smarty->assign('msg',tra("You dont have permission to use this feature"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
if(!isset($_REQUEST["trackerId"])) {
$smarty->assign('msg',tra("No tracker indicated"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
......@@ -113,5 +113,5 @@ $smarty->assign_by_ref('channels',$channels["data"]);
// Display the template
$smarty->assign('mid','tiki-admin_tracker_fields.tpl');
$smarty->display('tiki.tpl');
$smarty->display("styles/$style_base/tiki.tpl");
?>
\ No newline at end of file
......@@ -4,14 +4,14 @@ require_once('tiki-setup.php');
if($feature_trackers != 'y') {
$smarty->assign('msg',tra("This feature is disabled"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
if($tiki_p_admin_trackers != 'y') {
$smarty->assign('msg',tra("You dont have permission to use this feature"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
......@@ -135,5 +135,5 @@ $smarty->assign_by_ref('channels',$channels["data"]);
// Display the template
$smarty->assign('mid','tiki-admin_trackers.tpl');
$smarty->display('tiki.tpl');
$smarty->display("styles/$style_base/tiki.tpl");
?>
\ No newline at end of file
......@@ -6,7 +6,7 @@ require_once('tiki-setup.php');
if($user != 'admin') {
if($tiki_p_admin != 'y') {
$smarty->assign('msg',tra("You dont have permission to use this feature"));
$smarty->display('error.tpl');
$smarty->display("styles/$style_base/error.tpl");
die;
}
}
......@@ -16,7 +16,7 @@ if(isset($_REQUEST["newgroup"])) {
// Check if the user already exists
if($userlib->group_exists($_REQUEST["name"])) {
$smarty->assign('msg',tra("Group already exists"));