From a8a1ad65fe3c93fdad40d6316b9d5072c699780c Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Tue, 24 Apr 2001 22:32:57 +0000 Subject: Updated for generic theming git-svn-id: file:///svn/phpbb/trunk@203 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions.php | 32 ++++++++------------------------ 1 file changed, 8 insertions(+), 24 deletions(-) (limited to 'phpBB/includes/functions.php') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 000c51696c..5970854aa6 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -189,7 +189,9 @@ function theme_select($default) { global $db; - $sql = "SELECT theme_id, theme_name FROM ".THEMES_TABLE." ORDER BY theme_name"; + $sql = "SELECT themes_id, themes_name + FROM ".THEMES_TABLE." + ORDER BY themes_name"; if($result = $db->sql_query($sql)) { $num = $db->sql_numrows($result); @@ -197,7 +199,7 @@ function theme_select($default) $theme_select = "\n"; } @@ -223,10 +225,8 @@ function init_userprefs($userdata) { global $override_user_theme, $template, $sys_template; - global $bgcolor, $table_bgcolor, $textcolor, $category_title, $table_header; - global $color1, $color2, $header_image, $newtopic_image; - global $reply_locked_image, $reply_image, $linkcolor, $vlinkcolor; global $default_lang, $date_format, $sys_timezone; + global $theme; if(!$override_user_theme) { @@ -243,22 +243,6 @@ function init_userprefs($userdata) { $theme = setuptheme($override_user_theme); } - if($theme) - { - $bgcolor = $theme["bgcolor"]; - $table_bgcolor = $theme["table_bgcolor"]; - $textcolor = $theme["textcolor"]; - $category_title = $theme["category_title"]; - $table_header = $theme["table_header"]; - $color1 = $theme["color1"]; - $color2 = $theme["color2"]; - $header_image = $theme["header_image"]; - $newtopic_image = $theme["newtopic_image"]; - $reply_locked_image = $theme["reply_locked_image"]; - $reply_image = $theme["reply_image"]; - $linkcolor = $theme["linkcolor"]; - $vlinkcolor = $theme["vlinkcolor"]; - } if($userdata["user_lang"] != "") { $default_lang = $userdata["user_lang"]; @@ -311,10 +295,10 @@ function setuptheme($theme) $sql = "SELECT * FROM ".THEMES_TABLE." - WHERE theme_id = '$theme'"; + WHERE themes_id = '$theme'"; + if(!$result = $db->sql_query($sql)) return(0); - if(!$myrow = $db->sql_fetchrow($result)) return(0); -- cgit v1.2.1