diff --git a/phpBB/adm/admin_styles.php b/phpBB/adm/admin_styles.php index 036176f11c..a0519e0ab0 100644 --- a/phpBB/adm/admin_styles.php +++ b/phpBB/adm/admin_styles.php @@ -46,15 +46,13 @@ switch ($mode) { case 'activate': case 'deactivate': + // TODO ... reset user_styles if their style is deactivated $sql = 'UPDATE ' . STYLES_TABLE . ' SET style_active = ' . (($action == 'activate') ? 1 : 0) . ' WHERE style_id = ' . $style_id; $db->sql_query($sql); break; - case 'preview': - break; - case 'edit': if (isset($_POST['update'])) @@ -68,8 +66,9 @@ switch ($mode) WHERE style_id = $style_id"; $result = $db->sql_query($sql); - if ($style_data = $db->sql_fetchrow($result)) + if (!extract($db->sql_fetchrow($result))) { + die("ERROR"); } $db->sql_freeresult($result); } @@ -84,7 +83,7 @@ switch ($mode) $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) { - $selected = ($row[$field . '_id'] == $style_data[$field . '_id']) ? ' selected="selected"' : ''; + $selected = ($row[$field . '_id'] == ${$field . '_id'}) ? ' selected="selected"' : ''; ${$field . '_options'} .= ''; } $db->sql_freeresult($result); @@ -100,12 +99,9 @@ switch ($mode)

lang['EDIT_STYLE_EXPLAIN']; ?>

-

Selected Style:

-
"> - - + @@ -113,7 +109,11 @@ switch ($mode) - + @@ -128,8 +128,8 @@ switch ($mode) - - + + @@ -161,7 +161,7 @@ switch ($mode) - + - + + + + - +
  Edit Style
Style Name
Style Copyright' . $style_copyright . '' : ''; + +?>
Template set:
Active:Status: /> Inactive   /> Active
    
Style name Used by  
">  ">lang['STYLE_' . strtoupper($stylevis)]; ?> | ">Delete | ">Export | Preview  ">lang['STYLE_' . strtoupper($stylevis)]; ?>  ">Delete  ">Export  Preview 
Create new style: Create new style:
"> - + - + + - +
Imageset name  
"> ">Delete | ">Export  ">Delete  ">Export 
  
lang['Edit_template']); + adm_page_header($user->lang['EDIT_TEMPLATE']); ?> -

lang['Edit_template']; ?>

+

lang['EDIT_TEMPLATE']; ?>

-

lang['Edit_template_explain']; ?>

+

lang['EDIT_TEMPLATE_EXPLAIN']; ?>

"> @@ -565,17 +569,17 @@ switch ($mode) break; } - adm_page_header($user->lang['EDIT_TEMPLATE']); + adm_page_header($user->lang['MANAGE_TEMPLATE']); ?> -

lang['Edit_template']; ?>

+

lang['MANAGE_TEMPLATE']; ?>

-

lang['Edit_template_explain']; ?>

+

lang['MANAGE_TEMPLATE_EXPLAIN']; ?>

">
- - + + - + + + + - - + +
Template name Template name 
"> ">BBCode | ">Delete | ">Export | ">Preview  ">BBCode  ">Delete  ">Export  ">Preview 
 
 
"> - + ', $row['theme_name'], ''); ?> - + + + - +
Theme name  
 ">Delete | ">Export | ">Preview  ">Delete  ">Export  ">Preview 
Create new theme: Create new theme:
diff --git a/phpBB/language/en/lang_admin.php b/phpBB/language/en/lang_admin.php index c4d5c11f46..b2d11ffc4d 100644 --- a/phpBB/language/en/lang_admin.php +++ b/phpBB/language/en/lang_admin.php @@ -897,14 +897,18 @@ $lang = array_merge($lang, array( 'MANAGE_STYLE_EXPLAIN' => 'Here you can manage the available styles on your board. A style consists off a template, theme and imageset. You may alter existing styles, delete, deactivate, reactivate, create or import new ones. You can also see what a style will look like using the preview function. The current default style is noted by the presence of an asterix, * Also listed is the total user count for each style, note that overriding user styles will not be reflected here.', - 'STYLE_ACTIVATE' => 'Activate', - 'STYLE_DEACTIVATE' => 'Deactivate', + 'STYLE_ACTIVATE' => 'Activate', + 'STYLE_DEACTIVATE' => 'Deactivate', + 'EDIT_STYLE' => 'Edit Style', + 'EDIT_STYLE_EXPLAIN' => 'Using the form below you can modify this existing style. You may alter the combination of template, theme and imageset which define the style itself. You may also deactivate the style and alter its name.', + 'MANAGE_TEMPLATE_EXPLAIN' => 'A Template set comprises all the markup used to generate the layout of your board. Here you can edit existing template sets, delete, export, import and preview sets. You can also modify the templating code used to generate BBCode.', + 'EDIT_TEMPLATE' => 'Edit Template', + 'EDIT_TEMPLATE_EXPLAIN' => 'Use this panel to edit an existing compiled template set. When you have made the required changes you can recompile the template and (or) download it. Please remember that the existing HTML templates are not altered, only the compiled versions are affected. Therefore you should download any altered files if you wish to keep them for future use and for archival purposes.', + 'SELECT_TEMPLATE' => 'Select template', - 'SELECT_TEMPLATE' => 'Select template', - - 'THEMES' => 'Themes', - 'THEMES_EXPLAIN' => 'From here you can add, edit, delete and export themes. A theme is the combination of colours and images that are applied to your templates to define the basic look of your forum. To manage templates, imagesets or styles please see the navigation menu.', + 'THEMES' => 'Themes', + 'THEMES_EXPLAIN' => 'From here you can add, edit, delete and export themes. A theme is the combination of colours and images that are applied to your templates to define the basic look of your forum. To manage templates, imagesets or styles please see the navigation menu.', 'EDIT_THEME' => 'Edit Theme', 'EDIT_THEME_EXPLAIN' => 'Here you can edit the selected theme, changing colours, images, etc. You can switch between a simplified interface where you can set basic colours, etc. and a more advanced "raw CSS" mode. Using the raw mode you can style additional CSS elements such as borders, etc. You only need set the parameters you need, e.g. if you do not want a background image leave that parameter unset. You may also add additional "custom" classes should your template or style make use of them.', 'SELECT_CLASS' => 'Select class', @@ -983,12 +987,6 @@ $lang = array_merge($lang, array( - 'Edit_style' => 'Edit Styles', - 'Style' => 'Style', - 'Styles_admin' => 'Styles Administration', - 'Styles_explain' => 'Using this facility you can add, remove and manage styles. Styles are a combination of a template, theme (CSS) and imageset.', - 'Edit_template' => 'Edit Template', - 'Edit_template_explain' => 'Use this panel to edit an existing compiled template set. When you have made the required changes you can recompile the template and (or) download it. Please remember that the existing HTML templates are not altered, only the compiled versions are affected. Therefore you should download any altered files if you wish to keep them for future use and for archival purposes.', 'Select_template' => 'Select template', 'Template' => 'Select template', 'Download' => 'Download',