MOD
Winking

#
#-----[ ]------------------------------------------
#
common.php

#
#-----[ ]------------------------------------------
#
message_die(GENERAL_MESSAGE, 'Board_disable', 'Information');
}

#
#-----[ , ]------------------------------------------
#
if ($template)
{
$board_config['default_style'] = $template;
setcookie('default_style',$template , (time()+21600), $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);
} else if (isset($HTTP_COOKIE_VARS['default_style']) )
$board_config['default_style']=$HTTP_COOKIE_VARS['default_style'];

#
#-----[ ]------------------------------------------
#
index.php

#
#-----[ ]------------------------------------------
#
include($phpbb_root_path . 'common.'.$phpEx);

#
#-----[ , ]------------------------------------------
#
include($phpbb_root_path . 'includes/functions_selects.'.$phpEx);

#
#-----[ ]------------------------------------------
#

//
// Handle marking posts
//

#
#-----[ , ]------------------------------------------
#

//change theme on index - new code by Smartor (smartor.is-root.com)
$fpage_style = $userdata['user_style'];
if(isset($HTTP_POST_VARS['fpage_theme']))
{
$fpage_theme = intval($HTTP_POST_VARS['fpage_theme']);
$fpuser_id = $userdata['user_id'];
$fp_sql = "UPDATE " . USERS_TABLE . " SET user_style = '$fpage_theme' WHERE
user_id = $fpuser_id";
if ( !($fp_result = $db->sql_query($fp_sql)) )
{
message_die(GENERAL_ERROR, 'Could not update users table ' . "$user_id
$fpage_theme", '', __LINE__, __FILE__, $sql);
}
else
{
$fp_message = $lang['Profile_updated'] . '<br /><br />' .
sprintf($lang['Click_return_index'], '<a href="' .
append_sid("index.$phpEx") . '">', '</a>');
message_die(GENERAL_MESSAGE, $fp_message);
}
}

#
#-----[ ]------------------------------------------
#
'FORUM_LOCKED_IMG' => $images['forum_locked'],

#
#-----[ , ]------------------------------------------
#
'TEMPLATE_SELECT' => style_select($board_config['default_style'], 'template'),
'L_SELECT_STYLE' => $lang['Change_style'],
'L_CHANGE_NOW' => $lang['Go'],
'FPAGE_STYLE' => style_select($fpage_style, 'fpage_theme'),

#
#-----[ ]------------------------------------------
#
language/lang_english/lang_main.php

#
#-----[ ]------------------------------------------
#

//
// That's all, Folks!

#
#-----[ , ]------------------------------------------
#

$lang['Change_style'] = "Change Style";

# (THIS ADDS THE NUMBER OF USERS WITH THIS STYLE TO THE DROP DOWN.
# SKIP TO THE NEXT FILE IF YOU DO NOT WISH TO ADD THIS FEATURE)
#-----[ OPEN ]------------------------------------------
#
includes/functions_selects.php

#
#-----[ ]------------------------------------------
#
$selected = ( $row['themes_id'] == $default_style ) ? ' selected="selected"' : '';

$style_select .= '<option value="' . $row['themes_id'] . '"' . $selected . '>' . $row['style_name'] . '</option>';

#
#-----[ ]------------------------------------------
#
//begin theme count
$tcount=0;
$t_id = $row['themes_id'];
$tsql = "SELECT user_style FROM " . USERS_TABLE . " WHERE user_style = $t_id";
if ( !($tresult = $db->sql_query($tsql)) ){
message_die(GENERAL_ERROR, "Couldn't query user table", "", __LINE__, __FILE__, $sql);}
while ( $trow = $db->sql_fetchrow($tresult) ) {
$tcount++; }
$selected = ( $row['themes_id'] == $default_style ) ? ' selected="selected"' : '';
$style_select .= '<option value="' . $row['themes_id'] . '"' . $selected . '>' . $row['style_name'] . ' [users: ' . $tcount . ']</option>';

#
#-----[ ]------------------------------------------
#
templates/subSilver/index_body.tpl
#
#-----[ ]------------------------------------------
#
{CURRENT_TIME}
#
#-----[ ]------------------------------------------
#
</td>

#
#-----[ , ]------------------------------------------
#

<td align=center valign=middle><span class="gensmall">
<!-- BEGIN switch_user_logged_out -->
<form method="post" action="{U_INDEX}"><b>{L_SELECT_STYLE}:</b>
<br>{TEMPLATE_SELECT} <input type="submit" class="mainoption" name="cangenow" value="{L_CHANGE_NOW}" />
</form>
<!-- END switch_user_logged_out -->
<!-- BEGIN switch_user_logged_in -->
<form method="post" action="{U_INDEX}"><b>{L_SELECT_STYLE}:</b>
<br>{FPAGE_STYLE} <input type="submit" class="mainoption" name="fpcangenow" value="{L_CHANGE_NOW}" />
</form>
<!-- END switch_user_logged_in -->
</span></td>
#
#-----[ SAVE ]------------------------------------------
#
#


!

/ /