|
From: OryNider <ory...@us...> - 2008-02-08 05:22:18
|
Update of /cvsroot/mxbb/mx_online_adv In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv5385 Modified Files: db_install.php db_uninstall.php mx_online_adv.php readme.txt Log Message: phpBB2 backend 2.9 module Index: db_install.php =================================================================== RCS file: /cvsroot/mxbb/mx_online_adv/db_install.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** db_install.php 28 Jun 2007 16:56:18 -0000 1.4 --- db_install.php 8 Feb 2008 05:22:14 -0000 1.5 *************** *** 2,6 **** /** * ! * @package mxBB Portal Module - mx_online_adv * @version $Id$ * @copyright (c) 2006 [Horace, OryNider] mxBB Development Team --- 2,6 ---- /** * ! * @package Mx-Publisher Module - mx_online_adv * @version $Id$ * @copyright (c) 2006 [Horace, OryNider] mxBB Development Team Index: mx_online_adv.php =================================================================== RCS file: /cvsroot/mxbb/mx_online_adv/mx_online_adv.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** mx_online_adv.php 28 Jan 2008 21:53:43 -0000 1.6 --- mx_online_adv.php 8 Feb 2008 05:22:14 -0000 1.7 *************** *** 2,6 **** /** * ! * @package mxBB Portal Module - mx_online_adv * @version $Id$ * @copyright (c) 2006 [Horace, OryNider] mxBB Development Team --- 2,6 ---- /** * ! * @package Mx-Publisher Module - mx_online_adv * @version $Id$ * @copyright (c) 2006 [Horace, OryNider] mxBB Development Team *************** *** 15,28 **** } - // - // Start session management - // - //$mx_user->init($user_ip, PAGE_INDEX); - // - // End session management - // - - include_once($module_root_path . 'includes/online_common.'.$phpEx); // Get all remain sessions --- 15,20 ---- } + include($module_root_path . 'includes/online_common.'.$phpEx); // Get all remain sessions *************** *** 67,73 **** $online_userlist = ''; $l_online_users = ''; ! $uot_this_timestamp_array = getdate(); $uot_when_from = mktime(0, 0, 0, $uot_this_timestamp_array[mon], $uot_this_timestamp_array[mday], $uot_this_timestamp_array[year]); ! $uot_hidden_count = 0; // ================================================================================ --- 59,65 ---- $online_userlist = ''; $l_online_users = ''; ! $uot_this_timestamp_array = getdate(); $uot_when_from = mktime(0, 0, 0, $uot_this_timestamp_array[mon], $uot_this_timestamp_array[mday], $uot_this_timestamp_array[year]); ! $uot_hidden_count = 0; // ================================================================================ *************** *** 90,198 **** if ($parm1_display_today == 'TRUE') { ! $sql = "SELECT count(*) cnt ! FROM " . USERS_TABLE . " u ! WHERE u.user_session_time >= " . $uot_when_from . " ! ORDER BY u.username ASC"; ! ! if (!($uot_result = $db->sql_query($sql))) ! { ! mx_message_die(GENERAL_ERROR, 'Could not obtain regd user/online information', '', __LINE__, __FILE__, $sql); ! } ! ! $row = $db->sql_fetchrow($uot_result); ! $uot_count = $row['cnt']; ! ! $sql = "SELECT u.user_id, u.username, u.user_allow_viewonline, u.user_level, user_session_time ! FROM " . USERS_TABLE . " u ! WHERE u.user_session_time >= " . $uot_when_from . " ! ORDER BY u.username ASC"; ! ! if (!($uot_result = $db->sql_query($sql))) ! { ! mx_message_die(GENERAL_ERROR, 'Could not obtain regd user/online information', '', __LINE__, __FILE__, $sql); ! } ! $users_online_today = array(); ! while ($row = $db->sql_fetchrow($uot_result)) ! { ! $$which_counter++; ! $row_color = ($$which_counter % 2) ? $theme['td_color1'] : $theme['td_color2']; ! $row_class = ($$which_counter % 2) ? $theme['td_class1'] : $theme['td_class2']; ! //generate the user name (robbed from the code above) ! $uot_user_id = $row['user_id']; ! //reset the style... ! $uot_style = ''; ! if ($uot_user_id != $prev_user) ! { ! $uot_username_plain = $uot_username = $row['username']; ! if ($row['user_level'] == ADMIN) ! { ! $uot_style = 'style="color:#' . $theme['fontcolor3'] . ';"'; ! $uot_username = '<b>' . $uot_username . '</b>'; ! } ! else if ($row['user_level'] == MOD) ! { ! $uot_style = 'style="color:#' . $theme['fontcolor2'] . ';"'; ! $uot_username = '<b>' . $uot_username . '</b>'; } ! if (!$row['user_allow_viewonline']) ! { ! $uot_hidden_count++; ! $view_online = ( $userdata['user_level'] == ADMIN ) ? true : false; ! $uot_username = $lang['UOT_hidden_start'] . $uot_username . $lang['UOT_hidden_end']; ! } ! else ! { ! $view_online = true; ! } ! } ! //annon does not have a profile... if($row['user_id'] > 0) ! { ! $uot_username = sprintf('<a href="' . PHPBB_URL . 'profile.php?mode=viewprofile&u=%d" title="%s was last here at: %s" %s>%s</a>',$uot_user_id,$uot_username_plain,create_date('g:ia', $row['user_session_time'], $board_config['board_timezone']),$uot_style,$uot_username); ! } ! ! //this will show just the user's name, with the time in the tool tip. ! if($view_online) ! { ! array_push($users_online_today, $uot_username); ! } ! } if(count($users_online_today)==0) ! { ! array_push($users_online_today,$lang['UOT_none']); ! } if( $userdata['user_level'] == ADMIN && $uot_hidden_count>0) ! { ! array_push($users_online_today,sprintf($lang['UOT_hidden'], $uot_hidden_count)); ! } ! if ($parm2_put_today_bottom == 'TRUE') { ! $template->assign_block_vars('show_today_mode_bottom', array( ! 'UOT_TITLE' => sprintf($lang['UOT_title'], $uot_count), ! 'UOT_COUNT' => $uot_count, ! 'UOT_LIST' => implode(", ",$users_online_today) ! ) ); } else { ! $template->assign_block_vars('show_today_mode_top', array( ! 'UOT_TITLE' => sprintf($lang['UOT_title'], $uot_count), ! 'UOT_COUNT' => $uot_count, ! 'UOT_LIST' => implode(", ",$users_online_today) ! ) ); } --- 82,184 ---- if ($parm1_display_today == 'TRUE') { ! $sql = "SELECT count(*) cnt ! FROM " . USERS_TABLE . " u ! WHERE u.user_session_time >= " . $uot_when_from . " ! ORDER BY u.username ASC"; ! ! if (!($uot_result = $db->sql_query($sql))) ! { ! mx_message_die(GENERAL_ERROR, 'Could not obtain regd user/online information', '', __LINE__, __FILE__, $sql); ! } ! $row = $db->sql_fetchrow($uot_result); ! $uot_count = $row['cnt']; ! $sql = "SELECT u.user_id, u.username, u.user_allow_viewonline, u.user_level, user_session_time ! FROM " . USERS_TABLE . " u ! WHERE u.user_session_time >= " . $uot_when_from . " ! ORDER BY u.username ASC"; ! ! if (!($uot_result = $db->sql_query($sql))) ! { ! mx_message_die(GENERAL_ERROR, 'Could not obtain regd user/online information', '', __LINE__, __FILE__, $sql); ! } ! $users_online_today = array(); ! while ($row = $db->sql_fetchrow($uot_result)) ! { ! $$which_counter++; ! $row_color = ($$which_counter % 2) ? $theme['td_color1'] : $theme['td_color2']; ! $row_class = ($$which_counter % 2) ? $theme['td_class1'] : $theme['td_class2']; ! ! //generate the user name (robbed from the code above) ! $uot_user_id = $row['user_id']; ! ! //reset the style... ! $uot_style = ''; ! if ($uot_user_id != $prev_user) ! { ! $uot_username_plain = $uot_username = $row['username']; ! if ($row['user_level'] == ADMIN) ! { ! $uot_style = 'style="color:#' . $theme['fontcolor3'] . ';"'; ! $uot_username = '<b>' . $uot_username . '</b>'; ! } ! else if ($row['user_level'] == MOD) ! { ! $uot_style = 'style="color:#' . $theme['fontcolor2'] . ';"'; ! $uot_username = '<b>' . $uot_username . '</b>'; } ! if (!$row['user_allow_viewonline']) ! { ! $uot_hidden_count++; ! $view_online = ( $userdata['user_level'] == ADMIN ) ? true : false; ! $uot_username = $lang['UOT_hidden_start'] . $uot_username . $lang['UOT_hidden_end']; ! } ! else ! { ! $view_online = true; ! } ! } ! //annon does not have a profile... if($row['user_id'] > 0) ! { ! $uot_username = sprintf('<a href="' . PHPBB_URL . 'profile.php?mode=viewprofile&u=%d" title="%s was last here at: %s" %s>%s</a>',$uot_user_id,$uot_username_plain,create_date('g:ia', $row['user_session_time'], $board_config['board_timezone']),$uot_style,$uot_username); ! } ! ! //this will show just the user's name, with the time in the tool tip. ! if($view_online) ! { ! array_push($users_online_today, $uot_username); ! } ! } if(count($users_online_today)==0) ! { ! array_push($users_online_today,$lang['UOT_none']); ! } if( $userdata['user_level'] == ADMIN && $uot_hidden_count>0) ! { ! array_push($users_online_today,sprintf($lang['UOT_hidden'], $uot_hidden_count)); ! } ! if ($parm2_put_today_bottom) { ! $template->assign_block_vars('show_today_mode_bottom', array( ! ) ); } else { ! $template->assign_block_vars('show_today_mode_top', array( ! ) ); } *************** *** 201,206 **** if ($parm3_show_icon == 'TRUE') { ! $template->assign_block_vars('hide_left_icon', array( ! ) ); } --- 187,192 ---- if ($parm3_show_icon == 'TRUE') { ! $template->assign_block_vars('hide_left_icon', array( ! ) ); } *************** *** 241,245 **** { $row['username'] = '<b>' . $row['username'] . '</b>'; ! $style_color = 'style="color:#' . $theme['fontcolor2'] . '"'; } --- 227,231 ---- { $row['username'] = '<b>' . $row['username'] . '</b>'; ! $style_color = 'style="color:#' . $theme['fontcolor2'] . '"'; } *************** *** 290,294 **** $lycos_color = 'style="font-weight: bold;"'; ! $spiders = str_replace('google','<span style="font-weight: bold; color: #2244BB;">G</span><span style="font-weight: bold; color: #DD2222;">o</span><span style="font-weight: bold; color: #EEBB00;">o</span><span style="font-weight: bold; color: #2244BB;">g</span><span style="font-weight: bold; color: #339933;">l</span><span style="font-weight: bold; color: #DD2222;">e</span>',$spiders); $spiders = str_replace('adsense','<span ' . $yahoo_color . '>adsense</span>',$spiders); $spiders = str_replace('msn','<span ' . $msn_color . '>msn</span>',$spiders); --- 276,280 ---- $lycos_color = 'style="font-weight: bold;"'; ! $spiders = str_replace('google','<span style="font-weight: bold; color: #2244BB;">G</span><span style="font-weight: bold; color: #DD2222;">o</span><span style="font-weight: bold; color: #EEBB00;">o</span><span style="font-weight: bold; color: #2244BB;">g</span><span style="font-weight: bold; color: #339933;">l</span><span style="font-weight: bold; color: #DD2222;">e</span>',$spiders); $spiders = str_replace('adsense','<span ' . $yahoo_color . '>adsense</span>',$spiders); $spiders = str_replace('msn','<span ' . $msn_color . '>msn</span>',$spiders); *************** *** 436,442 **** // removing them // ! $total_posts = phpBB2::get_db_stat('postcount'); ! $total_users = phpBB2::get_db_stat('usercount'); ! $newest_userdata = phpBB2::get_db_stat('newestuser'); $newest_user = $newest_userdata['username']; $newest_uid = $newest_userdata['user_id']; --- 422,428 ---- // removing them // ! $total_posts = (@function_exists( 'mx_get_db_stat' )) ? mx_get_db_stat('postcount') : phpBB2::get_db_stat('postcount'); ! $total_users = (@function_exists( 'mx_get_db_stat' )) ? mx_get_db_stat('usercount') : phpBB2::get_db_stat('usercount'); ! $newest_userdata = (@function_exists( 'mx_get_db_stat' )) ? mx_get_db_stat('newestuser') : phpBB2::get_db_stat('newestuser'); $newest_user = $newest_userdata['username']; $newest_uid = $newest_userdata['user_id']; *************** *** 495,498 **** --- 481,487 ---- 'NEWEST_USER' => sprintf($lang['Newest_user'], '<a href="' . append_sid(PHPBB_URL."profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$newest_uid") . '">', $newest_user, '</a>'), + 'UOT_TITLE' => sprintf($lang['UOT_title'], $uot_count), + 'UOT_COUNT' => $uot_count, + 'UOT_LIST' => implode(", ",$users_online_today) )); Index: readme.txt =================================================================== RCS file: /cvsroot/mxbb/mx_online_adv/readme.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** readme.txt 26 Jun 2007 16:39:41 -0000 1.2 --- readme.txt 8 Feb 2008 05:22:14 -0000 1.3 *************** *** 1,8 **** /********************************************************************************\ | ! | subject : mx-portal, CMS & portal, module | name : mx_online | copyright : (C) 2002-2005 MX-System ! | mxBB project site : www.mx-system.com | | --- 1,8 ---- /********************************************************************************\ | ! | subject : mx-publisher, CMS & portal, module | name : mx_online | copyright : (C) 2002-2005 MX-System ! | mxBB project site : www.mx-publisher.com | | *************** *** 10,14 **** | Who is Online Advance statistics. | ! | author : mxBB-Development Team | (see additional credit below) | --- 10,14 ---- | Who is Online Advance statistics. | ! | author : MXP-Development Team | (see additional credit below) | Index: db_uninstall.php =================================================================== RCS file: /cvsroot/mxbb/mx_online_adv/db_uninstall.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** db_uninstall.php 26 Jun 2007 16:39:41 -0000 1.2 --- db_uninstall.php 8 Feb 2008 05:22:14 -0000 1.3 *************** *** 2,6 **** /** * ! * @package mxBB Portal Module - mx_online_adv * @version $Id$ * @copyright (c) 2006 [Horace, OryNider] mxBB Development Team --- 2,6 ---- /** * ! * @package Mx-Publisher Module - mx_online_adv * @version $Id$ * @copyright (c) 2006 [Horace, OryNider] mxBB Development Team |