aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/admin/admin_styles.php53
-rw-r--r--phpBB/language/lang_english/lang_admin.php3
-rwxr-xr-xphpBB/templates/subSilver/admin/styles_edit_body.tpl29
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 @@
<td class="row2" colspan="2">{S_TEMPLATE_SELECT}</td>
</tr>
<tr>
- <td class="cattitle">{L_THEME_ELEMENT}</td>
- <td class="cattitle">{L_VALUE}</td>
- <td class="cattitle">{L_SIMPLE_NAME}</td>
+ <th>{L_THEME_ELEMENT}</th>
+ <th>{L_VALUE}</th>
+ <th>{L_SIMPLE_NAME}</th>
</tr>
<tr>
<td class="row1">{L_STYLESHEET}:<br /><span class="gensmall">Filename for CSS stylesheet to use for this theme.</span></td>
@@ -32,27 +32,32 @@
</tr>
<tr>
<td class="row1">{L_BACKGROUND_COLOR}:</td>
- <td class="row2" ><input type="text" size="25" maxlength="100" name="body_bgcolor" value="{BODY_BGCOLOR}"></td>
+ <td class="row2" ><input type="text" size="6" maxlength="6" name="body_bgcolor" value="{BODY_BGCOLOR}"></td>
<td class="row2">&nbsp;</td>
</tr>
<tr>
- <td class="row1">{L_BODY_LINK}:</td>
- <td class="row2" ><input type="text" size="25" maxlength="100" name="body_link" value="{BODY_LINK}"></td>
+ <td class="row1">{L_BODY_TEXT_COLOR}:</td>
+ <td class="row2" ><input type="text" size="6" maxlength="6" name="body_text" value="{BODY_TEXT_COLOR}"></td>
<td class="row2">&nbsp;</td>
</tr>
<tr>
- <td class="row1">{L_BODY_VLINK}:</td>
- <td class="row2" ><input type="text" size="25" maxlength="100" name="body_vlink" value="{BODY_VLINK}"></td>
+ <td class="row1">{L_BODY_LINK_COLOR}:</td>
+ <td class="row2" ><input type="text" size="6" maxlength="6" name="body_link" value="{BODY_LINK_COLOR}"></td>
+ <td class="row2">&nbsp;</td>
+ </tr>
+ <tr>
+ <td class="row1">{L_BODY_VLINK_COLOR}:</td>
+ <td class="row2" ><input type="text" size="6" maxlength="6" name="body_vlink" value="{BODY_VLINK_COLOR}"></td>
<td class="row2">&nbsp;</td>
</tr>
<tr>
- <td class="row1">{L_BODY_ALINK}:</td>
- <td class="row2" ><input type="text" size="25" maxlength="100" name="body_alink" value="{BODY_ALINK}"></td>
+ <td class="row1">{L_BODY_ALINK_COLOR}:</td>
+ <td class="row2" ><input type="text" size="6" maxlength="6" name="body_alink" value="{BODY_ALINK_COLOR}"></td>
<td class="row2">&nbsp;</td>
</tr>
<tr>
- <td class="row1">{L_BODY_HLINK}:</td>
- <td class="row2" ><input type="text" size="25" maxlength="100" name="body_hlink" value="{BODY_HLINK}"></td>
+ <td class="row1">{L_BODY_HLINK_COLOR}:</td>
+ <td class="row2" ><input type="text" size="6" maxlength="6" name="body_hlink" value="{BODY_HLINK_COLOR}"></td>
<td class="row2">&nbsp;</td>
</tr>