From c4c1da86c95fa47f7d253da1842c101deea5c8a9 Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Sun, 16 Dec 2001 02:38:45 +0000 Subject: Added body text setting git-svn-id: file:///svn/phpbb/trunk@1602 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/admin/admin_styles.php | 53 ++++++++++++---------- phpBB/language/lang_english/lang_admin.php | 3 +- .../templates/subSilver/admin/styles_edit_body.tpl | 29 +++++++----- 3 files changed, 47 insertions(+), 38 deletions(-) diff --git a/phpBB/admin/admin_styles.php b/phpBB/admin/admin_styles.php index d743a54f39..12459e5638 100644 --- a/phpBB/admin/admin_styles.php +++ b/phpBB/admin/admin_styles.php @@ -38,35 +38,35 @@ $phpbb_root_dir = "./../"; // // Check if the user has cancled a confirmation message. // -$confirm = ( $HTTP_POST_VARS['confirm'] ) ? TRUE : FALSE; -$cancel = ( $HTTP_POST_VARS['cancel'] ) ? TRUE : FALSE; +$confirm = ( isset($HTTP_POST_VARS['confirm']) ) ? TRUE : FALSE; +$cancel = ( isset($HTTP_POST_VARS['cancel']) ) ? TRUE : FALSE; -if($cancel) +if( $cancel ) { - header("Location: admin_styles.$phpEx"); + header("Location: " . append_sid("admin_styles.$phpEx")); } -if(!$HTTP_POST_VARS['send_file']) +if( !$HTTP_POST_VARS['send_file'] ) { require('pagestart.inc'); } -if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) ) +if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) ) { - $mode = ($HTTP_GET_VARS['mode']) ? $HTTP_GET_VARS['mode'] : $HTTP_POST_VARS['mode']; + $mode = ( isset($HTTP_GET_VARS['mode']) ) ? $HTTP_GET_VARS['mode'] : $HTTP_POST_VARS['mode']; } else { $mode = ""; } -switch($mode) +switch( $mode ) { case "addnew": - $install_to = ($HTTP_GET_VARS['install_to']) ? urldecode($HTTP_GET_VARS['install_to']) : $HTTP_POST_VARS['install_to']; - $style_name = ($HTTP_GET_VARS['style']) ? urldecode($HTTP_GET_VARS['style']) : $HTTP_POST_VARS['style']; + $install_to = ( isset($HTTP_GET_VARS['install_to']) ) ? urldecode($HTTP_GET_VARS['install_to']) : $HTTP_POST_VARS['install_to']; + $style_name = ( isset($HTTP_GET_VARS['style']) ) ? urldecode($HTTP_GET_VARS['style']) : $HTTP_POST_VARS['style']; - if(isset($install_to)) + if( isset($install_to) ) { include($phpbb_root_dir . "templates/" . $install_to . "/theme_info.cfg"); @@ -75,7 +75,7 @@ switch($mode) for($i = 0; $i < count($template_name) && !$found; $i++) { - if($template_name[$i]['style_name'] == $style_name) + if( $template_name[$i]['style_name'] == $style_name ) { while(list($key, $val) = each($template_name[$i])) { @@ -109,7 +109,7 @@ switch($mode) } $sql .= ")"; - if(!$result = $db->sql_query($sql)) + if( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, "Could not insert theme data!", "Error", __LINE__, __FILE__, $sql); } @@ -192,9 +192,9 @@ switch($mode) case "create": case "edit": - $submit = (isset($HTTP_POST_VARS['submit'])) ? 1 : 0; + $submit = ( isset($HTTP_POST_VARS['submit']) ) ? TRUE : 0; - if($submit) + if( $submit ) { // // DAMN! Thats alot of data to validate... @@ -204,6 +204,7 @@ switch($mode) $updated['head_stylesheet'] = $HTTP_POST_VARS['head_stylesheet']; $updated['body_background'] = $HTTP_POST_VARS['body_background']; $updated['body_bgcolor'] = $HTTP_POST_VARS['body_bgcolor']; + $updated['body_text'] = $HTTP_POST_VARS['body_text']; $updated['body_link'] = $HTTP_POST_VARS['body_link']; $updated['body_vlink'] = $HTTP_POST_VARS['body_vlink']; $updated['body_alink'] = $HTTP_POST_VARS['body_alink']; @@ -558,10 +559,11 @@ switch($mode) "L_STYLESHEET" => $lang['Stylesheet'], "L_BACKGROUND_IMAGE" => $lang['Background_image'], "L_BACKGROUND_COLOR" => $lang['Background_color'], - "L_BODY_LINK" => $lang['Link_color'], - "L_BODY_VLINK" => $lang['VLink_color'], - "L_BODY_ALINK" => $lang['ALink_color'], - "L_BODY_HLINK" => $lang['HLink_color'], + "L_BODY_TEXT_COLOR" => $lang['Text_color'], + "L_BODY_LINK_COLOR" => $lang['Link_color'], + "L_BODY_VLINK_COLOR" => $lang['VLink_color'], + "L_BODY_ALINK_COLOR" => $lang['ALink_color'], + "L_BODY_HLINK_COLOR" => $lang['HLink_color'], "L_TR_COLOR1" => $lang['Tr_color1'], "L_TR_COLOR2" => $lang['Tr_color2'], "L_TR_COLOR3" => $lang['Tr_color3'], @@ -597,10 +599,11 @@ switch($mode) "HEAD_STYLESHEET" => $selected['head_stylesheet'], "BODY_BACKGROUND" => $selected['body_background'], "BODY_BGCOLOR" => $selected['body_bgcolor'], - "BODY_LINK" => $selected['body_link'], - "BODY_VLINK" => $selected['body_vlink'], - "BODY_ALINK" => $selected['body_alink'], - "BODY_HLINK" => $selected['body_hlink'], + "BODY_TEXT_COLOR" => $selected['body_text'], + "BODY_LINK_COLOR" => $selected['body_link'], + "BODY_VLINK_COLOR" => $selected['body_vlink'], + "BODY_ALINK_COLOR" => $selected['body_alink'], + "BODY_HLINK_COLOR" => $selected['body_hlink'], "TR_COLOR1" => $selected['tr_color1'], "TR_COLOR2" => $selected['tr_color2'], "TR_COLOR3" => $selected['tr_color3'], @@ -791,9 +794,9 @@ switch($mode) break; case "delete": - $style_id = ($HTTP_GET_VARS['style_id']) ? intval($HTTP_GET_VARS['style_id']) : intval($HTTP_POST_VARS['style_id']); + $style_id = ( isset($HTTP_GET_VARS['style_id']) ) ? intval($HTTP_GET_VARS['style_id']) : intval($HTTP_POST_VARS['style_id']); - if(!$confirm) + if( !$confirm ) { if($style_id == $board_config['default_style']) { diff --git a/phpBB/language/lang_english/lang_admin.php b/phpBB/language/lang_english/lang_admin.php index 571d686431..b6404850e5 100644 --- a/phpBB/language/lang_english/lang_admin.php +++ b/phpBB/language/lang_english/lang_admin.php @@ -589,6 +589,7 @@ $lang['Background_image'] = "Background Image"; $lang['Background_color'] = "Background Colour"; $lang['Theme_name'] = "Theme Name"; $lang['Link_color'] = "Link Colour"; +$lang['Text_color'] = "Text Colour"; $lang['VLink_color'] = "Visited Link Colour"; $lang['ALink_color'] = "Active Link Colour"; $lang['HLink_color'] = "Hover Link Colour"; @@ -683,4 +684,4 @@ $lang['Install_Method'] = "Choose your installation method"; // That's all Folks! // ------------------------------------------------- -?> +?> \ No newline at end of file diff --git a/phpBB/templates/subSilver/admin/styles_edit_body.tpl b/phpBB/templates/subSilver/admin/styles_edit_body.tpl index 560b63e331..664fe0a89e 100755 --- a/phpBB/templates/subSilver/admin/styles_edit_body.tpl +++ b/phpBB/templates/subSilver/admin/styles_edit_body.tpl @@ -16,9 +16,9 @@ {S_TEMPLATE_SELECT} - {L_THEME_ELEMENT} - {L_VALUE} - {L_SIMPLE_NAME} + {L_THEME_ELEMENT} + {L_VALUE} + {L_SIMPLE_NAME} {L_STYLESHEET}:
Filename for CSS stylesheet to use for this theme. @@ -32,27 +32,32 @@ {L_BACKGROUND_COLOR}: - +   - {L_BODY_LINK}: - + {L_BODY_TEXT_COLOR}: +   - {L_BODY_VLINK}: - + {L_BODY_LINK_COLOR}: + +   + + + {L_BODY_VLINK_COLOR}: +   - {L_BODY_ALINK}: - + {L_BODY_ALINK_COLOR}: +   - {L_BODY_HLINK}: - + {L_BODY_HLINK_COLOR}: +   -- cgit v1.2.1