mirror of
https://github.com/phpbb/phpbb.git
synced 2025-01-19 15:17:16 +01:00
Couple more little updates
git-svn-id: file:///svn/phpbb/trunk@4254 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
7668388b4e
commit
2e8dec8c1f
@ -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'} .= '<option value="' . $row[$field . '_id'] . '"' . $selected . '>' . $row[$field . '_name'] . '</option>';
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
@ -100,12 +99,9 @@ switch ($mode)
|
||||
|
||||
<p><?php echo $user->lang['EDIT_STYLE_EXPLAIN']; ?></p>
|
||||
|
||||
<p>Selected Style: <b><?php echo $style_data['style_name']; ?></b></p>
|
||||
|
||||
<form name="style" method="post" action="<?php echo "admin_styles.$phpEx$SID&mode=$mode&action=$action&id=$style_id"; ?>"><table class="bg" width="95%" cellspacing="1" cellpadding="4" border="0" align="center">
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th> </th>
|
||||
<th colspan="2">Edit Style</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1">Style Name</td>
|
||||
@ -113,7 +109,11 @@ switch ($mode)
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1">Style Copyright</td>
|
||||
<td class="row2"><!-- input class="post" type="text" name="style_name" maxlength="255" size="40" /--></td>
|
||||
<td class="row2"><?php
|
||||
|
||||
echo ($action == 'edit') ? '<b>' . $style_copyright . '</b>' : '<input class="post" type="text" name="style_name" maxlength="255" size="40" value="' . $style_copyright . '" />';
|
||||
|
||||
?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1">Template set:</td>
|
||||
@ -128,8 +128,8 @@ switch ($mode)
|
||||
<td class="row2"><select name="imageset_id"><?php echo $imageset_options; ?></select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1">Active:</td>
|
||||
<td class="row2"></td>
|
||||
<td class="row1">Status:</td>
|
||||
<td class="row2"><input type="radio" name="style_active" value="0"<?php echo (!$style_active) ? ' checked="checked"' : ''; ?> /> Inactive <input type="radio" name="style_active" value="1"<?php echo ($style_active) ? ' checked="checked"' : ''; ?> /> Active</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="cat" colspan="2" align="center"><input class="btnmain" type="submit" name="update" value="<?php echo $user->lang['SUBMIT']; ?>" /> <input class="btnlite" type="submit" name="preview" value="<?php echo $user->lang['PREVIEW']; ?>" /> <input class="btnlite" type="reset" value="<?php echo $user->lang['RESET']; ?>" /></td>
|
||||
@ -161,7 +161,7 @@ switch ($mode)
|
||||
<tr>
|
||||
<th nowrap="nowrap">Style name</th>
|
||||
<th nowrap="nowrap">Used by</th>
|
||||
<th nowrap="nowrap"> </th>
|
||||
<th nowrap="nowrap" colspan="4"> </th>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
@ -192,7 +192,10 @@ switch ($mode)
|
||||
<tr>
|
||||
<td class="<?php echo $row_class; ?>" width="100%"><a href="<?php echo "admin_styles.$phpEx$SID&mode=$mode&action=edit&id=" . $row['style_id']; ?>"><?php echo $row['style_name']; ?></a><?php echo ($config['default_style'] == $row['style_id']) ? ' *' : ''; ?></td>
|
||||
<td class="<?php echo $row_class; ?>" align="center" nowrap="nowrap"><?php echo (!empty($style_count[$row['style_id']])) ? $style_count[$row['style_id']] : '0'; ?></td>
|
||||
<td class="<?php echo $row_class; ?>" align="center" nowrap="nowrap"> <a href="<?php echo "admin_styles.$phpEx$SID&mode=$mode&action=$stylevis&id=" . $row['style_id']; ?>"><?php echo $user->lang['STYLE_' . strtoupper($stylevis)]; ?></a> | <a href="<?php echo "admin_styles.$phpEx$SID&mode=$mode&action=delete&id=" . $row['style_id']; ?>">Delete</a> | <a href="<?php echo "admin_styles.$phpEx$SID&mode=$mode&action=export&id=" . $row['style_id']; ?>">Export</a> | <a href="<?php echo "{$phpbb_root_path}index.$phpEx$SID&style=" . $row['style_id']; ?>" target="_stylepreview">Preview</a> </td>
|
||||
<td class="<?php echo $row_class; ?>" align="center" nowrap="nowrap"> <a href="<?php echo "admin_styles.$phpEx$SID&mode=$mode&action=$stylevis&id=" . $row['style_id']; ?>"><?php echo $user->lang['STYLE_' . strtoupper($stylevis)]; ?></a> </td>
|
||||
<td class="<?php echo $row_class; ?>" align="center" nowrap="nowrap"> <a href="<?php echo "admin_styles.$phpEx$SID&mode=$mode&action=delete&id=" . $row['style_id']; ?>">Delete</a> </td>
|
||||
<td class="<?php echo $row_class; ?>" align="center" nowrap="nowrap"> <a href="<?php echo "admin_styles.$phpEx$SID&mode=$mode&action=export&id=" . $row['style_id']; ?>">Export</a> </td>
|
||||
<td class="<?php echo $row_class; ?>" align="center" nowrap="nowrap"> <a href="<?php echo "{$phpbb_root_path}index.$phpEx$SID&style=" . $row['style_id']; ?>" target="_stylepreview">Preview</a> </td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
@ -207,7 +210,7 @@ switch ($mode)
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td class="cat" colspan="3" align="right">Create new style: <input class="post" type="text" name="style_name" value="" maxlength="30" size="25" /> <input class="btnmain" type="submit" name="newstyle" value="<?php echo $user->lang['SUBMIT']; ?>" /></td>
|
||||
<td class="cat" colspan="6" align="right">Create new style: <input class="post" type="text" name="style_name" value="" maxlength="30" size="25" /> <input class="btnmain" type="submit" name="newstyle" value="<?php echo $user->lang['SUBMIT']; ?>" /></td>
|
||||
</tr>
|
||||
</table></form>
|
||||
<?php
|
||||
@ -233,7 +236,7 @@ switch ($mode)
|
||||
<form name="style" method="post" action="<?php echo "admin_styles.$phpEx$SID&mode=$mode"; ?>"><table class="bg" width="100%" cellspacing="1" cellpadding="4" border="0" align="center">
|
||||
<tr>
|
||||
<th>Imageset name</th>
|
||||
<th> </th>
|
||||
<th colspan="2"> </th>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
@ -250,7 +253,8 @@ switch ($mode)
|
||||
?>
|
||||
<tr>
|
||||
<td class="<?php echo $row_class; ?>" width="100%"><a href="<?php echo "admin_styles.$phpEx$SID&mode=$mode&action=edit&id=" . $row['imageset_id']; ?>"><?php echo $row['imageset_name']; ?></a></td>
|
||||
<td class="<?php echo $row_class; ?>" nowrap="nowrap"> <a href="<?php echo "admin_styles.$phpEx$SID&mode=$mode&action=delete&id=" . $row['imageset_id']; ?>">Delete</a> | <a href="<?php echo "admin_styles.$phpEx$SID&mode=$mode&action=export&id=" . $row['imageset_id']; ?>">Export</a> </td>
|
||||
<td class="<?php echo $row_class; ?>" nowrap="nowrap"> <a href="<?php echo "admin_styles.$phpEx$SID&mode=$mode&action=delete&id=" . $row['imageset_id']; ?>">Delete</a> </td>
|
||||
<td class="<?php echo $row_class; ?>" nowrap="nowrap"> <a href="<?php echo "admin_styles.$phpEx$SID&mode=$mode&action=export&id=" . $row['imageset_id']; ?>">Export</a> </td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
@ -265,7 +269,7 @@ switch ($mode)
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td class="cat" colspan="2"> </td>
|
||||
<td class="cat" colspan="3"> </td>
|
||||
</tr>
|
||||
</table></form>
|
||||
<?php
|
||||
@ -523,13 +527,13 @@ switch ($mode)
|
||||
|
||||
|
||||
//
|
||||
adm_page_header($user->lang['Edit_template']);
|
||||
adm_page_header($user->lang['EDIT_TEMPLATE']);
|
||||
|
||||
?>
|
||||
|
||||
<h1><?php echo $user->lang['Edit_template']; ?></h1>
|
||||
<h1><?php echo $user->lang['EDIT_TEMPLATE']; ?></h1>
|
||||
|
||||
<p><?php echo $user->lang['Edit_template_explain']; ?></p>
|
||||
<p><?php echo $user->lang['EDIT_TEMPLATE_EXPLAIN']; ?></p>
|
||||
|
||||
<form name="style" method="post" action="<?php echo "admin_styles.$phpEx$SID&mode=$mode&id=$template_id&action=$action"; ?>"><table cellspacing="1" cellpadding="1" border="0" align="center">
|
||||
<tr>
|
||||
@ -565,17 +569,17 @@ switch ($mode)
|
||||
break;
|
||||
}
|
||||
|
||||
adm_page_header($user->lang['EDIT_TEMPLATE']);
|
||||
adm_page_header($user->lang['MANAGE_TEMPLATE']);
|
||||
|
||||
?>
|
||||
<h1><?php echo $user->lang['Edit_template']; ?></h1>
|
||||
<h1><?php echo $user->lang['MANAGE_TEMPLATE']; ?></h1>
|
||||
|
||||
<p><?php echo $user->lang['Edit_template_explain']; ?></p>
|
||||
<p><?php echo $user->lang['MANAGE_TEMPLATE_EXPLAIN']; ?></p>
|
||||
|
||||
<form name="templates" method="post" action="<?php echo "admin_styles.$phpEx$SID&mode=$mode"; ?>"><table class="bg" width="100%" cellspacing="1" cellpadding="4" border="0" align="center">
|
||||
<tr>
|
||||
<th>Template name</th>
|
||||
<th> </th>
|
||||
<th colspan="2">Template name</th>
|
||||
<th colspan="3"> </th>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
@ -592,7 +596,10 @@ switch ($mode)
|
||||
?>
|
||||
<tr>
|
||||
<td class="<?php echo $row_class; ?>" width="100%"><a href="<?php echo "admin_styles.$phpEx$SID&mode=templates&action=edit&id=" . $row['template_id']; ?>"><?php echo $row['template_name']; ?></a></td>
|
||||
<td class="<?php echo $row_class; ?>" nowrap="nowrap"> <a href="<?php echo "admin_styles.$phpEx$SID&mode=templates&action=bbcode&id=" . $row['template_id']; ?>">BBCode</a> | <a href="<?php echo "admin_styles.$phpEx$SID&mode=templates&action=delete&id=" . $row['template_id']; ?>">Delete</a> | <a href="<?php echo "admin_styles.$phpEx$SID&mode=templates&action=export&id=" . $row['template_id']; ?>">Export</a> | <a href="<?php echo "admin_styles.$phpEx$SID&mode=templates&action=preview&id=" . $row['template_id']; ?>">Preview</a> </td>
|
||||
<td class="<?php echo $row_class; ?>" nowrap="nowrap"> <a href="<?php echo "admin_styles.$phpEx$SID&mode=templates&action=bbcode&id=" . $row['template_id']; ?>">BBCode</a> </td>
|
||||
<td class="<?php echo $row_class; ?>" nowrap="nowrap"> <a href="<?php echo "admin_styles.$phpEx$SID&mode=templates&action=delete&id=" . $row['template_id']; ?>">Delete</a> </td>
|
||||
<td class="<?php echo $row_class; ?>" nowrap="nowrap"> <a href="<?php echo "admin_styles.$phpEx$SID&mode=templates&action=export&id=" . $row['template_id']; ?>">Export</a> </td>
|
||||
<td class="<?php echo $row_class; ?>" nowrap="nowrap"> <a href="<?php echo "admin_styles.$phpEx$SID&mode=templates&action=preview&id=" . $row['template_id']; ?>">Preview</a> </td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
@ -607,8 +614,8 @@ switch ($mode)
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td class="cat" colspan="2" align="right"> </td>
|
||||
</tr><!-- Create new theme: <input class="post" type="text" name="template_name" value="" maxlength="30" size="25" /> <input class="btnmain" type="submit" name="newtheme" value="<?php echo $user->lang['SUBMIT']; ?>" />-->
|
||||
<td class="cat" colspan="5" align="right"> </td>
|
||||
</tr>
|
||||
</table></form>
|
||||
|
||||
<?php
|
||||
@ -1308,7 +1315,7 @@ function csspreview()
|
||||
<form name="style" method="post" action="<?php echo "admin_styles.$phpEx$SID&mode=$mode"; ?>"><table class="bg" width="100%" cellspacing="1" cellpadding="4" border="0" align="center">
|
||||
<tr>
|
||||
<th>Theme name</th>
|
||||
<th> </th>
|
||||
<th colspan="3"> </th>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
@ -1331,7 +1338,9 @@ function csspreview()
|
||||
echo sprintf('%s%s%s', "<a href=\"admin_styles.$phpEx$SID&mode=themes&action=edit&id=" . $row['theme_id'] . '">', $row['theme_name'], '</a>');
|
||||
|
||||
?></td>
|
||||
<td class="<?php echo $row_class; ?>" nowrap="nowrap"> <a href="<?php echo "admin_styles.$phpEx$SID&mode=themes&action=delete&id=" . $row['theme_id']; ?>">Delete</a> | <a href="<?php echo "admin_styles.$phpEx$SID&mode=themes&action=export&id=" . $row['theme_id']; ?>">Export</a> | <a href="<?php echo "admin_styles.$phpEx$SID&mode=themes&action=preview&id=" . $row['theme_id']; ?>">Preview</a> </td>
|
||||
<td class="<?php echo $row_class; ?>" nowrap="nowrap"> <a href="<?php echo "admin_styles.$phpEx$SID&mode=themes&action=delete&id=" . $row['theme_id']; ?>">Delete</a> </td>
|
||||
<td class="<?php echo $row_class; ?>" nowrap="nowrap"> <a href="<?php echo "admin_styles.$phpEx$SID&mode=themes&action=export&id=" . $row['theme_id']; ?>">Export</a> </td>
|
||||
<td class="<?php echo $row_class; ?>" nowrap="nowrap"> <a href="<?php echo "admin_styles.$phpEx$SID&mode=themes&action=preview&id=" . $row['theme_id']; ?>">Preview</a> </td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
@ -1346,7 +1355,7 @@ function csspreview()
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td class="cat" colspan="2" align="right">Create new theme: <input class="post" type="text" name="theme_name" value="" maxlength="30" size="25" /> <input class="btnmain" type="submit" name="newtheme" value="<?php echo $user->lang['SUBMIT']; ?>" /></td>
|
||||
<td class="cat" colspan="4" align="right">Create new theme: <input class="post" type="text" name="theme_name" value="" maxlength="30" size="25" /> <input class="btnmain" type="submit" name="newtheme" value="<?php echo $user->lang['SUBMIT']; ?>" /></td>
|
||||
</tr>
|
||||
</table></form>
|
||||
|
||||
|
@ -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 <b>not</b> 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 <b>not</b> 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',
|
||||
|
Loading…
x
Reference in New Issue
Block a user