aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2001-11-24 01:51:36 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2001-11-24 01:51:36 +0000
commit44c849564fe7e0211dee134e9133c0c7f29ed03a (patch)
tree4003bbebf5a0404d0e5648d31ec1c9ec747a029e
parent517647646b65f85c14c18d0082d41bcf90eabc31 (diff)
downloadforums-44c849564fe7e0211dee134e9133c0c7f29ed03a.tar
forums-44c849564fe7e0211dee134e9133c0c7f29ed03a.tar.gz
forums-44c849564fe7e0211dee134e9133c0c7f29ed03a.tar.bz2
forums-44c849564fe7e0211dee134e9133c0c7f29ed03a.tar.xz
forums-44c849564fe7e0211dee134e9133c0c7f29ed03a.zip
Various updates
git-svn-id: file:///svn/phpbb/trunk@1432 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/admin/admin_disallow.php125
-rw-r--r--phpBB/admin/admin_ranks.php35
-rw-r--r--phpBB/admin/admin_styles.php1223
-rw-r--r--phpBB/admin/admin_words.php29
-rw-r--r--phpBB/language/lang_english/lang_admin.php145
-rw-r--r--phpBB/templates/subSilver/admin/disallow_body.tpl27
6 files changed, 810 insertions, 774 deletions
diff --git a/phpBB/admin/admin_disallow.php b/phpBB/admin/admin_disallow.php
index bdd06ebb64..61da110417 100644
--- a/phpBB/admin/admin_disallow.php
+++ b/phpBB/admin/admin_disallow.php
@@ -34,98 +34,105 @@ if($setmodules == 1)
$phpbb_root_dir = "./../";
require('pagestart.inc');
-//
-// Check to see what mode we shold operate in.
-//
-if( isset($HTTP_POST_VARS['mode']) || isset($HTTP_GET_VARS['mode']) )
+if( isset($HTTP_POST_VARS['add_name']) )
{
- $mode = ( isset($HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode'];
-}
-else
-{
- $mode = "";
-}
-$output_info = '';
-switch( $mode )
-{
- case $lang['Delete']:
- $disallowed_id = ( isset($HTTP_POST_VARS['disallowed_id']) ) ? intval( $HTTP_POST_VARS['disallowed_id'] ) : intval( $HTTP_GET_VARS['disallowed_id'] );
-
- $sql = 'DELETE FROM '.DISALLOW_TABLE.' WHERE disallow_id = '.$disallowed_id;
- $result = $db->sql_query($sql);
- if( !$result )
- {
- message_die(GENERAL_ERROR, "Couldn't removed disallowed user.", "",__LINE__, __FILE__, $sql);
- }
- $output_info = $lang['disallowed_deleted'];
- break;
- case $lang['Add']:
- $disallowed_user = ( isset($HTTP_POST_VARS['disallowed_user']) ) ? $HTTP_POST_VARS['disallowed_user'] : $HTTP_GET_VARS['disallowed_user'];
- $disallowed_user = preg_replace( '/\*/', '%', $disallowed_user );
- if( !validate_username( $disallowed_user ) )
- {
- $output_info = $lang['disallowed_already'];
- }
- else
+ $disallowed_user = ( isset($HTTP_POST_VARS['disallowed_user']) ) ? $HTTP_POST_VARS['disallowed_user'] : $HTTP_GET_VARS['disallowed_user'];
+ $disallowed_user = preg_replace( '/\*/', '%', $disallowed_user );
+
+ if( !validate_username($disallowed_user) )
+ {
+ $message = $lang['Disallowed_already'];
+ }
+ else
+ {
+ $sql = "INSERT INTO " . DISALLOW_TABLE . " (disallow_username)
+ VALUES('" . $disallowed_user . "')";
+ $result = $db->sql_query( $sql );
+ if ( !$result )
{
- $sql = 'INSERT INTO '.DISALLOW_TABLE."(disallow_username) VALUES('".$disallowed_user."')";
- $result = $db->sql_query( $sql );
- if ( !$result )
- {
- message_die(GENERAL_ERROR, "Could not add disallowed user.", "",__LINE__, __FILE__, $sql);
- }
- $output_info = $lang['disallow_successful'];
+ message_die(GENERAL_ERROR, "Could not add disallowed user.", "",__LINE__, __FILE__, $sql);
}
- break;
+ $message = $lang['Disallow_successful'];
+ }
+
+ $message .= "<br /><br />" . sprintf($lang['Click_return_disallowadmin'], "<a href=\"" . append_sid("admin_disallow.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
+
+ message_die(GENERAL_MESSAGE, $message);
+}
+else if( isset($HTTP_POST_VARS['delete_name']) )
+{
+ $disallowed_id = ( isset($HTTP_POST_VARS['disallowed_id']) ) ? intval( $HTTP_POST_VARS['disallowed_id'] ) : intval( $HTTP_GET_VARS['disallowed_id'] );
+
+ $sql = "DELETE FROM " . DISALLOW_TABLE . "
+ WHERE disallow_id = $disallowed_id";
+ $result = $db->sql_query($sql);
+ if( !$result )
+ {
+ message_die(GENERAL_ERROR, "Couldn't removed disallowed user.", "",__LINE__, __FILE__, $sql);
+ }
+
+ $message .= $lang['Disallowed_deleted'] . "<br /><br />" . sprintf($lang['Click_return_disallowadmin'], "<a href=\"" . append_sid("admin_disallow.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
+
+ message_die(GENERAL_MESSAGE, $message);
+
}
+
//
// Grab the current list of disallowed usernames...
//
-$sql = 'SELECT * FROM '.DISALLOW_TABLE;
+$sql = "SELECT *
+ FROM " . DISALLOW_TABLE;
$result = $db->sql_query($sql);
if( !$result )
{
- message_die( GENERAL_ERROR, "Couldn't get disallowed users.", "", __LINE__, __FILE__, $sql );
+ message_die(GENERAL_ERROR, "Couldn't get disallowed users.", "", __LINE__, __FILE__, $sql );
}
+
$disallowed = $db->sql_fetchrowset($result);
//
// Ok now generate the info for the template, which will be put out no matter
// what mode we are in.
//
-$disallow_select = "<SELECT NAME=\"disallowed_id\">";
-if ( trim($disallowed) == '' )
+$disallow_select = '<select name="disallowed_id">';
+
+if( trim($disallowed) == "" )
{
- $disallow_select .= '<option value="">'.$lang['no_disallowed'].'</option>';
+ $disallow_select .= '<option value="">' . $lang['no_disallowed'] . '</option>';
}
else
{
- $disallow_select .= "<OPTION value=\"\">".$lang['Select'].' '.$lang['Username']."</OPTION>";
$user = array();
for( $i = 0; $i < count($disallowed); $i++ )
{
- $disallowed[$i]['disallow_username'] = preg_replace( '/%/', '*', $disallowed[$i]['disallow_username']);
- $disallow_select .= '<option value="'.$disallowed[$i]['disallow_id'].'">'.$disallowed[$i]['disallow_username'].'</option>';
+ $disallowed[$i]['disallow_username'] = preg_replace('/%/', '*', $disallowed[$i]['disallow_username']);
+
+ $disallow_select .= '<option value="' . $disallowed[$i]['disallow_id'] . '">' . $disallowed[$i]['disallow_username'] . '</option>';
}
}
-$disallow_select .= '</SELECT>';
+
+$disallow_select .= '</select>';
+
$template->set_filenames(array(
"body" => "admin/disallow_body.tpl")
);
+
$template->assign_vars(array(
"S_DISALLOW_SELECT" => $disallow_select,
+ "S_FORM_ACTION" => append_sid('admin_disallow.php'),
+
"L_INFO" => $output_info,
"L_DISALLOW_TITLE" => $lang['Disallow_control'],
- "L_DELETE" => $lang['Delete'],
- "L_ADD" => $lang['Add'],
- "L_RESET" => $lang['Reset'],
- "S_FORM_ACTION" => append_sid('admin_disallow.php'),
- "L_EXPLAIN" => $lang['disallow_instructs'],
- "L_DEL_DISALLOW" => $lang['del_disallow'],
- "L_DEL_EXPLAIN" => $lang['del_disallow_explain'],
- "L_ADD_DISALLOW" => $lang['add_disallow'],
- "L_ADD_EXPLAIN" => $lang['add_disallow_explain'],
+ "L_DISALLOW_EXPLAIN" => $lang['Disallow_explain'],
+ "L_DELETE" => $lang['Delete_disallow'],
+ "L_DELETE_DISALLOW" => $lang['Delete_disallow_title'],
+ "L_DELETE_EXPLAIN" => $lang['Delete_disallow_explain'],
+ "L_ADD" => $lang['Add_disallow'],
+ "L_ADD_DISALLOW" => $lang['Add_disallow_title'],
+ "L_ADD_EXPLAIN" => $lang['Add_disallow_explain'],
"L_USERNAME" => $lang['Username'])
);
+
$template->pparse("body");
-?>
+
+?> \ No newline at end of file
diff --git a/phpBB/admin/admin_ranks.php b/phpBB/admin/admin_ranks.php
index 9b3c824798..bbf064e2ab 100644
--- a/phpBB/admin/admin_ranks.php
+++ b/phpBB/admin/admin_ranks.php
@@ -31,7 +31,7 @@ if($setmodules == 1)
// Let's set the root dir for phpBB
//
$phpbb_root_dir = "./../";
-$no_page_header = TRUE;
+
require('pagestart.inc');
@@ -66,8 +66,6 @@ if( $mode != "" )
//
// They want to add a new rank, show the form.
//
- include('page_header_admin.' . $phpEx);
-
$rank_id = ( isset($HTTP_GET_VARS['id']) ) ? intval($HTTP_GET_VARS['id']) : 0;
$s_hidden_fields = "";
@@ -142,7 +140,7 @@ if( $mode != "" )
$special_rank = ( $HTTP_POST_VARS['special_rank'] == 1 ) ? TRUE : 0;
$max_posts = ( isset($HTTP_POST_VARS['max_posts']) ) ? intval($HTTP_POST_VARS['max_posts']) : -1;
$min_posts = ( isset($HTTP_POST_VARS['min_posts']) ) ? intval($HTTP_POST_VARS['min_posts']) : -1;
- $rank_image = ( (isset($HTTP_POST_VARS['rank_image'])) || $HTTP_POST_VARS['rank_image'] != "http://" ) ? $HTTP_POST_VARS['rank_image'] : "";
+ $rank_image = ( (isset($HTTP_POST_VARS['rank_image'])) ) ? $HTTP_POST_VARS['rank_image'] : "";
if( $rank_title == "" )
{
@@ -176,6 +174,7 @@ if( $mode != "" )
rank_min = '$min_posts',
rank_image = '$rank_image'
WHERE rank_id = $rank_id";
+
$message = $lang['Rank_updated'];
}
else
@@ -184,6 +183,7 @@ if( $mode != "" )
(rank_title, rank_special, rank_max, rank_min, rank_image)
VALUES
('$rank_title', '$special_rank', '$max_posts', '$min_posts', '$rank_image')";
+
$message = $lang['Rank_added'];
}
@@ -192,10 +192,8 @@ if( $mode != "" )
message_die(GENERAL_ERROR, "Couldn't update/insert into ranks table", "", __LINE__, __FILE__, $sql);
}
- $template->assign_vars(array(
- "META" => '<meta http-equiv="refresh" content="3;url=' . append_sid("admin_ranks.$phpEx") . '">')
- );
- $message .= "<br />" . sprintf($lang['return_rank_admin'], "<a href=\"" . append_sid("admin_ranks.$phpEx") . "\">", "</a>");
+ $message .= "<br /><br />" . sprintf($lang['Click_return_rankadmin'], "<a href=\"" . append_sid("admin_ranks.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
+
message_die(GENERAL_MESSAGE, $message);
}
@@ -224,19 +222,13 @@ if( $mode != "" )
message_die(GENERAL_ERROR, "Couldn't delete rank data", "", __LINE__, __FILE__, $sql);
}
- $template->assign_vars(array(
- "META" => '<meta http-equiv="refresh" content="3;url=' . append_sid("admin_ranks.$phpEx") . '">')
- );
- $message = $lang['Rank_removed'];
- $message .= "<br />" . sprintf($lang['return_rank_admin'], "<a href=\"" . append_sid("admin_ranks.$phpEx") . "\">", "</a>");
+ $message .= "<br /><br />" . sprintf($lang['Click_return_rankadmin'], "<a href=\"" . append_sid("admin_ranks.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
+
message_die(GENERAL_MESSAGE, $message);
}
else
{
- $template->assign_vars(array(
- "META" => '<meta http-equiv="refresh" content="3;url=' . append_sid("admin_ranks.$phpEx") . '">')
- );
message_die(GENERAL_MESSAGE, $lang['Must_select_rank']);
}
}
@@ -245,8 +237,7 @@ if( $mode != "" )
//
// They didn't feel like giving us any information. Oh, too bad, we'll just display the
// list then...
- include('page_header_admin.' . $phpEx);
-
+ //
$template->set_filenames(array(
"body" => "admin/ranks_list_body.tpl")
);
@@ -288,7 +279,6 @@ if( $mode != "" )
{
$rank_min = $rank_max = "-";
}
-
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
@@ -313,8 +303,6 @@ else
//
// Show the default page
//
- include('page_header_admin.' . $phpEx);
-
$template->set_filenames(array(
"body" => "admin/ranks_list_body.tpl")
);
@@ -359,7 +347,8 @@ else
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
- $rank_is_special = ( $special_rank == 1 ) ? $lang['Yes'] : $lang['No'];
+
+ $rank_is_special = ( $special_rank ) ? $lang['Yes'] : $lang['No'];
$template->assign_block_vars("ranks", array(
"ROW_COLOR" => "#" . $row_color,
@@ -379,4 +368,4 @@ $template->pparse("body");
include('page_footer_admin.'.$phpEx);
-?>
+?> \ No newline at end of file
diff --git a/phpBB/admin/admin_styles.php b/phpBB/admin/admin_styles.php
index 4043580a4c..98c8100c43 100644
--- a/phpBB/admin/admin_styles.php
+++ b/phpBB/admin/admin_styles.php
@@ -43,7 +43,7 @@ $cancel = ( $HTTP_POST_VARS['cancel'] ) ? TRUE : FALSE;
if($cancel)
{
- header("Location: $PHP_SELF");
+ header("Location: admin_styles.$phpEx");
}
if(!$HTTP_POST_VARS['send_file'])
@@ -63,273 +63,367 @@ else
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 = ($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'];
- if(isset($install_to))
- {
- include($phpbb_root_dir . "templates/" . $install_to . "/theme_info.cfg");
- $template_name = $$install_to;
- $found = FALSE;
-
- for($i = 0; $i < count($template_name) && !$found; $i++)
+ if(isset($install_to))
{
- if($template_name[$i]['style_name'] == $style_name)
+ include($phpbb_root_dir . "templates/" . $install_to . "/theme_info.cfg");
+
+ $template_name = $$install_to;
+ $found = FALSE;
+
+ for($i = 0; $i < count($template_name) && !$found; $i++)
{
- while(list($key, $val) = each($template_name[$i]))
+ if($template_name[$i]['style_name'] == $style_name)
{
- $db_fields[] = $key;
- $db_values[] = $val;
+ while(list($key, $val) = each($template_name[$i]))
+ {
+ $db_fields[] = $key;
+ $db_values[] = $val;
+ }
}
}
- }
+
+ $sql = "INSERT INTO " . THEMES_TABLE . " (";
+
+ for($i = 0; $i < count($db_fields); $i++)
+ {
+ $sql .= $db_fields[$i];
+ if($i != (count($db_fields) - 1))
+ {
+ $sql .= ", ";
+ }
- $sql = "INSERT INTO " . THEMES_TABLE . " (";
- for($i = 0; $i < count($db_fields); $i++)
- {
- $sql .= $db_fields[$i];
- if($i != (count($db_fields) - 1))
+ }
+
+ $sql .= ") VALUES (";
+
+ for($i = 0; $i < count($db_values); $i++)
{
- $sql .= ", ";
+ $sql .= "'" . $db_values[$i] . "'";
+ if($i != (count($db_values) - 1))
+ {
+ $sql .= ", ";
+ }
}
+ $sql .= ")";
- }
- $sql .= ") VALUES (";
- for($i = 0; $i < count($db_values); $i++)
- {
- $sql .= "'" . $db_values[$i] . "'";
- if($i != (count($db_values) - 1))
+ if(!$result = $db->sql_query($sql))
{
- $sql .= ", ";
+ message_die(GENERAL_ERROR, "Could not insert theme data!", "Error", __LINE__, __FILE__, $sql);
}
- }
- $sql .= ")";
-
- if(!$result = $db->sql_query($sql))
- {
- message_die(GENERAL_ERROR, "Could not insert theme data!", "Error", __LINE__, __FILE__, $sql);
- }
-
- message_die(GENERAL_MESSAGE, $lang['Theme_installed'], $lang['Success']);
+
+ $message = $lang['Theme_installed'] . "<br /><br />" . sprintf($lang['Click_return_styleadmin'], "<a href=\"" . append_sid("admin_styles.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
- }
- else
- {
-
- $installable_themes = array();
-
- if($dir = opendir($phpbb_root_dir . "templates/"))
+ message_die(GENERAL_MESSAGE, $message);
+ }
+ else
{
- while($sub_dir = readdir($dir))
+
+ $installable_themes = array();
+
+ if( $dir = @opendir($phpbb_root_dir . "templates/") )
{
- if($sub_dir != "." && $sub_dir != ".." && $sub_dir != "CVS")
+ while( $sub_dir = @readdir($dir) )
{
- if(file_exists($phpbb_root_dir . "templates/" . $sub_dir . "/theme_info.cfg"))
+ if( $sub_dir != "." && $sub_dir != ".." && $sub_dir != "CVS" )
{
- include($phpbb_root_dir . "templates/" . $sub_dir . "/theme_info.cfg");
-
- for($i = 0; $i < count($$sub_dir); $i++)
+ if( @file_exists($phpbb_root_dir . "templates/" . $sub_dir . "/theme_info.cfg") )
{
- $working_data = $$sub_dir;
+ include($phpbb_root_dir . "templates/" . $sub_dir . "/theme_info.cfg");
- $style_name = $working_data[$i]['style_name'];
-
- $sql = "SELECT themes_id FROM " . THEMES_TABLE . " WHERE style_name = '$style_name'";
- if(!$result = $db->sql_query($sql))
- {
- message_die(GENREAL_ERROR, "Could not query themes table!", "Error", __LINE__, __FILE__, $sql);
- }
- if(!$db->sql_numrows($result))
+ for($i = 0; $i < count($$sub_dir); $i++)
{
- $installable_themes[] = $working_data[$i];
+ $working_data = $$sub_dir;
+
+ $style_name = $working_data[$i]['style_name'];
+
+ $sql = "SELECT themes_id
+ FROM " . THEMES_TABLE . "
+ WHERE style_name = '$style_name'";
+ if(!$result = $db->sql_query($sql))
+ {
+ message_die(GENREAL_ERROR, "Could not query themes table!", "Error", __LINE__, __FILE__, $sql);
+ }
+ if(!$db->sql_numrows($result))
+ {
+ $installable_themes[] = $working_data[$i];
+ }
}
}
}
}
- }
-
- $template->set_filenames(array(
- "body" => "admin/styles_addnew_body.tpl")
- );
-
- $template->assign_vars(array(
- "L_STYLES_TITLE" => $lang['Styles_admin'],
- "L_STYLES_ADD_TEXT" => $lang['Styles_addnew_explain'],
- "L_STYLE" => $lang['Style'],
- "L_TEMPLATE" => $lang['Template'],
- "L_INSTALL" => $lang['Install'],
- "L_ACTION" => $lang['Action'])
- );
- for($i = 0; $i < count($installable_themes); $i++)
- {
- $row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
- $row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
-
- $template->assign_block_vars("styles", array(
- "STYLE_NAME" => $installable_themes[$i]['style_name'],
- "TEMPLATE_NAME" => $installable_themes[$i]['template_name'],
- "ROW_CLASS" => $row_class,
- "ROW_COLOR" => $row_color,
- "U_STYLES_INSTALL" => append_sid("admin_styles.$phpEx?mode=addnew&style=" . urlencode($installable_themes[$i]['style_name']) . "&install_to=" . urlencode($installable_themes[$i]['template_name'])))
+ $template->set_filenames(array(
+ "body" => "admin/styles_addnew_body.tpl")
);
-
- }
- $template->pparse("body");
- }
- closedir($dir);
- }
+ $template->assign_vars(array(
+ "L_STYLES_TITLE" => $lang['Styles_admin'],
+ "L_STYLES_ADD_TEXT" => $lang['Styles_addnew_explain'],
+ "L_STYLE" => $lang['Style'],
+ "L_TEMPLATE" => $lang['Template'],
+ "L_INSTALL" => $lang['Install'],
+ "L_ACTION" => $lang['Action'])
+ );
+
+ for($i = 0; $i < count($installable_themes); $i++)
+ {
+ $row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
+ $row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
-
- break;
+ $template->assign_block_vars("styles", array(
+ "ROW_CLASS" => $row_class,
+ "ROW_COLOR" => "#" . $row_color,
+ "STYLE_NAME" => $installable_themes[$i]['style_name'],
+ "TEMPLATE_NAME" => $installable_themes[$i]['template_name'],
+
+ "U_STYLES_INSTALL" => append_sid("admin_styles.$phpEx?mode=addnew&amp;style=" . urlencode($installable_themes[$i]['style_name']) . "&amp;install_to=" . urlencode($installable_themes[$i]['template_name'])))
+ );
+
+ }
+ $template->pparse("body");
+
+ }
+ closedir($dir);
+ }
+ break;
case "create":
case "edit":
- $submit = (isset($HTTP_POST_VARS['submit'])) ? 1 : 0;
-
- if($submit)
- {
- //
- // DAMN! Thats alot of data to validate...
- //
- $updated['style_name'] = $HTTP_POST_VARS['style_name'];
- $updated['template_name'] = $HTTP_POST_VARS['template_name'];
- $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_link'] = $HTTP_POST_VARS['body_link'];
- $updated['body_vlink'] = $HTTP_POST_VARS['body_vlink'];
- $updated['body_alink'] = $HTTP_POST_VARS['body_alink'];
- $updated['body_hlink'] = $HTTP_POST_VARS['body_hlink'];
- $updated['tr_color1'] = $HTTP_POST_VARS['tr_color1'];
- $updated_name['tr_color1_name'] = $HTTP_POST_VARS['tr_color1_name'];
- $updated['tr_color2'] = $HTTP_POST_VARS['tr_color2'];
- $updated_name['tr_color2_name'] = $HTTP_POST_VARS['tr_color2_name'];
- $updated['tr_color3'] = $HTTP_POST_VARS['tr_color3'];
- $updated_name['tr_color3_name'] = $HTTP_POST_VARS['tr_color3_name'];
- $updated['tr_class1'] = $HTTP_POST_VARS['tr_class1'];
- $updated_name['tr_class1_name'] = $HTTP_POST_VARS['tr_class1_name'];
- $updated['tr_class2'] = $HTTP_POST_VARS['tr_class2'];
- $updated_name['tr_class2_name'] = $HTTP_POST_VARS['tr_class2_name'];
- $updated['tr_class3'] = $HTTP_POST_VARS['tr_class3'];
- $updated_name['tr_class3_name'] = $HTTP_POST_VARS['tr_class3_name'];
- $updated['th_color1'] = $HTTP_POST_VARS['th_color1'];
- $updated_name['th_color1_name'] = $HTTP_POST_VARS['th_color1_name'];
- $updated['th_color2'] = $HTTP_POST_VARS['th_color2'];
- $updated_name['th_color2_name'] = $HTTP_POST_VARS['th_color2_name'];
- $updated['th_color3'] = $HTTP_POST_VARS['th_color3'];
- $updated_name['th_color3_name'] = $HTTP_POST_VARS['th_color3_name'];
- $updated['th_class1'] = $HTTP_POST_VARS['th_class1'];
- $updated_name['th_class1_name'] = $HTTP_POST_VARS['th_class1_name'];
- $updated['td_color1'] = $HTTP_POST_VARS['td_color1'];
- $updated_name['td_color1_name'] = $HTTP_POST_VARS['td_color1_name'];
- $updated['td_color2'] = $HTTP_POST_VARS['td_color2'];
- $updated_name['td_color2_name'] = $HTTP_POST_VARS['td_color2_name'];
- $updated['td_color3'] = $HTTP_POST_VARS['td_color3'];
- $updated_name['td_color3_name'] = $HTTP_POST_VARS['td_color3_name'];
- $updated['td_class1'] = $HTTP_POST_VARS['td_class1'];
- $updated_name['td_class1_name'] = $HTTP_POST_VARS['td_class1_name'];
- $updated['td_class2'] = $HTTP_POST_VARS['td_class2'];
- $updated_name['td_class2_name'] = $HTTP_POST_VARS['td_class2_name'];
- $updated['td_class3'] = $HTTP_POST_VARS['td_class3'];
- $updated_name['td_class3_name'] = $HTTP_POST_VARS['td_class3_name'];
- $updated['fontface1'] = $HTTP_POST_VARS['fontface1'];
- $updated_name['fontface1_name'] = $HTTP_POST_VARS['fontface1_name'];
- $updated['fontface2'] = $HTTP_POST_VARS['fontface2'];
- $updated_name['fontface2_name'] = $HTTP_POST_VARS['fontface2_name'];
- $updated['fontface3'] = $HTTP_POST_VARS['fontface3'];
- $updated_name['fontface3_name'] = $HTTP_POST_VARS['fontface3_name'];
- $updated['fontsize1'] = intval($HTTP_POST_VARS['fontsize1']);
- $updated_name['fontsize1_name'] = $HTTP_POST_VARS['fontsize1_name'];
- $updated['fontsize2'] = intval($HTTP_POST_VARS['fontsize2']);
- $updated_name['fontsize2_name'] = $HTTP_POST_VARS['fontsize2_name'];
- $updated['fontsize3'] = intval($HTTP_POST_VARS['fontsize3']);
- $updated_name['fontsize3_name'] = $HTTP_POST_VARS['fontsize3_name'];
- $updated['fontcolor1'] = $HTTP_POST_VARS['fontcolor1'];
- $updated_name['fontcolor1_name'] = $HTTP_POST_VARS['fontcolor1_name'];
- $updated['fontcolor2'] = $HTTP_POST_VARS['fontcolor2'];
- $updated_name['fontcolor2_name'] = $HTTP_POST_VARS['fontcolor2_name'];
- $updated['fontcolor3'] = $HTTP_POST_VARS['fontcolor3'];
- $updated_name['fontcolor3_name'] = $HTTP_POST_VARS['fontcolor3_name'];
- $updated['span_class1'] = $HTTP_POST_VARS['span_class1'];
- $updated_name['span_class1_name'] = $HTTP_POST_VARS['span_class1_name'];
- $updated['span_class2'] = $HTTP_POST_VARS['span_class2'];
- $updated_name['span_class2_name'] = $HTTP_POST_VARS['span_class2_name'];
- $updated['span_class3'] = $HTTP_POST_VARS['span_class3'];
- $updated_name['span_class3_name'] = $HTTP_POST_VARS['span_class3_name'];
- $style_id = intval($HTTP_POST_VARS['style_id']);
- //
- // Wheeeew! Thank heavens for copy and paste and search and replace :D
- //
+ $submit = (isset($HTTP_POST_VARS['submit'])) ? 1 : 0;
- if($mode == "edit")
+ if($submit)
{
- $sql = "UPDATE " . THEMES_TABLE . " SET ";
- $count = 0;
- while(list($key, $val) = each($updated))
- {
- if($count != 0)
- {
- $sql .= ", ";
- }
- // I don't like this but it'll keep MSSQL from throwing an error and save me alot of typing
- if(stristr($key, "fontsize"))
- {
- $sql .= "$key = $val";
- }
- else
- {
- $sql .= "$key = '$val'";
- }
- $count++;
- }
-
- $sql .= " WHERE themes_id = $style_id";
-
- if(!$result = $db->sql_query($sql))
- {
- message_die(GENERAL_ERROR, "Could not update themes table!", "Error", __LINE__, __FILE__, $sql);
- }
-
+ //
+ // DAMN! Thats alot of data to validate...
//
- // Check if there's a names table entry for this style
+ $updated['style_name'] = $HTTP_POST_VARS['style_name'];
+ $updated['template_name'] = $HTTP_POST_VARS['template_name'];
+ $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_link'] = $HTTP_POST_VARS['body_link'];
+ $updated['body_vlink'] = $HTTP_POST_VARS['body_vlink'];
+ $updated['body_alink'] = $HTTP_POST_VARS['body_alink'];
+ $updated['body_hlink'] = $HTTP_POST_VARS['body_hlink'];
+ $updated['tr_color1'] = $HTTP_POST_VARS['tr_color1'];
+ $updated_name['tr_color1_name'] = $HTTP_POST_VARS['tr_color1_name'];
+ $updated['tr_color2'] = $HTTP_POST_VARS['tr_color2'];
+ $updated_name['tr_color2_name'] = $HTTP_POST_VARS['tr_color2_name'];
+ $updated['tr_color3'] = $HTTP_POST_VARS['tr_color3'];
+ $updated_name['tr_color3_name'] = $HTTP_POST_VARS['tr_color3_name'];
+ $updated['tr_class1'] = $HTTP_POST_VARS['tr_class1'];
+ $updated_name['tr_class1_name'] = $HTTP_POST_VARS['tr_class1_name'];
+ $updated['tr_class2'] = $HTTP_POST_VARS['tr_class2'];
+ $updated_name['tr_class2_name'] = $HTTP_POST_VARS['tr_class2_name'];
+ $updated['tr_class3'] = $HTTP_POST_VARS['tr_class3'];
+ $updated_name['tr_class3_name'] = $HTTP_POST_VARS['tr_class3_name'];
+ $updated['th_color1'] = $HTTP_POST_VARS['th_color1'];
+ $updated_name['th_color1_name'] = $HTTP_POST_VARS['th_color1_name'];
+ $updated['th_color2'] = $HTTP_POST_VARS['th_color2'];
+ $updated_name['th_color2_name'] = $HTTP_POST_VARS['th_color2_name'];
+ $updated['th_color3'] = $HTTP_POST_VARS['th_color3'];
+ $updated_name['th_color3_name'] = $HTTP_POST_VARS['th_color3_name'];
+ $updated['th_class1'] = $HTTP_POST_VARS['th_class1'];
+ $updated_name['th_class1_name'] = $HTTP_POST_VARS['th_class1_name'];
+ $updated['td_color1'] = $HTTP_POST_VARS['td_color1'];
+ $updated_name['td_color1_name'] = $HTTP_POST_VARS['td_color1_name'];
+ $updated['td_color2'] = $HTTP_POST_VARS['td_color2'];
+ $updated_name['td_color2_name'] = $HTTP_POST_VARS['td_color2_name'];
+ $updated['td_color3'] = $HTTP_POST_VARS['td_color3'];
+ $updated_name['td_color3_name'] = $HTTP_POST_VARS['td_color3_name'];
+ $updated['td_class1'] = $HTTP_POST_VARS['td_class1'];
+ $updated_name['td_class1_name'] = $HTTP_POST_VARS['td_class1_name'];
+ $updated['td_class2'] = $HTTP_POST_VARS['td_class2'];
+ $updated_name['td_class2_name'] = $HTTP_POST_VARS['td_class2_name'];
+ $updated['td_class3'] = $HTTP_POST_VARS['td_class3'];
+ $updated_name['td_class3_name'] = $HTTP_POST_VARS['td_class3_name'];
+ $updated['fontface1'] = $HTTP_POST_VARS['fontface1'];
+ $updated_name['fontface1_name'] = $HTTP_POST_VARS['fontface1_name'];
+ $updated['fontface2'] = $HTTP_POST_VARS['fontface2'];
+ $updated_name['fontface2_name'] = $HTTP_POST_VARS['fontface2_name'];
+ $updated['fontface3'] = $HTTP_POST_VARS['fontface3'];
+ $updated_name['fontface3_name'] = $HTTP_POST_VARS['fontface3_name'];
+ $updated['fontsize1'] = intval($HTTP_POST_VARS['fontsize1']);
+ $updated_name['fontsize1_name'] = $HTTP_POST_VARS['fontsize1_name'];
+ $updated['fontsize2'] = intval($HTTP_POST_VARS['fontsize2']);
+ $updated_name['fontsize2_name'] = $HTTP_POST_VARS['fontsize2_name'];
+ $updated['fontsize3'] = intval($HTTP_POST_VARS['fontsize3']);
+ $updated_name['fontsize3_name'] = $HTTP_POST_VARS['fontsize3_name'];
+ $updated['fontcolor1'] = $HTTP_POST_VARS['fontcolor1'];
+ $updated_name['fontcolor1_name'] = $HTTP_POST_VARS['fontcolor1_name'];
+ $updated['fontcolor2'] = $HTTP_POST_VARS['fontcolor2'];
+ $updated_name['fontcolor2_name'] = $HTTP_POST_VARS['fontcolor2_name'];
+ $updated['fontcolor3'] = $HTTP_POST_VARS['fontcolor3'];
+ $updated_name['fontcolor3_name'] = $HTTP_POST_VARS['fontcolor3_name'];
+ $updated['span_class1'] = $HTTP_POST_VARS['span_class1'];
+ $updated_name['span_class1_name'] = $HTTP_POST_VARS['span_class1_name'];
+ $updated['span_class2'] = $HTTP_POST_VARS['span_class2'];
+ $updated_name['span_class2_name'] = $HTTP_POST_VARS['span_class2_name'];
+ $updated['span_class3'] = $HTTP_POST_VARS['span_class3'];
+ $updated_name['span_class3_name'] = $HTTP_POST_VARS['span_class3_name'];
+ $style_id = intval($HTTP_POST_VARS['style_id']);
+ //
+ // Wheeeew! Thank heavens for copy and paste and search and replace :D
//
- $sql = "SELECT themes_id FROM " . THEMES_NAME_TABLE . " WHERE themes_id = $style_id";
- if(!$result = $db->sql_query($sql))
- {
- message_die(GENERAL_ERROR, "Could not get data from themes_name table", "Error", __LINE__, __FILE__, $sql);
- }
-
-
- if($db->sql_numrows($result) > 0)
+ if($mode == "edit")
{
- $sql = "UPDATE " . THEMES_NAME_TABLE . " SET ";
+ $sql = "UPDATE " . THEMES_TABLE . " SET ";
$count = 0;
- while(list($key, $val) = each($updated_name))
+
+ while(list($key, $val) = each($updated))
{
if($count != 0)
{
$sql .= ", ";
}
-
- $sql .= "$key = '$val'";
-
+
+ //
+ // I don't like this but it'll keep MSSQL from throwing
+ // an error and save me alot of typing
+ //
+ $sql .= ( stristr($key, "fontsize") ) ? "$key = $val" : "$key = '$val'";
+
$count++;
}
$sql .= " WHERE themes_id = $style_id";
+
+ if(!$result = $db->sql_query($sql))
+ {
+ message_die(GENERAL_ERROR, "Could not update themes table!", "Error", __LINE__, __FILE__, $sql);
+ }
+
+ //
+ // Check if there's a names table entry for this style
+ //
+ $sql = "SELECT themes_id
+ FROM " . THEMES_NAME_TABLE . "
+ WHERE themes_id = $style_id";
+ if(!$result = $db->sql_query($sql))
+ {
+ message_die(GENERAL_ERROR, "Could not get data from themes_name table", "Error", __LINE__, __FILE__, $sql);
+ }
+
+ if($db->sql_numrows($result) > 0)
+ {
+ $sql = "UPDATE " . THEMES_NAME_TABLE . "
+ SET ";
+ $count = 0;
+ while(list($key, $val) = each($updated_name))
+ {
+ if($count != 0)
+ {
+ $sql .= ", ";
+ }
+
+ $sql .= "$key = '$val'";
+
+ $count++;
+ }
+
+ $sql .= " WHERE themes_id = $style_id";
+ }
+ else
+ {
+ //
+ // Nope, no names entry so we create a new one.
+ //
+ $sql = "INSERT INTO " . THEMES_NAME_TABLE . " (themes_id, ";
+ while(list($key, $val) = each($updated_name))
+ {
+ $fields[] = $key;
+ $vals[] = $val;
+ }
+
+ for($i = 0; $i < count($fields); $i++)
+ {
+ if($i > 0)
+ {
+ $sql .= ", ";
+ }
+ $sql .= $fields[$i];
+ }
+
+ $sql .= ") VALUES ($style_id, ";
+ for($i = 0; $i < count($vals); $i++)
+ {
+ if($i > 0)
+ {
+ $sql .= ", ";
+ }
+ $sql .= "'" . $vals[$i] . "'";
+ }
+
+ $sql .= ")";
+ }
+
+ if(!$result = $db->sql_query($sql))
+ {
+ message_die(GENERAL_ERROR, "Could not update themes name table!", "Error", __LINE__, __FILE__, $sql);
+ }
+
+ $message = $lang['Theme_updated'] . "<br /><br />" . sprintf($lang['Click_return_styleadmin'], "<a href=\"" . append_sid("admin_styles.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
+
+ message_die(GENERAL_MESSAGE, $message);
}
else
{
- // Nope, no names entry so we create a new one.
+ while(list($key, $val) = each($updated))
+ {
+ $field_names[] = $key;
+
+ if(stristr($key, "fontsize"))
+ {
+ $values[] = "$val";
+ }
+ else
+ {
+ $values[] = "'$val'";
+ }
+ }
+
+ $sql = "INSERT INTO " . THEMES_TABLE . " (";
+ for($i = 0; $i < count($field_names); $i++)
+ {
+ if($i != 0)
+ {
+ $sql .= ", ";
+ }
+ $sql .= $field_names[$i];
+ }
+
+ $sql .= ") VALUES (";
+ for($i = 0; $i < count($values); $i++)
+ {
+ if($i != 0)
+ {
+ $sql .= ", ";
+ }
+ $sql .= $values[$i];
+ }
+ $sql .= ")";
+
+ if(!$result = $db->sql_query($sql))
+ {
+ message_die(GENERAL_ERROR, "Could not update themes table!", "Error", __LINE__, __FILE__, $sql);
+ }
+
+ $style_id = $db->sql_nextid();
+
+ //
+ // Insert names data
+ //
$sql = "INSERT INTO " . THEMES_NAME_TABLE . " (themes_id, ";
while(list($key, $val) = each($updated_name))
{
$fields[] = $key;
$vals[] = $val;
}
+
for($i = 0; $i < count($fields); $i++)
{
if($i > 0)
@@ -344,432 +438,341 @@ switch($mode)
{
if($i > 0)
{
- $sql .= ", ";
+ $sql .= ", ";
}
- $sql .= "'" . $vals[$i] . "'";
+ $sql .= "'" . $vals[$i] . "'";
}
$sql .= ")";
+
+ if(!$result = $db->sql_query($sql))
+ {
+ message_die(GENERAL_ERROR, "Could not insert themes name table!", "Error", __LINE__, __FILE__, $sql);
+ }
+
+ $message = $lang['Theme_created'] . "<br /><br />" . sprintf($lang['Click_return_styleadmin'], "<a href=\"" . append_sid("admin_styles.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
+
+ message_die(GENERAL_MESSAGE, $message);
}
-
- if(!$result = $db->sql_query($sql))
- {
- message_die(GENERAL_ERROR, "Could not update themes name table!", "Error", __LINE__, __FILE__, $sql);
- }
-
- message_die(GENERAL_MESSAGE, $lang['Theme_updated'], $lang['Success']);
}
else
{
- while(list($key, $val) = each($updated))
- {
- $field_names[] = $key;
-
- if(stristr($key, "fontsize"))
- {
- $values[] = "$val";
- }
- else
- {
- $values[] = "'$val'";
- }
- }
-
- $sql = "INSERT INTO " . THEMES_TABLE . " (";
- for($i = 0; $i < count($field_names); $i++)
+ if($mode == "edit")
{
- if($i != 0)
+ $themes_title = $lang['Edit_theme'];
+ $themes_explain = $lang['Edit_theme_explain'];
+
+ $style_id = $HTTP_GET_VARS['style_id'];
+
+ //
+ // Fetch the Theme Info from the db
+ //
+ $sql = "SELECT *
+ FROM " . THEMES_TABLE . "
+ WHERE themes_id = $style_id";
+ if(!$result = $db->sql_query($sql))
{
- $sql .= ", ";
+ message_die(GENERAL_ERROR, "Could not get data from themes table", "Error", __LINE__, __FILE__, $sql);
}
- $sql .= $field_names[$i];
- }
-
- $sql .= ") VALUES (";
- for($i = 0; $i < count($values); $i++)
- {
- if($i != 0)
+
+ $selected_values = $db->sql_fetchrow($result);
+
+ //
+ // Fetch the Themes Name data
+ //
+ $sql = "SELECT *
+ FROM " . THEMES_NAME_TABLE . "
+ WHERE themes_id = $style_id";
+ if(!$result = $db->sql_query($sql))
{
- $sql .= ", ";
+ message_die(GENERAL_ERROR, "Could not get data from themes name table", "Error", __LINE__, __FILE__, $sql);
}
- $sql .= $values[$i];
+
+ $selected_names = $db->sql_fetchrow($result);
+
+ $selected = array_merge($selected_values, $selected_names);
+
+ $s_hidden_fields = '<input type="hidden" name="style_id" value="' . $style_id . '" />';
}
- $sql .= ")";
-
- if(!$result = $db->sql_query($sql))
+ else
{
- message_die(GENERAL_ERROR, "Could not update themes table!", "Error", __LINE__, __FILE__, $sql);
+ $themes_title = $lang['Create_theme'];
+ $themes_explain = $lang['Create_theme_explain'];
}
- $style_id = $db->sql_nextid();
-
- //
- // Insert names data
- //
- $sql = "INSERT INTO " . THEMES_NAME_TABLE . " (themes_id, ";
- while(list($key, $val) = each($updated_name))
- {
- $fields[] = $key;
- $vals[] = $val;
- }
- for($i = 0; $i < count($fields); $i++)
- {
- if($i > 0)
- {
- $sql .= ", ";
- }
- $sql .= $fields[$i];
- }
+ $template->set_filenames(array(
+ "body" => "admin/styles_edit_body.tpl")
+ );
- $sql .= ") VALUES ($style_id, ";
- for($i = 0; $i < count($vals); $i++)
- {
- if($i > 0)
- {
- $sql .= ", ";
+ if( $dir = @opendir($phpbb_root_path . 'templates/') )
+ {
+ $s_template_select = '<select name="template_name">';
+ while( $file = @readdir($dir) )
+ {
+ if($file != "." && $file != ".." && $file != "CVS")
+ {
+ if($file == $selected['template_name'])
+ {
+ $s_template_select .= '<option value="' . $file . '" selected="1">' . $file . "</option>\n";
+ }
+ else
+ {
+ $s_template_select .= '<option value="' . $file . '">' . $file . "</option>\n";
+ }
+ }
}
- $sql .= "'" . $vals[$i] . "'";
}
-
- $sql .= ")";
-
- if(!$result = $db->sql_query($sql))
+ else
{
- message_die(GENERAL_ERROR, "Could not insert themes name table!", "Error", __LINE__, __FILE__, $sql);
+ message_die(GENERAL_MESSAGE, $lang['No_template_dir']);
}
+
+ $s_hidden_fields .= '<input type="hidden" name="mode" value="' . $mode . '" />';
+
+ $template->assign_vars(array(
+ "L_THEMES_TITLE" => $themes_title,
+ "L_THEMES_EXPLAIN" => $themes_explain,
+ "L_THEME_NAME" => $lang['Theme_name'],
+ "L_TEMPLATE" => $lang['Template'],
+ "L_THEME_SETTINGS" => $lang['Theme_settings'],
+ "L_THEME_ELEMENT" => $lang['Theme_element'],
+ "L_SIMPLE_NAME" => $lang['Simple_name'],
+ "L_VALUE" => $lang['Value'],
+ "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_TR_COLOR1" => $lang['Tr_color1'],
+ "L_TR_COLOR2" => $lang['Tr_color2'],
+ "L_TR_COLOR3" => $lang['Tr_color3'],
+ "L_TR_CLASS1" => $lang['Tr_class1'],
+ "L_TR_CLASS2" => $lang['Tr_class2'],
+ "L_TR_CLASS3" => $lang['Tr_class3'],
+ "L_TH_COLOR1" => $lang['Th_color1'],
+ "L_TH_COLOR2" => $lang['Th_color2'],
+ "L_TH_COLOR3" => $lang['Th_color3'],
+ "L_TH_CLASS1" => $lang['Th_class1'],
+ "L_TH_CLASS2" => $lang['Th_class2'],
+ "L_TH_CLASS3" => $lang['Th_class3'],
+ "L_TD_COLOR1" => $lang['Td_color1'],
+ "L_TD_COLOR2" => $lang['Td_color2'],
+ "L_TD_COLOR3" => $lang['Td_color3'],
+ "L_TD_CLASS1" => $lang['Td_class1'],
+ "L_TD_CLASS2" => $lang['Td_class2'],
+ "L_TD_CLASS3" => $lang['Td_class3'],
+ "L_FONTFACE_1" => $lang['fontface1'],
+ "L_FONTFACE_2" => $lang['fontface2'],
+ "L_FONTFACE_3" => $lang['fontface3'],
+ "L_FONTSIZE_1" => $lang['fontsize1'],
+ "L_FONTSIZE_2" => $lang['fontsize2'],
+ "L_FONTSIZE_3" => $lang['fontsize3'],
+ "L_FONTCOLOR_1" => $lang['fontcolor1'],
+ "L_FONTCOLOR_2" => $lang['fontcolor2'],
+ "L_FONTCOLOR_3" => $lang['fontcolor3'],
+ "L_SPAN_CLASS_1" => $lang['span_class1'],
+ "L_SPAN_CLASS_2" => $lang['span_class2'],
+ "L_SPAN_CLASS_3" => $lang['span_class3'],
+
+ "THEME_NAME" => $selected['style_name'],
+ "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'],
+ "TR_COLOR1" => $selected['tr_color1'],
+ "TR_COLOR2" => $selected['tr_color2'],
+ "TR_COLOR3" => $selected['tr_color3'],
+ "TR_CLASS1" => $selected['tr_class1'],
+ "TR_CLASS2" => $selected['tr_class2'],
+ "TR_CLASS3" => $selected['tr_class3'],
+ "TH_COLOR1" => $selected['th_color1'],
+ "TH_COLOR2" => $selected['th_color2'],
+ "TH_COLOR3" => $selected['th_color3'],
+ "TH_CLASS1" => $selected['th_class1'],
+ "TH_CLASS2" => $selected['th_class2'],
+ "TH_CLASS3" => $selected['th_class3'],
+ "TD_COLOR1" => $selected['td_color1'],
+ "TD_COLOR2" => $selected['td_color2'],
+ "TD_COLOR3" => $selected['td_color3'],
+ "TD_CLASS1" => $selected['td_class1'],
+ "TD_CLASS2" => $selected['td_class2'],
+ "TD_CLASS3" => $selected['td_class3'],
+ "FONTFACE1" => $selected['fontface1'],
+ "FONTFACE2" => $selected['fontface2'],
+ "FONTFACE3" => $selected['fontface3'],
+ "FONTSIZE1" => $selected['fontsize1'],
+ "FONTSIZE2" => $selected['fontsize2'],
+ "FONTSIZE3" => $selected['fontsize3'],
+ "FONTCOLOR1" => $selected['fontcolor1'],
+ "FONTCOLOR2" => $selected['fontcolor2'],
+ "FONTCOLOR3" => $selected['fontcolor3'],
+ "SPAN_CLASS1" => $selected['span_class1'],
+ "SPAN_CLASS2" => $selected['span_class2'],
+ "SPAN_CLASS3" => $selected['span_class3'],
+
+ "TR_COLOR1_NAME" => $selected['tr_color1_name'],
+ "TR_COLOR2_NAME" => $selected['tr_color2_name'],
+ "TR_COLOR3_NAME" => $selected['tr_color3_name'],
+ "TR_CLASS1_NAME" => $selected['tr_class1_name'],
+ "TR_CLASS2_NAME" => $selected['tr_class2_name'],
+ "TR_CLASS3_NAME" => $selected['tr_class3_name'],
+ "TH_COLOR1_NAME" => $selected['th_color1_name'],
+ "TH_COLOR2_NAME" => $selected['th_color2_name'],
+ "TH_COLOR3_NAME" => $selected['th_color3_name'],
+ "TH_CLASS1_NAME" => $selected['th_class1_name'],
+ "TH_CLASS2_NAME" => $selected['th_class2_name'],
+ "TH_CLASS3_NAME" => $selected['th_class3_name'],
+ "TD_COLOR1_NAME" => $selected['td_color1_name'],
+ "TD_COLOR2_NAME" => $selected['td_color2_name'],
+ "TD_COLOR3_NAME" => $selected['td_color3_name'],
+ "TD_CLASS1_NAME" => $selected['td_class1_name'],
+ "TD_CLASS2_NAME" => $selected['td_class2_name'],
+ "TD_CLASS3_NAME" => $selected['td_class3_name'],
+ "FONTFACE1_NAME" => $selected['fontface1_name'],
+ "FONTFACE2_NAME" => $selected['fontface2_name'],
+ "FONTFACE3_NAME" => $selected['fontface3_name'],
+ "FONTSIZE1_NAME" => $selected['fontsize1_name'],
+ "FONTSIZE2_NAME" => $selected['fontsize2_name'],
+ "FONTSIZE3_NAME" => $selected['fontsize3_name'],
+ "FONTCOLOR1_NAME" => $selected['fontcolor1_name'],
+ "FONTCOLOR2_NAME" => $selected['fontcolor2_name'],
+ "FONTCOLOR3_NAME" => $selected['fontcolor3_name'],
+ "SPAN_CLASS1_NAME" => $selected['span_class1_name'],
+ "SPAN_CLASS2_NAME" => $selected['span_class2_name'],
+ "SPAN_CLASS3_NAME" => $selected['span_class3_name'],
+
+ "S_THEME_ACTION" => append_sid("admin_styles.$phpEx"),
+ "S_TEMPLATE_SELECT" => $s_template_select,
+ "S_HIDDEN_FIELDS" => $s_hidden_fields)
+ );
-
- message_die(GENERAL_MESSAGE, $lang['Theme_created'], $lang['Success']);
-
+ $template->pparse("body");
}
-
-
-
-
-
-
+ break;
-
- }
- else
- {
- if($mode == "edit")
+ case "export";
+ if($HTTP_POST_VARS['export_template'])
{
- $themes_title = $lang['Edit_theme'];
- $themes_explain = $lang['Edit_theme_explain'];
-
- $style_id = $HTTP_GET_VARS['style_id'];
-
- //
- // Fetch the Theme Info from the db
- //
- $sql = "SELECT * FROM " . THEMES_TABLE . " WHERE themes_id = $style_id";
+ $template_name = $HTTP_POST_VARS['export_template'];
+
+ $sql = "SELECT *
+ FROM " . THEMES_TABLE . "
+ WHERE template_name = '$template_name'";
if(!$result = $db->sql_query($sql))
{
- message_die(GENERAL_ERROR, "Could not get data from themes table", "Error", __LINE__, __FILE__, $sql);
+ message_die(GENERAL_ERROR, "Could not get theme data for selected template", "", __LINE__, __FILE__, $sql);
}
- $selected_values = $db->sql_fetchrow($result);
+ $theme_rowset = $db->sql_fetchrowset($result);
- //
- // Fetch the Themes Name data
- //
- $sql = "SELECT * FROM " . THEMES_NAME_TABLE . " WHERE themes_id = $style_id";
- if(!$result = $db->sql_query($sql))
+ if( count($theme_rowset) == 0 )
{
- message_die(GENERAL_ERROR, "Could not get data from themes name table", "Error", __LINE__, __FILE__, $sql);
+ message_die(GENERAL_MESSAGE, $lang['No_themes']);
}
- $selected_names = $db->sql_fetchrow($result);
+ $theme_data = '<?php'."\n\n";
+ $theme_data .= "//\n// phpBB 2.x auto-generated theme config file for $template_name\n// Do not change anything in this file!\n//\n\n";
- $selected = array_merge($selected_values, $selected_names);
-
- $s_hidden_fields = '<input type="hidden" name="style_id" value="' . $style_id . '" />';
- }
- else
- {
- $themes_title = $lang['Create_theme'];
- $themes_explain = $lang['Create_theme_explain'];
- }
-
- $template->set_filenames(array(
- "body" => "admin/styles_edit_body.tpl")
- );
-
-
- if($dir = opendir($phpbb_root_path . 'templates/'))
- {
- $s_template_select = '<select name="template_name">';
- while($file = readdir($dir))
- {
- if($file != "." && $file != ".." && $file != "CVS")
+ for($i = 0; $i < count($theme_rowset); $i++)
+ {
+ while(list($key, $val) = each($theme_rowset[$i]))
{
- if($file == $selected['template_name'])
- {
- $s_template_select .= '<option value="' . $file . '" selected="1">' . $file . "</option>\n";
- }
- else
+ if(!intval($key) && $key != "0" && $key != "themes_id")
{
- $s_template_select .= '<option value="' . $file . '">' . $file . "</option>\n";
+ $theme_data .= '$' . $template_name . "[$i]['$key'] = \"$val\";\n";
}
}
+ $theme_data .= "\n";
}
- }
- else
- {
- message_die(GENERAL_ERROR, $lang['No_template_dir'], $lang['Error'], __LINE__, __FILE__);
- }
-
- $s_hidden_fields .= '<input type="hidden" name="mode" value="' . $mode . '" />';
- $template->assign_vars(array(
- "L_THEMES_TITLE" => $themes_title,
- "L_THEMES_EXPLAIN" => $themes_explain,
- "S_THEME_ACTION" => append_sid("$PHP_SELF"),
- "L_THEME_NAME" => $lang['Theme_name'],
- "L_TEMPLATE" => $lang['Template'],
- "L_THEME_SETTINGS" => $lang['Theme_settings'],
- "L_THEME_ELEMENT" => $lang['Theme_element'],
- "L_SIMPLE_NAME" => $lang['Simple_name'],
- "L_VALUE" => $lang['Value'],
- "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_TR_COLOR1" => $lang['Tr_color1'],
- "L_TR_COLOR2" => $lang['Tr_color2'],
- "L_TR_COLOR3" => $lang['Tr_color3'],
- "L_TR_CLASS1" => $lang['Tr_class1'],
- "L_TR_CLASS2" => $lang['Tr_class2'],
- "L_TR_CLASS3" => $lang['Tr_class3'],
- "L_TH_COLOR1" => $lang['Th_color1'],
- "L_TH_COLOR2" => $lang['Th_color2'],
- "L_TH_COLOR3" => $lang['Th_color3'],
- "L_TH_CLASS1" => $lang['Th_class1'],
- "L_TH_CLASS2" => $lang['Th_class2'],
- "L_TH_CLASS3" => $lang['Th_class3'],
- "L_TD_COLOR1" => $lang['Td_color1'],
- "L_TD_COLOR2" => $lang['Td_color2'],
- "L_TD_COLOR3" => $lang['Td_color3'],
- "L_TD_CLASS1" => $lang['Td_class1'],
- "L_TD_CLASS2" => $lang['Td_class2'],
- "L_TD_CLASS3" => $lang['Td_class3'],
- "L_FONTFACE_1" => $lang['fontface1'],
- "L_FONTFACE_2" => $lang['fontface2'],
- "L_FONTFACE_3" => $lang['fontface3'],
- "L_FONTSIZE_1" => $lang['fontsize1'],
- "L_FONTSIZE_2" => $lang['fontsize2'],
- "L_FONTSIZE_3" => $lang['fontsize3'],
- "L_FONTCOLOR_1" => $lang['fontcolor1'],
- "L_FONTCOLOR_2" => $lang['fontcolor2'],
- "L_FONTCOLOR_3" => $lang['fontcolor3'],
- "L_SPAN_CLASS_1" => $lang['span_class1'],
- "L_SPAN_CLASS_2" => $lang['span_class2'],
- "L_SPAN_CLASS_3" => $lang['span_class3'],
- "S_TEMPLATE_SELECT" => $s_template_select,
- "THEME_NAME" => $selected['style_name'],
- "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'],
- "TR_COLOR1" => $selected['tr_color1'],
- "TR_COLOR2" => $selected['tr_color2'],
- "TR_COLOR3" => $selected['tr_color3'],
- "TR_CLASS1" => $selected['tr_class1'],
- "TR_CLASS2" => $selected['tr_class2'],
- "TR_CLASS3" => $selected['tr_class3'],
- "TH_COLOR1" => $selected['th_color1'],
- "TH_COLOR2" => $selected['th_color2'],
- "TH_COLOR3" => $selected['th_color3'],
- "TH_CLASS1" => $selected['th_class1'],
- "TH_CLASS2" => $selected['th_class2'],
- "TH_CLASS3" => $selected['th_class3'],
- "TD_COLOR1" => $selected['td_color1'],
- "TD_COLOR2" => $selected['td_color2'],
- "TD_COLOR3" => $selected['td_color3'],
- "TD_CLASS1" => $selected['td_class1'],
- "TD_CLASS2" => $selected['td_class2'],
- "TD_CLASS3" => $selected['td_class3'],
- "FONTFACE1" => $selected['fontface1'],
- "FONTFACE2" => $selected['fontface2'],
- "FONTFACE3" => $selected['fontface3'],
- "FONTSIZE1" => $selected['fontsize1'],
- "FONTSIZE2" => $selected['fontsize2'],
- "FONTSIZE3" => $selected['fontsize3'],
- "FONTCOLOR1" => $selected['fontcolor1'],
- "FONTCOLOR2" => $selected['fontcolor2'],
- "FONTCOLOR3" => $selected['fontcolor3'],
- "SPAN_CLASS1" => $selected['span_class1'],
- "SPAN_CLASS2" => $selected['span_class2'],
- "SPAN_CLASS3" => $selected['span_class3'],
-
- "TR_COLOR1_NAME" => $selected['tr_color1_name'],
- "TR_COLOR2_NAME" => $selected['tr_color2_name'],
- "TR_COLOR3_NAME" => $selected['tr_color3_name'],
- "TR_CLASS1_NAME" => $selected['tr_class1_name'],
- "TR_CLASS2_NAME" => $selected['tr_class2_name'],
- "TR_CLASS3_NAME" => $selected['tr_class3_name'],
- "TH_COLOR1_NAME" => $selected['th_color1_name'],
- "TH_COLOR2_NAME" => $selected['th_color2_name'],
- "TH_COLOR3_NAME" => $selected['th_color3_name'],
- "TH_CLASS1_NAME" => $selected['th_class1_name'],
- "TH_CLASS2_NAME" => $selected['th_class2_name'],
- "TH_CLASS3_NAME" => $selected['th_class3_name'],
- "TD_COLOR1_NAME" => $selected['td_color1_name'],
- "TD_COLOR2_NAME" => $selected['td_color2_name'],
- "TD_COLOR3_NAME" => $selected['td_color3_name'],
- "TD_CLASS1_NAME" => $selected['td_class1_name'],
- "TD_CLASS2_NAME" => $selected['td_class2_name'],
- "TD_CLASS3_NAME" => $selected['td_class3_name'],
- "FONTFACE1_NAME" => $selected['fontface1_name'],
- "FONTFACE2_NAME" => $selected['fontface2_name'],
- "FONTFACE3_NAME" => $selected['fontface3_name'],
- "FONTSIZE1_NAME" => $selected['fontsize1_name'],
- "FONTSIZE2_NAME" => $selected['fontsize2_name'],
- "FONTSIZE3_NAME" => $selected['fontsize3_name'],
- "FONTCOLOR1_NAME" => $selected['fontcolor1_name'],
- "FONTCOLOR2_NAME" => $selected['fontcolor2_name'],
- "FONTCOLOR3_NAME" => $selected['fontcolor3_name'],
- "SPAN_CLASS1_NAME" => $selected['span_class1_name'],
- "SPAN_CLASS2_NAME" => $selected['span_class2_name'],
- "SPAN_CLASS3_NAME" => $selected['span_class3_name'],
-
- "S_HIDDEN_FIELDS" => $s_hidden_fields)
- );
-
-
- $template->pparse("body");
+ $theme_data .= '?' . '>'; // Done this to prevent highlighting editors getting confused!
-
-
-
- }
-
- break;
- case "export";
-
- if($HTTP_POST_VARS['export_template'])
- {
- $template_name = $HTTP_POST_VARS['export_template'];
- $sql = "SELECT * FROM " . THEMES_TABLE . " WHERE template_name = '$template_name'";
-
- if(!$result = $db->sql_query($sql))
- {
- message_die(GENERAL_ERROR, "Could not get theme data for selected template", "Error", __LINE__, __FILE__, $sql);
- }
-
- $theme_rowset = $db->sql_fetchrowset($result);
-
- if(count($theme_rowset) == 0)
- {
- message_die(GENERAL_MESSAGE, $lang['No_themes'], $lang['Export_themes']);
- }
-
- $theme_data = '<?php'."\n\n";
- $theme_data .= "//\n// phpBB 2.x auto-generated theme config file for $template_name\n// Do not change anything in this file!\n//\n\n";
+ @umask(0111);
+ $fp = @fopen($phpbb_root_path . 'templates/' . $template_name . '/theme_info.cfg', 'w');
- for($i = 0; $i < count($theme_rowset); $i++)
- {
- while(list($key, $val) = each($theme_rowset[$i]))
+ if( !$fp )
{
- if(!intval($key) && $key != "0" && $key != "themes_id")
- {
- $theme_data .= '$' . $template_name . "[$i]['$key'] = \"$val\";\n";
- }
- }
- $theme_data .= "\n";
- }
-
- $theme_data .= '?' . '>'; // Done this to prevent highlighting editors getting confused!
-
-
- @umask(0111);
+ //
+ // Unable to open the file writeable do something here as an attempt
+ // to get around that...
+ //
+ $s_hidden_fields = '<input type="hidden" name="theme_info" value="' . htmlspecialchars($theme_data) . '" />';
+ $s_hidden_fields .= '<input type="hidden" name="send_file" value="1" /><input type="hidden" name="mode" value="export" />';
+
+ $download_form = '<form action="' . append_sid("admin_styles.$phpEx") . '" method="post"><input type="submit" name="submit" value="' . $lang['Download'] . '" />' . $s_hidden_fields;
- $fp = @fopen($phpbb_root_path . 'templates/' . $template_name . '/theme_info.cfg', 'w');
- if( !$fp )
- {
- //
- // Unable to open the file writeable do something here as an attempt
- // to get around that...
- //
- $s_hidden_fields = '<input type="hidden" name="theme_info" value="' . htmlspecialchars($theme_data) . '" />';
- $s_hidden_fields .= '<input type="hidden" name="send_file" value="1" /><input type="hidden" name="mode" value="export" />';
-
- $download_form = '<form action="'. append_sid("admin_styles.$phpEx") .'" method="POST"><input type="submit" name="submit" value="' . $lang['Download'] . '" />' . $s_hidden_fields;
- $template->set_filenames(array(
- "body" => "message_body.tpl")
- );
+ $template->set_filenames(array(
+ "body" => "message_body.tpl")
+ );
- $template->assign_vars(array(
- "MESSAGE_TITLE" => $lang['Export_themes'],
- "MESSAGE_TEXT" => $lang['Download_theme_cfg'] . "<br />" . $download_form)
- );
+ $template->assign_vars(array(
+ "MESSAGE_TITLE" => $lang['Export_themes'],
+ "MESSAGE_TEXT" => $lang['Download_theme_cfg'] . "<br /><br />" . $download_form)
+ );
- $template->pparse('body');
- exit();
- }
+ $template->pparse('body');
+ exit();
+ }
- $result = @fputs($fp, $theme_data, strlen($theme_data));
- fclose($fp);
-
- message_die(GENERAL_MESSAGE, $lang['Theme_info_saved'], $lang['Success']);
+ $result = @fputs($fp, $theme_data, strlen($theme_data));
+ fclose($fp);
+
+ $message = $lang['Theme_info_saved'] . "<br /><br />" . sprintf($lang['Click_return_styleadmin'], "<a href=\"" . append_sid("admin_styles.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
+ message_die(GENERAL_MESSAGE, $message);
- }
- else if($HTTP_POST_VARS['send_file'])
- {
-
- header("Content-Type: text/x-delimtext; name=\"theme_info.cfg\"");
- header("Content-disposition: attachment; filename=theme_info.cfg");
- if( get_magic_quotes_gpc() )
+ }
+ else if($HTTP_POST_VARS['send_file'])
{
- $HTTP_POST_VARS['theme_info'] = stripslashes($HTTP_POST_VARS['theme_info']);
+
+ header("Content-Type: text/x-delimtext; name=\"theme_info.cfg\"");
+ header("Content-disposition: attachment; filename=theme_info.cfg");
+
+ echo stripslashes($HTTP_POST_VARS['theme_info']);
}
- echo $HTTP_POST_VARS['theme_info'];
- }
- else
- {
- $template->set_filenames(array(
- "body" => "admin/styles_exporter.tpl")
- );
-
- if($dir = opendir($phpbb_root_path . 'templates/'))
- {
- $s_template_select = '<select name="export_template">';
- while($file = readdir($dir))
+ else
+ {
+ $template->set_filenames(array(
+ "body" => "admin/styles_exporter.tpl")
+ );
+
+ if( $dir = @opendir($phpbb_root_path . 'templates/') )
{
- if($file != "." && $file != ".." && $file != "CVS")
- {
- $s_template_select .= '<option value="' . $file . '">' . $file . "</option>\n";
+ $s_template_select = '<select name="export_template">';
+ while( $file = @readdir($dir) )
+ {
+ if( $file != "." && $file != ".." && $file != "CVS" )
+ {
+ $s_template_select .= '<option value="' . $file . '">' . $file . "</option>\n";
+ }
}
}
+ else
+ {
+ message_die(GENERAL_MESSAGE, $lang['No_template_dir']);
+ }
+
+ $template->assign_vars(array(
+ "L_STYLE_EXPORTER" => $lang['Export_themes'],
+ "L_EXPORTER_EXPLAIN" => $lang['Export_explain'],
+ "L_TEMPLATE_SELECT" => $lang['Select_template'],
+ "L_SUBMIT" => $lang['Submit'],
+
+ "S_EXPORTER_ACTION" => append_sid("admin_styles.$phpEx?mode=export"),
+ "S_TEMPLATE_SELECT" => $s_template_select)
+ );
+
+ $template->pparse("body");
+
}
- else
- {
- message_die(GENERAL_ERROR, $lang['No_template_dir'], $lang['Error'], __LINE__, __FILE__);
- }
-
- $template->assign_vars(array(
- "L_STYLE_EXPORTER" => $lang['Export_themes'],
- "L_EXPORTER_EXPLAIN" => $lang['Export_explain'],
- "S_EXPORTER_ACTION" => append_sid("$PHP_SELF?mode=export"),
- "L_TEMPLATE_SELECT" => $lang['Select_template'],
- "S_TEMPLATE_SELECT" => $s_template_select,
- "L_SUBMIT" => $lang['Submit'])
- );
-
- $template->pparse("body");
-
- }
+ break;
- break;
case "delete":
$style_id = ($HTTP_GET_VARS['style_id']) ? intval($HTTP_GET_VARS['style_id']) : intval($HTTP_POST_VARS['style_id']);
@@ -777,7 +780,7 @@ switch($mode)
{
if($style_id == $board_config['default_style'])
{
- message_die(GENERAL_MESSAGE, $lang['Cannot_remove_style'], $lang['Error']);
+ message_die(GENERAL_MESSAGE, $lang['Cannot_remove_style']);
}
$hidden_fields = '<input type="hidden" name="mode" value="'.$mode.'" /><input type="hidden" name="style_id" value="'.$style_id.'" />';
@@ -806,34 +809,43 @@ switch($mode)
else
{
//
- // The user has confirmed the delete. Remove the style, the style element names and update any users
- // who might be using this style
+ // The user has confirmed the delete. Remove the style, the style element
+ // names and update any users who might be using this style
//
- $sql = "DELETE FROM " . THEMES_TABLE . " WHERE themes_id = $style_id";
+ $sql = "DELETE FROM " . THEMES_TABLE . "
+ WHERE themes_id = $style_id";
if(!$result = $db->sql_query($sql, BEGIN_TRANSACTION))
{
message_die(GENERAL_ERROR, "Could not remove style data!", "Error", __LINE__, __FILE__, $sql);
}
- $sql = "DELETE FROM " . THEMES_NAME_TABLE . " WHERE themes_id = $style_id";
-
- // There may not be any theme name data so don't throw an error if the SQL dosan't work
+ //
+ // There may not be any theme name data so don't throw an error
+ // if the SQL dosan't work
+ //
+ $sql = "DELETE FROM " . THEMES_NAME_TABLE . "
+ WHERE themes_id = $style_id";
$db->sql_query($sql);
-
- $sql = "UPDATE " . USERS_TABLE . " SET user_style = " . $board_config['default_style'] . " WHERE user_style = $style_id";
+
+ $sql = "UPDATE " . USERS_TABLE . "
+ SET user_style = " . $board_config['default_style'] . "
+ WHERE user_style = $style_id";
if(!$result = $db->sql_query($sql, END_TRANSACTION))
{
message_die(GENERAL_ERROR, "Could not update user style information", "Error", __LINE__, __FILE__, $sql);
}
- message_die(GENERAL_MESSAGE, $lang['Style_removed'], $lang['Success']);
+ $message = $lang['Style_removed'] . "<br /><br />" . sprintf($lang['Click_return_styleadmin'], "<a href=\"" . append_sid("admin_styles.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
+
+ message_die(GENERAL_MESSAGE, $message);
}
-
-
- break;
+ break;
+
default:
- $sql = "SELECT themes_id, template_name, style_name FROM ".THEMES_TABLE." ORDER BY template_name";
+ $sql = "SELECT themes_id, template_name, style_name
+ FROM " . THEMES_TABLE . "
+ ORDER BY template_name";
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Could not get style information!", "Error", __LINE__, __FILE__, $sql);
@@ -845,35 +857,38 @@ switch($mode)
"body" => "admin/styles_list_body.tpl")
);
- $template->assign_vars(array("L_STYLES_TITLE" => $lang['Styles_admin'],
+ $template->assign_vars(array(
+ "L_STYLES_TITLE" => $lang['Styles_admin'],
"L_STYLES_TEXT" => $lang['Styles_explain'],
"L_STYLE" => $lang['Style'],
"L_TEMPLATE" => $lang['Template'],
"L_EDIT" => $lang['Edit'],
- "L_DELETE" => $lang['Delete']));
+ "L_DELETE" => $lang['Delete'])
+ );
for($i = 0; $i < count($style_rowset); $i++)
{
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
- $template->assign_block_vars("styles", array("ROW_CLASS" => $row_class,
+ $template->assign_block_vars("styles", array(
+ "ROW_CLASS" => $row_class,
"ROW_COLOR" => $row_color,
"STYLE_NAME" => $style_rowset[$i]['style_name'],
"TEMPLATE_NAME" => $style_rowset[$i]['template_name'],
- "U_STYLES_EDIT" => append_sid("$PHP_SELF?mode=edit&style_id=" . $style_rowset[$i]['themes_id']),
- "U_STYLES_DELETE" => append_sid("$PHP_SELF?mode=delete&style_id=" . $style_rowset[$i]['themes_id'])));
+
+ "U_STYLES_EDIT" => append_sid("admin_styles.$phpEx?mode=edit&amp;style_id=" . $style_rowset[$i]['themes_id']),
+ "U_STYLES_DELETE" => append_sid("admin_styles.$phpEx?mode=delete&amp;style_id=" . $style_rowset[$i]['themes_id']))
+ );
}
$template->pparse("body");
-
-
- break;
+ break;
}
-if(!$HTTP_POST_VARS['send_file'])
+if( !$HTTP_POST_VARS['send_file'] )
{
include('page_footer_admin.'.$phpEx);
}
-?>
+?> \ No newline at end of file
diff --git a/phpBB/admin/admin_words.php b/phpBB/admin/admin_words.php
index f6af8d745a..9b1884611a 100644
--- a/phpBB/admin/admin_words.php
+++ b/phpBB/admin/admin_words.php
@@ -23,7 +23,7 @@
if($setmodules == 1)
{
$file = basename(__FILE__);
- $module['General']['Word Censor'] = "$file";
+ $module['General']['Word_Censor'] = "$file";
return;
}
@@ -95,7 +95,7 @@ if( $mode != "" )
"L_WORDS_TITLE" => $lang['Words_title'],
"L_WORDS_TEXT" => $lang['Words_explain'],
- "L_WORD_CENSOR" => $lang['Word_censor'],
+ "L_WORD_CENSOR" => $lang['Edit_word_censor'],
"L_WORD" => $lang['Word'],
"L_REPLACEMENT" => $lang['Replacement'],
"L_SUBMIT" => $lang['Submit'],
@@ -124,23 +124,23 @@ if( $mode != "" )
$sql = "UPDATE " . WORDS_TABLE . "
SET word = '$word', replacement = '$replacement'
WHERE word_id = $word_id";
- $message_success = $lang['Word_updated'];
+ $message = $lang['Word_updated'];
}
else
{
$sql = "INSERT INTO " . WORDS_TABLE . " (word, replacement)
VALUES ('$word', '$replacement')";
- $message_success = $lang['Word_added'];
+ $message = $lang['Word_added'];
}
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Could not insert data into words table", $lang['Error'], __LINE__, __FILE__, $sql);
}
- else
- {
- message_die(GENERAL_MESSAGE, $message_success);
- }
+
+ $message .= "<br /><br />" . sprintf($lang['Click_return_wordadmin'], "<a href=\"" . append_sid("admin_words.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
+
+ message_die(GENERAL_MESSAGE, $message);
}
else if( $mode == "delete" )
{
@@ -162,10 +162,10 @@ if( $mode != "" )
{
message_die(GENERAL_ERROR, "Could not remove data from words table", $lang['Error'], __LINE__, __FILE__, $sql);
}
- else
- {
- message_die(GENERAL_MESSAGE, $lang['Word_removed']);
- }
+
+ $message = $lang['Word_removed'] . "<br /><br />" . sprintf($lang['Click_return_wordadmin'], "<a href=\"" . append_sid("admin_words.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
+
+ message_die(GENERAL_MESSAGE, $message);
}
else
{
@@ -218,8 +218,9 @@ else
"ROW_CLASS" => $row_class,
"WORD" => $word,
"REPLACEMENT" => $replacement,
- "U_WORD_EDIT" => append_sid("admin_words.$phpEx?mode=edit&id=$word_id"),
- "U_WORD_DELETE" => append_sid("admin_words.$phpEx?mode=delete&id=$word_id"))
+
+ "U_WORD_EDIT" => append_sid("admin_words.$phpEx?mode=edit&amp;id=$word_id"),
+ "U_WORD_DELETE" => append_sid("admin_words.$phpEx?mode=delete&amp;id=$word_id"))
);
}
}
diff --git a/phpBB/language/lang_english/lang_admin.php b/phpBB/language/lang_english/lang_admin.php
index b3fa5709d8..efda587f52 100644
--- a/phpBB/language/lang_english/lang_admin.php
+++ b/phpBB/language/lang_english/lang_admin.php
@@ -37,7 +37,7 @@ $lang['Styles'] = "Styles Admin";
$lang['Configuration'] = "Configuration";
$lang['Permissions'] = "Permissions";
$lang['Manage'] = "Manage";
-$lang['Disallow'] = "Disallowed words";
+$lang['Disallow'] = "Disallow usernames";
$lang['Prune'] = "Pruning";
$lang['Mass_Email'] = "Send Bulk Email";
$lang['Ranks'] = "Ranks";
@@ -334,6 +334,10 @@ $lang['Forum_desc'] = "Description";
$lang['Forum_status'] = "Forum status";
$lang['Forum_pruning'] = "Auto-pruning";
+$lang['prune_freq'] = 'Check for topic age every';
+$lang['prune_days'] = "Remove topics that have not been posted to in";
+$lang['Set_prune_data'] = "You have turned on auto-prune for this forum but did not set a frequency or number of days to prune. Please go back and do so";
+
$lang['Move_and_Delete'] = "Move and Delete";
$lang['Delete_all_posts'] = "Delete all posts";
@@ -410,7 +414,6 @@ $lang['User_special_explain'] = "These fields are not able to be modified by the
//
// Group Management
//
-
$lang['Group_administration'] = "Group Administration";
$lang['Group_admin_explain'] = "From this panel you can administer all your usergroups, you can; delete, create and edit existing groups. You may choose moderators, toggle open/closed group status and set the group name and description";
$lang['Error_updating_groups'] = "There was an error while updating the groups";
@@ -447,10 +450,7 @@ $lang['Forum_Prune'] = "Forum Prune";
$lang['Forum_Prune_explain'] = "This will delete any topic which has not been posted to within the number of days you select. If you do not enter a number then all topics will be deleted. It will not remove topics in which polls are still running nor will it remove announcements. You will need to remove these topics manually.";
$lang['Do_Prune'] = "Do Prune";
$lang['All_Forums'] = "All Forums";
-$lang['prune_days'] = "Remove topics that have not been posted to in";
-$lang['Prune_topics_not_posted'] = "Prune topics that haven't been posted to in the last";
-$lang['prune_freq'] = 'Check for topic age every';
-$lang['Set_prune_data'] = "You have turned on auto-prune for this forum but did not set a frequency or number of days to prune. Please go back and do so";
+$lang['Prune_topics_not_posted'] = "Prune topics with no replies in this many days";
$lang['Topics_pruned'] = "Topics pruned";
$lang['Posts_pruned'] = "Posts pruned";
$lang['Prune_success'] = "Pruning of forums was successful";
@@ -459,29 +459,36 @@ $lang['Prune_success'] = "Pruning of forums was successful";
//
// Word censor
//
-$lang['Word_censor'] = "Word Censor";
+$lang['Words_title'] = "Word Censoring";
+$lang['Words_explain'] = "From this control panel you can add, edit, and remove words that will be automatically censored on your forums. In addition people will not be allowed to register with usernames containing these words. Wildcards (*) are accepted in the word field, eg. *test* will match detestable, test* would match testing, *test would match detest.";
$lang['Word'] = "Word";
+$lang['Edit_word_censor'] = "Edit word censor";
$lang['Replacement'] = "Replacement";
$lang['Add_new_word'] = "Add new word";
$lang['Update_word'] = "Update word censor";
-$lang['Words_title'] = "Word Censors";
-$lang['Words_explain'] = "From this control panel you can add, edit, and remove words that will be automatically censored on your forums. Wildcards (*) are accepted in the word field! (i.e.: *test*, test*, *test, and test are all valid)";
-$lang['Must_enter_word'] = "You must enter a word and it's replacement!";
+
+$lang['Must_enter_word'] = "You must enter a word and its replacement";
$lang['No_word_selected'] = "No word selected for editing";
+
$lang['Word_updated'] = "The selected word censor has been successfully updated";
$lang['Word_added'] = "The word censor has been successfully added";
$lang['Word_removed'] = "The selected word censor has been successfully removed";
+$lang['Click_return_wordadmin'] = "Click %sHere%s to return to Word Censor Administration";
+
//
// Mass Email
//
-$lang['Mass_email_explain'] = "Here you can email a message to either all of your users, or all users of a specific group. To do this, an email will be sent out to the administrative email address supplied, with a blind carbon copy sent to all receptients. If you are emailing a large group of people, please be patient after submiting and <b>DO NOT</b> stop the page halfway through. It is normal for amass emailing to take a long time.";
+$lang['Mass_email_explain'] = "Here you can email a message to either all of your users, or all users of a specific group. To do this, an email will be sent out to the administrative email address supplied, with a blind carbon copy sent to all receptients. If you are emailing a large group of people please be patient after submiting and do not stop the page halfway through. It is normal for amass emailing to take a long time, you will be notified when the script has completed";
$lang['Compose'] = "Compose";
$lang['Recipients'] = "Recipients";
$lang['All_users'] = "All Users";
+$lang['Email_successfull'] = "Your message has been sent";
+$lang['Click_return_massemail'] = "Click %sHere%s to return to the Mass Email form";
+
//
// Install Process
@@ -505,89 +512,116 @@ $lang['Create_User'] = "Create User";
$lang['Inst_Step_2'] = "Your admin username has been created. At this point your basic installation is complete. You will now be taken to a screen which will allow you to administer your new installation. Please be sure to check the General Configuration details and make any required changes. Thank you for choosing phpBB 2.";
$lang['Finish_Install'] = "Finish Installation";
$lang['Install_db_error'] = "An error occured trying to update the database";
-$lang['ODBC_Instructs'] = "Someone please write some odbc instructions in the \$lang['ODBC_Instructs'] variable!";
+$lang['ODBC_Instructs'] = "To complete your installation of this database you need to create a System Data Source Name, or System DSN pointing towards the relevant data source. You should refer to the ODBC section of your database server installation manual for assistance. If you are hosting this board on a host to which you do not have control you should request your provider to install or run the necessary files and create an appropriate DSN.";
$lang['Table_Prefix'] = "Prefix for tables in database";
$lang['Unwriteable_config'] = "Your config file is unwriteable at present. A copy of the config file will be downloaded to your when you click the button below. You should upload this file to the same directory as phpBB 2. Once this is done you should log in using the administrator name and password you provided on the previous form and visit the admin control centre (a link will appear at the bottom of each screen once logged in) to check the general configuration. Thank you for choosing phpBB 2.";
$lang['Download_config'] = "Download Config";
$lang['ftp_choose'] = "Choose Download Method";
-$lang['Attempt_ftp'] = "Attempt to ftp config file into place:";
-$lang['Send_file'] = "Just send the file to me and I'll ftp it manually:";
-$lang['ftp_option'] = "<br />Since the ftp extensions are loaded in php you may will also be given the option of first trying to automatically ftp the config file into place.";
-$lang['ftp_instructs'] = "You have chosen to attempt to ftp the file to your phpBB installation automagically. Please enter the information below to facilitate this process. Note that the FTP Path should be the exact path via ftp to your phpBB2 installation as if you were ftping to it.";
-$lang['ftp_path'] = "FTP Path to phpBB2:";
-$lang['ftp_username'] = "Your FTP Username:";
-$lang['ftp_password'] = "Your FTP Password:";
+$lang['Attempt_ftp'] = "Attempt to ftp config file into place";
+$lang['Send_file'] = "Just send the file to me and I'll ftp it manually";
+$lang['ftp_option'] = "<br />Since FTP extensions are enabled in this version of PHP you may also be given the option of first trying to automatically ftp the config file into place.";
+$lang['ftp_instructs'] = "You have chosen to ftp the file to the account containing phpBB 2 automatically. Please enter the information below to facilitate this process. Note that the FTP path should be the exact path via ftp to your phpBB2 installation as if you were ftping to it using any normal client.";
+$lang['ftp_path'] = "FTP path to phpBB2";
+$lang['ftp_username'] = "Your FTP Username";
+$lang['ftp_password'] = "Your FTP Password";
$lang['Transfer_config'] = "Start Transfer";
$lang['ftp_info'] = "Enter Your FTP Information";
$lang['Install'] = "Install";
$lang['Upgrade'] = "Upgrade";
-$lang['Install_Method'] = 'Choose your installation method';
+$lang['Install_Method'] = "Choose your installation method";
//
// Ranks admin
//
-$lang['Must_select_rank'] = "Sorry, you didn't select a rank. Please go back and try again.";
-$lang['No_assigned_rank'] = "No special rank assigned";
$lang['Ranks_title'] = "Rank Administration";
-$lang['Ranks_explain'] = "Here you can add, edit, view, and delete ranks. This is also a place to create custom ranks";
+$lang['Ranks_explain'] = "Using this form you can add, edit, view and delete ranks. You can also create custom ranks which can be applied to a user via the user management facility";
+
+$lang['Add_new_rank'] = "Add new rank";
+
$lang['Rank_title'] = "Rank Title";
-$lang['Rank_special'] = "Is special rank";
+$lang['Rank_special'] = "Set as Special Rank";
$lang['Rank_minimum'] = "Minimum Posts";
$lang['Rank_maximum'] = "Maximum Posts";
+$lang['Rank_image'] = "Rank Image";
+$lang['Rank_image_explain'] = "Use this to define a small image associated with the rank";
+
+$lang['Must_select_rank'] = "You must select a rank";
+$lang['No_assigned_rank'] = "No special rank assigned";
+
$lang['Rank_updated'] = "The rank was successfully updated";
$lang['Rank_added'] = "The rank was successfully added";
$lang['Rank_removed'] = "The rank was successfully deleted";
-$lang['Add_new_rank'] = "Add new rank";
-$lang['Rank_image'] = "Rank Image";
-$lang['Rank_image_explain'] = "This is the place to set a custom image for everyone in the rank. You can specify either a relative or absolute path to the image";
-$lang['return_rank_admin'] = "Click %sHere%s to return to rank admin";
+
+$lang['Click_return_rankadmin'] = "Click %sHere%s to return to Rank Administration";
//
// Disallow Username Admin
//
-$lang['Add'] = "Add";
-$lang['disallowed_deleted'] = "The disallowed username has successfully been removed";
-$lang['disallowed_already'] = "The username you are trying to disallow has already been disallowed, or a user currently exists that this would disallow";
-$lang['disallow_successful'] = "The disallowed username has successfully been added";
$lang['Disallow_control'] = "Username Disallow Control";
-$lang['disallow_instructs'] = "Here you can control usernames which will not be allowed to be used. Disallowed usernames are allowed to contain a wildcard character of '*'. Please note that you will not be allowed to specify a username to disallow if that username has already been registered. You must first delete that username, and then disallow it.";
-$lang['del_disallow'] = "Remove a Disallowed Username";
-$lang['del_disallow_explain'] = "You can remove a disallowed username by selecting the username from this list and clicking submit";
-$lang['add_disallow'] = "Add a disallowed username";
-$lang['add_disallow_explain'] = "You can disallow a username using the wildcard character '*' to match any character";
-$lang['no_disallowed'] = "No Disallowed Usernames";
+$lang['Disallow_explain'] = "Here you can control usernames which will not be allowed to be used. Disallowed usernames are allowed to contain a wildcard character of *. Please note that you will not be allowed to specify any username that has already been registered, you must first delete that name then disallow it";
+
+$lang['Delete_disallow'] = "Delete";
+$lang['Delete_disallow_title'] = "Remove a Disallowed Username";
+$lang['Delete_disallow_explain'] = "You can remove a disallowed username by selecting the username from this list and clicking submit";
+
+$lang['Add_disallow'] = "Add";
+$lang['Add_disallow_title'] = "Add a disallowed username";
+$lang['Add_disallow_explain'] = "You can disallow a username using the wildcard character * to match any character";
+
+$lang['No_disallowed'] = "No Disallowed Usernames";
+
+$lang['Disallowed_deleted'] = "The disallowed username has been successfully removed";
+$lang['Disallow_successful'] = "The disallowed username has ben successfully added";
+$lang['Disallowed_already'] = "The name you entered could not be disallowed. It either already exists in the list or a matching username is present";
+
+$lang['Click_return_disallowadmin'] = "Click %sHere%s to return to Disallow Username Administration";
//
// Styles Admin
//
$lang['Styles_admin'] = "Styles Administration";
-$lang['Styles_explain'] = "Using this facility you can add, remove and manage styles (templates and themes) available to your users.";
-$lang['Styles_addnew_explain'] = "The following list contains all the themes that are available for the templates you currently have. The items on this list HAVE NOT yet been installed into the phpBB database. To install a theme simply click the 'install' link beside a selected entry";
+$lang['Styles_explain'] = "Using this facility you can add, remove and manage styles (templates and themes) available to your users";
+$lang['Styles_addnew_explain'] = "The following list contains all the themes that are available for the templates you currently have. The items on this list have not yet been installed into the phpBB database. To install a theme simply click the install link beside an entry";
+
+$lang['Select_template'] = "Select a Template";
+
$lang['Style'] = "Style";
$lang['Template'] = "Template";
$lang['Install'] = "Install";
-$lang['Confirm_delete_style'] = "Are you sure you want to delete this style?";
-$lang['Style_removed'] = "The selected style has been removed from the database. To fully remove this style from your system you must delete the appropriate directory from your templates directory.";
-$lang['Theme_installed'] = "The selected theme has been installed successfully";
-$lang['Export_themes'] = "Export Themes";
-$lang['Download_theme_cfg'] = "The exporter could not write the theme information file. Click the button below to download this file with your browser. Once you have downloaded it you can transer it to your templates dir and package your template for distribution if you choose.";
-$lang['No_themes'] = "The template you selected has no themes attached to it. Click on the 'Create New' link to the left to create one.";
$lang['Download'] = "Download";
-$lang['No_template_dir'] = "Could not open template dir, it may be unreadable by the webserver or may not exist";
-$lang['Export_explain'] = "In this panel you will be able to export the theme data for a selected template. Select the template from the list below and the script will create the theme configuration file and attempt to save it to the selected template directory. If it cannot save the file itself it will give you the option to download it. In order for the script to save the file you must give write access to the webserver for the selected template dir. For more information on this see the phpBB users guide.";
-$lang['Select_template'] = "Select a Template";
-$lang['Theme_info_saved'] = "The theme information for the selected template has been saved. You should now return the permissions on the theme_info.cfg and/or selected template directory to READ ONLY.";
+
$lang['Edit_theme'] = "Edit Theme";
-$lang['Edit_theme_explain'] = "In the form below you can edit the settings for the selected theme.";
+$lang['Edit_theme_explain'] = "In the form below you can edit the settings for the selected theme";
+
$lang['Create_theme'] = "Create Theme";
-$lang['Create_theme_explain'] = "Use the form below to create a new theme for a selected template. When referancing color HEX codes DO NOT include the pound sign (#), ie: CCCCCC is valid, #CCCCCC is NOT.";
+$lang['Create_theme_explain'] = "Use the form below to create a new theme for a selected template. When entering colours (for which you should use hexadecimal notation) you must not include the initial #, ie. CCCCCC is valid, #CCCCCC is not";
+
+$lang['Export_themes'] = "Export Themes";
+$lang['Export_explain'] = "In this panel you will be able to export the theme data for a selected template. Select the template from the list below and the script will create the theme configuration file and attempt to save it to the selected template directory. If it cannot save the file itself it will give you the option to download it. In order for the script to save the file you must give write access to the webserver for the selected template dir. For more information on this see the phpBB 2 users guide.";
+
+$lang['Theme_installed'] = "The selected theme has been installed successfully";
+$lang['Style_removed'] = "The selected style has been removed from the database. To fully remove this style from your system you must delete the appropriate style from your templates directory.";
+$lang['Theme_info_saved'] = "The theme information for the selected template has been saved. You should now return the permissions on the theme_info.cfg (and if applicable the selected template directory) to read-only";
+$lang['Theme_updated'] = "The selected theme has been updated. You should now export the new theme settings";
+$lang['Theme_created'] = "Theme created. You should now export the theme to the theme configuration file for safe keeping or use elsewhere";
+
+$lang['Confirm_delete_style'] = "Are you sure you want to delete this style";
+
+$lang['Download_theme_cfg'] = "The exporter could not write the theme information file. Click the button below to download this file with your browser. Once you have downloaded it you can transfer it to the directory containing the template files. You can then package the files for distribution or use elsewhere if you desire";
+$lang['No_themes'] = "The template you selected has no themes attached to it. To create a new theme click the Create New link on the left hand panel";
+$lang['No_template_dir'] = "Could not open the template directory. It may be unreadable by the webserver or may not exist";
+$lang['Cannot_remove_style'] = "You cannot remove the style selected since it is currently the forum default. Please change the default style and try again.";
+
+$lang['Click_return_styleadmin'] = "Click %sHere%s to return to Style Administration";
+
$lang['Theme_settings'] = "Theme Settings";
$lang['Theme_element'] = "Theme Element";
$lang['Simple_name'] = "Simple Name";
$lang['Value'] = "Value";
+
$lang['Stylesheet'] = "CSS Stylesheet";
$lang['Background_image'] = "Background Image";
$lang['Background_color'] = "Background Color";
@@ -595,7 +629,7 @@ $lang['Theme_name'] = "Theme Name";
$lang['Link_color'] = "Link Color";
$lang['VLink_color'] = "Visited Link Color";
$lang['ALink_color'] = "Active Link Color";
-$lang['HLink_color'] = "Hilighted Link Color";
+$lang['HLink_color'] = "Hover Link Color";
$lang['Tr_color1'] = "Table Row Color 1";
$lang['Tr_color2'] = "Table Row Color 2";
$lang['Tr_color3'] = "Table Row Color 3";
@@ -626,9 +660,8 @@ $lang['fontcolor3'] = "Font Color 3";
$lang['span_class1'] = "Span Class 1";
$lang['span_class2'] = "Span Class 2";
$lang['span_class3'] = "Span Class 3";
-$lang['Theme_updated'] = "The selected theme has been updated. Don't forget to export the new theme settings to the theme configuration file!";
-$lang['Theme_created'] = "Theme created! Don't forget to export the new theme settings to the theme configuration file!";
-$lang['Cannot_remove_style'] = "The style you have selected is the current forum wide default style. Therefor, you cannot remove it. Please change the default style and try again.";
+$lang['img_poll_size'] = "Polling Image Size [px]";
+$lang['img_pm_size'] = "Private Message Status size [px]";
//
// That's all Folks!
diff --git a/phpBB/templates/subSilver/admin/disallow_body.tpl b/phpBB/templates/subSilver/admin/disallow_body.tpl
index 8b1e832e67..df3b5bec7d 100644
--- a/phpBB/templates/subSilver/admin/disallow_body.tpl
+++ b/phpBB/templates/subSilver/admin/disallow_body.tpl
@@ -1,33 +1,24 @@
<h1>{L_DISALLOW_TITLE}</h1>
-<p>{L_EXPLAIN}</p>
+
+<p>{L_DISALLOW_EXPLAIN}</p>
<form method="post" action="{S_FORM_ACTION}"><table width="80%" cellspacing="1" cellpadding="4" border="0" align="center" class="forumline">
<tr>
- <th class="thHead" colspan="2">{L_DEL_DISALLOW}</th>
+ <th class="thHead" colspan="2">{L_ADD_DISALLOW}</th>
</tr>
<tr>
- <td class="row1">{L_USERNAME}: <br />
- <span class="gensmall">{L_DEL_EXPLAIN}</span></td>
- <td class="row2">{S_DISALLOW_SELECT}&nbsp;<input type="submit" name="mode" value="{L_DELETE}" class="liteoption" /></td>
+ <td class="row1">{L_USERNAME}<br /><span class="gensmall">{L_ADD_EXPLAIN}</span></td>
+ <td class="row2"><input type="text" name="disallowed_user" size="30" />&nbsp;<input type="submit" name="add_name" value="{L_ADD}" class="mainoption" /></td>
</tr>
<tr>
- <th class="thHead" colspan="2">{L_ADD_DISALLOW}</th>
+ <th class="thHead" colspan="2">{L_DELETE_DISALLOW}</th>
</tr>
<tr>
- <td class="row1">{L_USERNAME}: <br />
- <span class="gensmall">{L_ADD_EXPLAIN}></td>
- <td class="row2">
- <input type="text" name="disallowed_user" size="35" />
- </td>
+ <td class="row1">{L_USERNAME}<br /><span class="gensmall">{L_DELETE_EXPLAIN}</span></td>
+ <td class="row2">{S_DISALLOW_SELECT}&nbsp;<input type="submit" name="delete_name" value="{L_DELETE}" class="liteoption" /></td>
</tr>
<tr>
- <td class="catBottom" colspan="2" align="center">
- <input type="submit" name="mode" value="{L_ADD}" class="mainoption" />
- &nbsp;&nbsp;
- <input type="reset" value="{L_RESET}" class="liteoption" />
- </td>
+ <td class="catBottom" colspan="2" align="center">&nbsp;</td>
</tr>
</table></form>
-
-<p>{L_INFO}</p>