1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-10 18:54:08 +02:00

More styling stuff ... activate, deactivate styles ... deactivated styles can still be used in forum/board styling selectors

git-svn-id: file:///svn/phpbb/trunk@4253 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen
2003-07-13 23:29:22 +00:00
parent 2c400376a1
commit 7668388b4e
4 changed files with 30 additions and 19 deletions

View File

@@ -208,7 +208,7 @@ switch ($mode)
case 'default':
$style_select = style_select($new['default_style']);
$style_select = style_select($new['default_style'], true);
$lang_select = language_select($new['default_lang']);
$timezone_select = tz_select($new['board_timezone']);

View File

@@ -316,7 +316,7 @@ switch ($mode)
$forum_type_options .= '<option value="' . $value . '"' . (($value == $forum_type) ? ' selected="selected"' : '') . '>' . $user->lang['TYPE_' . $lang] . '</option>';
}
$styles_list = style_select($forum_style);
$styles_list = style_select($forum_style, true);
$statuslist = '<option value="' . ITEM_UNLOCKED . '"' . (($forum_status == ITEM_UNLOCKED) ? ' selected="selected"' : '') . '>' . $user->lang['UNLOCKED'] . '</option><option value="' . ITEM_LOCKED . '"' . (($forum_status == ITEM_LOCKED) ? ' selected="selected"' : '') . '>' . $user->lang['LOCKED'] . '</option>';

View File

@@ -44,6 +44,14 @@ switch ($mode)
switch ($action)
{
case 'activate':
case 'deactivate':
$sql = 'UPDATE ' . STYLES_TABLE . '
SET style_active = ' . (($action == 'activate') ? 1 : 0) . '
WHERE style_id = ' . $style_id;
$db->sql_query($sql);
break;
case 'preview':
break;
@@ -168,7 +176,7 @@ switch ($mode)
}
$db->sql_freeresult($result);
$sql = 'SELECT style_id, style_name
$sql = 'SELECT style_id, style_name, style_active
FROM ' . STYLES_TABLE;
$result = $db->sql_query($sql);
@@ -178,11 +186,13 @@ switch ($mode)
{
$row_class = ($row_class != 'row1') ? 'row1' : 'row2';
$stylevis = (!$row['style_active']) ? 'activate' : 'deactivate';
?>
<tr>
<td class="<?php echo $row_class; ?>" width="100%"><a href="<?php echo "admin_styles.$phpEx$SID&amp;mode=$mode&amp;action=edit&amp;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; ?>" nowrap="nowrap">&nbsp;<a href="<?php echo "admin_styles.$phpEx$SID&amp;mode=$mode&amp;action=deactivate&amp;id=" . $row['style_id']; ?>">Deactivate</a> | <a href="<?php echo "admin_styles.$phpEx$SID&amp;mode=$mode&amp;action=delete&amp;id=" . $row['style_id']; ?>">Delete</a> | <a href="<?php echo "admin_styles.$phpEx$SID&amp;mode=$mode&amp;action=export&amp;id=" . $row['style_id']; ?>">Export</a> | <a href="<?php echo "{$phpbb_root_path}index.$phpEx$SID&amp;style=" . $row['style_id']; ?>" target="_stylepreview">Preview</a>&nbsp;</td>
<td class="<?php echo $row_class; ?>" align="center" nowrap="nowrap">&nbsp;<a href="<?php echo "admin_styles.$phpEx$SID&amp;mode=$mode&amp;action=$stylevis&amp;id=" . $row['style_id']; ?>"><?php echo $user->lang['STYLE_' . strtoupper($stylevis)]; ?></a> | <a href="<?php echo "admin_styles.$phpEx$SID&amp;mode=$mode&amp;action=delete&amp;id=" . $row['style_id']; ?>">Delete</a> | <a href="<?php echo "admin_styles.$phpEx$SID&amp;mode=$mode&amp;action=export&amp;id=" . $row['style_id']; ?>">Export</a> | <a href="<?php echo "{$phpbb_root_path}index.$phpEx$SID&amp;style=" . $row['style_id']; ?>" target="_stylepreview">Preview</a>&nbsp;</td>
</tr>
<?php