From 48f33b0d3ca4b36e58425885f757be87cb5af655 Mon Sep 17 00:00:00 2001 From: nanosimbiot Date: Sun, 21 Aug 2011 16:46:43 +0000 Subject: [PATCH] r240 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit отключение окраски git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@240 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293 --- upload/config.php | 3 ++- upload/includes/functions.php | 2 ++ upload/includes/online_userlist.php | 19 +++---------------- 3 files changed, 7 insertions(+), 17 deletions(-) diff --git a/upload/config.php b/upload/config.php index 781e9d669..150c06960 100644 --- a/upload/config.php +++ b/upload/config.php @@ -57,7 +57,7 @@ $bb_cfg['css_ver'] = 1; // Increase number of revision after update $bb_cfg['tp_version'] = '2.1 Stable'; -$bb_cfg['tp_release_state'] = 'R239'; +$bb_cfg['tp_release_state'] = 'R240'; $bb_cfg['tp_release_date'] = '22-08-2011'; $bb_cfg['board_disabled_msg'] = 'форум временно отключен'; // 'forums temporarily disabled'; // show this msg if board has been disabled via ON/OFF trigger @@ -437,6 +437,7 @@ $bb_cfg['max_smilies'] = 10; // Максимальное $bb_cfg['log_days_keep'] = 90; // Users +$bb_cfg['color_nick'] = true; // Окраска ников пользователей по user_rank $bb_cfg['user_not_activated_days_keep'] = 7; // "not activated" == "not finished registration" $bb_cfg['user_not_active_days_keep'] = 180; // inactive users but only with no posts diff --git a/upload/includes/functions.php b/upload/includes/functions.php index c9678dfab..2f9b1a2c8 100644 --- a/upload/includes/functions.php +++ b/upload/includes/functions.php @@ -2820,6 +2820,8 @@ function profile_url($data) if(empty($title)) $title = 'User'; if(empty($style)) $style = 'colorUser'; + if(!$bb_cfg['color_nick']) $style = ''; + $username = !empty($data['username']) ? $data['username'] : $lang['GUEST']; $user_id = (!empty($data['user_id']) && $username != $lang['GUEST']) ? $data['user_id'] : ANONYMOUS; diff --git a/upload/includes/online_userlist.php b/upload/includes/online_userlist.php index c3d36da5d..be9ee17d4 100644 --- a/upload/includes/online_userlist.php +++ b/upload/includes/online_userlist.php @@ -27,7 +27,7 @@ $online = $online_short = array('userlist' => ''); $sql = " SELECT - u.username, u.user_id, u.user_opt, u.user_level, + u.username, u.user_id, u.user_opt, u.user_rank, u.user_level, u.ignore_srv_load, s.session_logged_in, s.session_ip, (s.session_time - s.session_start) AS ses_len, COUNT(s.session_id) AS sessions, COUNT(DISTINCT s.session_ip) AS ips FROM ". BB_SESSIONS ." s, ". BB_USERS ." u @@ -42,33 +42,24 @@ foreach (DB()->fetch_rowset($sql) as $u) if ($u['session_logged_in']) { $stat = array(); - $style_color = $class = ''; - $name = $u['username']; + $name = profile_url($u); $level = $u['user_level']; if ($level == ADMIN) { $name = "$name"; - $class = ' class="colorAdmin"'; $users_cnt['admin']++; } else if ($level == MOD) { $name = "$name"; - $class = ' class="colorMod"'; $users_cnt['mod']++; } else if ($level == GROUP_MEMBER) { $name = "$name"; - $class = ' class="colorGroup"'; $users_cnt['group_member']++; } - else if ($u['ignore_srv_load']) - { - $class = ' class="colorISL"'; - $users_cnt['ignore_load']++; - } else { $users_cnt['user']++; @@ -91,11 +82,7 @@ foreach (DB()->fetch_rowset($sql) as $u) $stat[] = "t:$t"; } - $h = PROFILE_URL . $u['user_id']; - $u = ""; - $u .= ($stat) ? "$name [". join(', ', $stat) .']' : $name; - $u .= ''; - $ulist[$level][] = $u; + $ulist[$level][] = ($stat) ? "$name [". join(', ', $stat) .']' : $name; } else {