www.clan-themes.co.uk :: View topic - Users of the day and color groups
Welcome To Clan Themes
As the board grows please remember the Search Option and we hope you find our community useful.
We also monitor Private Messages to stop members from abusing our sites system. If you are asking for assistance please provide your site link and nuke version, Thanks.
Status: Offline
0.51 posts per day Medals: 1 (View more...)
Joined: Oct 04, 2007
Last Visit: 30 Jun 2008
Posts: 143 Points: 3848
Re: Users of the day and color groupsPosted:
Wed Mar 26, 2008 5:41 am
I changed my Mod to advance group color as you recommended for me
but this time, it's not showing the groups on the forums main page, and I'm still facing the same old problem in here
I'm really sorry, but I'm still a noob is this things and trying to learn it
Status: Offline
0.51 posts per day Medals: 1 (View more...)
Joined: Oct 04, 2007
Last Visit: 30 Jun 2008
Posts: 143 Points: 3848
Users of the day and color groupsPosted:
Sun Mar 30, 2008 2:43 pm
I did, and I made the changes they mentioned, but strangely nothing happened.
I'm going to check my edits again even though I did many times and all in its place though,, and here is my page_header.php
maybe i still made a mistake in here.
// ############ Edit below ############
// #
$display_not_day_userlist = 0; // change to 1 here if you also want the list of the users who didn't visit to be displayed
$users_list_delay = 24; // change here to the number of hours wanted for the list
// #
// ############ Edit above ############
$sql = "SELECT user_id, username, user_allow_viewonline, user_level, user_session_time
FROM ".USERS_TABLE."
WHERE user_id > 0
ORDER BY IF(user_level=1,3,user_level) DESC, username ASC";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain user/day information', '', __LINE__, __FILE__, $sql);
}
//
// Obtain number of new private messages
// if user is logged in
//
if ( ($userdata['session_logged_in']) && (empty($gen_simple_header)) )
{
if ( $userdata['user_new_privmsg'] )
{
$l_message_new = ( $userdata['user_new_privmsg'] == 1 ) ? $lang['New_pm'] : $lang['New_pms'];
$l_privmsgs_text = sprintf($l_message_new, $userdata['user_new_privmsg']);
if ( $userdata['user_last_privmsg'] > $userdata['user_lastvisit'] )
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_last_privmsg = " . $userdata['user_lastvisit'] . "
WHERE user_id = " . $userdata['user_id'];
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update private message new/read time for user', '', __LINE__, __FILE__, $sql);
}
//
// Generate HTML required for Mozilla Navigation bar
//
if (!isset($nav_links))
{
$nav_links = array();
}
$nav_links_html = '';
$nav_link_proto = '<link>' . "\n";
while( list($nav_item, $nav_array) = @each($nav_links) )
{
if ( !empty($nav_array['url']) )
{
$nav_links_html .= sprintf($nav_link_proto, $nav_item, append_sid($nav_array['url']), $nav_array['title']);
}
else
{
// We have a nested array, used for items like <link> that can occur more than once.
while( list(,$nested_array) = each($nav_array) )
{
$nav_links_html .= sprintf($nav_link_proto, $nav_item, $nested_array['url'], $nested_array['title']);
}
}
}
// Format Timezone. We are unable to use array_pop here, because of PHP3 compatibility
$l_timezone = explode('.', $board_config['board_timezone']);
$l_timezone = (count($l_timezone) > 1 && $l_timezone[count($l_timezone)-1] != 0) ? $lang[sprintf('%.1f', $board_config['board_timezone'])] : $lang[number_format($board_config['board_timezone'])];
/* Start Username Color Mod By aUsTiN */
define('COLORS', $prefix .'_bbadvanced_username_color');
$q = "SELECT *
FROM ". COLORS ."
WHERE group_id > '0'
ORDER BY group_name ASC";
$r = $db -> sql_query($q);
while($row = $db -> sql_fetchrow($r))
{
$template->assign_block_vars('colors', array(
"GROUPS" => " [ <a><font color='". $row['>". $row['group_name'] ."</font></a> ] ")
);
}
/* End Username Color Mod By aUsTiN */
//
// The following assigns all _common_ variables that may be used at any point
// in a template.
//
if ( !empty($userdata['user_popup_pm']) )
{
$template->assign_block_vars('switch_enable_pm_popup', array());
}
}
// Add no-cache control for cookies if they are set
//$c_no_cache = (isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_sid']) || isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_data'])) ? 'no-cache="set-cookie", ' : '';
// Work around for "current" Apache 2 + PHP module which seems to not
// cope with private cache control setting
if (!empty($HTTP_SERVER_VARS['SERVER_SOFTWARE']) && strstr($HTTP_SERVER_VARS['SERVER_SOFTWARE'], 'Apache/2'))
{
header ('Cache-Control: no-cache, pre-check=0, post-check=0');
}
else
{
header ('Cache-Control: private, pre-check=0, post-check=0, max-age=0');
}
header ('Expires: 0');
header ('Pragma: no-cache');