New articles Năng lực quản lý: nhân tố thứ năm     ♥ Lựa chọn mục tiêu cuộc đời     ♥ 10 bí quyết cân bằng công việc và gia đình     ♥ Cô đơn trên mạng     ♥ Chứng khoán: Giấc mơ và ác mộng     ♥ Tám     ♥ Những tính năng của blog VnVista     ♥ Các mạng xã hội thống trị Google     ♥ Điều gì tạo nên một giám đốc công nghệ thông tin giỏi?     ♥ Cố gắng xóa bỏ những ấn tượng xấu     ♥ Cần một cách làm ăn mới     ♥ Tiếp thị hướng đến doanh nhân     ♥ Đưa cửa hàng thật lên chợ ảo     ♥ Bí quyết quản lý các nhân viên trẻ     ♥ Một số câu hỏi phỏng vấn “đặc biệt” của Microsoft     ♥ 4 bài học thành công trong kinh doanh     ♥ Tạo dựng hình ảnh một cô gái trẻ chuyên nghiệp     ♥ Góc “khác” của thế giới online đêm     ♥ Phong cách người Mỹ     ♥ Chỉ nghĩ đến tiền cũng làm người ta ích kỷ     
New blog entries Các loại visa Qatar phổ biến mà bạn cần biết      ♥ Tủ dụng cụ 2 cánh 5 ngăn KT: 1000Wx500Dx1800Hmm      ♥ Tủ dụng cụ 2 cánh 5 ngăn KT: 1000Wx500Dx1800Hmm      ♥ Tủ dụng cụ 2 cánh 5 ngăn KT: 1000Wx500Dx1800Hmm      ♥ SHEET Nếu đời không có anh      ♥ Phụ Gia Nhựa Làm Giảm Co Ngót Sau Gia Công Ép Phun      ♥ Địa chỉ mua giày bảo hộ nam chính hãng      ♥ SHEET Giây phút êm đềm      ♥ Máy Triệt Lông Công Nghệ Cao K18A      ♥ Cách chọn giày bảo hộ tại Đà Nẵng      ♥ hình ảnh Yae Miko Game Genshin Impact      ♥ Cách bảo quản và vệ sinh giày bảo hộ lao động      ♥ SHEET Yêu 1 người sao buồn đến thế      ♥ Bí quyết bảo quản giày bảo hộ lao động      ♥ Máy Triệt Lông Lạnh Diode Laser K17      ♥ Công Nghệ Đùn Ống Nhựa Với Hạt Nhựa Nguyên Sinh      ♥ SHEET Xin cho 1 tiếng kinh cầu      ♥ máy nâng cơ xóa nhăn      ♥ Top 5 dầu gội thảo dược Việt nam 2025      ♥ Nhà phân phối giày bảo hộ tại Đà Nẵng uy tín      
 
Reply to this topicStart new topicStart Poll

Liệt Kê · [ Bình Thường ] · Tách Biệt+

Mod xem số người online trong ngày


Tacaza
post Sep 7 2005, 12:51 AM
Gửi vào: #1


Group Icon

The chALLeNgER
**********
Thành viên: 1
Nhập: 3-July 05
Bài viết: 3,003
Tiền mặt: 1,210
Thanked: 1572
Cấp bậc: 43
------
Giới tính: Male
Sinh nhật: 3 Tháng 4 - 1983
Đến từ: Hà Nội
------
Xem blog
Bạn bè: 253 (Xem)
Thêm vào nhóm bạn bè
Gửi thiệp điện tử
Trang thông tin





Mod này sẽ cho bạn biết những thành viên đã online trong ngày, số lượng khách, & số lần các search engine tới crawl website bạn.
Bắt đầu nào:

Bước 1 (Files):

Mở file ./sources/boards.php

Tìm:
CODE
//-----------------------------------
 // Add in show online users
 //-----------------------------------

 $stats_html .= $this->statfunc->active_users();

Thêm bên dưới:

CODE
//-----------------------------------
    // Add in show online users for today
    //-----------------------------------

    $stats_html .= $this->statfunc->online_users();


Mở file ./sources/lib/boardstats_functions.php

Tìm:

CODE
var $users_online  = "";


Thêm bên dưới:

CODE
var $wwo_users_online  = "";


Tìm:

CODE
function register_class(&$class)
{
 $this->class = $class;

 $this->sep_char = '<{ACTIVE_LIST_SEP}>';
}


Thêm bên dưới:

CODE
//*-------------------------------------------------------------------------*/
//
// SHOW ONLINE USERS FOR TODAY
//
/*-------------------------------------------------------------------------*/

function online_users()
{
 global $DB, $std, $ibforums;
 //--------------------------------
 // Enabled or disabled?
 //--------------------------------

       if ($ibforums->vars['enable_wwo'])
       {

        //--------------------------------
        // Our globals :)
        //--------------------------------

        //--------------------------------
        // Main data variable
        //--------------------------------

           $members = array( 'TOTAL'    => 0 ,
                             'NAMES'    => "",
                             'SPIDERS'  => 0 ,
                             'GUESTS'   => 0 ,
                             'MEMBERS'  => 0 ,
                             'ANON'     => 0 ,
                             'LINKS'  => "",
                             'GROUPS'  => "",
                             'T_GUESTS' => "",
                             'T_SPIDERS' => ""
                        );
        //--------------------------------
        // Member count for server
        //--------------------------------

        $realmemcount  = 0;

        //--------------------------------
        // Groups' info cache
        //--------------------------------

 $groups   = array ();

            //--------------------------------
        // Gonna eat some cookies
 //--------------------------------

           $filt = trim($std->my_getcookie ('wwo_filter'));

           if (($filt == "") and ($ibforums->input['wwo'] == ""))
           {
 if ($ibforums->vars['filter_wwo_hide'])
               {
             $ibforums->input['wwo'] = "0";
  }
 else
            {
             $ibforums->input['wwo'] = "10";
            }
           }

           if ($ibforums->input['wwo'] != "")
           {
 $std->my_setcookie('wwo_filter', $ibforums->input['wwo']);
               $filt = $ibforums->input['wwo'];
           }

 //--------------------------------
        // Let's set-up our filters
 //--------------------------------

           $posted_only = ( substr ($filt, 0, 1) == "2" );

           if ($filt != "0")
           {
            $filter = substr ($filt, 1);
           }

            //--------------------------------
            // All this GMT stuff is really annoying
        // But we should go around this if our members live in other time zones than server
 //--------------------------------
        // So we getting server timestamp what for end-user will be his midnight time
    //--------------------------------

        $realtimestamp  = mktime(0,0,0,date("m,d,Y"));
        $timestamp  = time() - (($std->get_time(time(), "H" ) * 3600) + ($std->get_time(time(), "i" ) * 60) + $std->get_time(time(), "s" ) );

 //--------------------------------
        // We should get members who was online today for both server and client

            // If we should show this of course
 //--------------------------------

           if (($ibforums->vars['show_wwo']) and ($ibforums->member['g_can_view_wwo']))
           {
            $use_timestamp_s = min ($timestamp, $realtimestamp);
            $use_timestamp_e = max (($timestamp + 86399), ($realtimestamp + 86399));
           }
           else
           {
 $use_timestamp_s = $realtimestamp;
 $use_timestamp_e = $realtimestamp + 86399;
           }

 //--------------------------------
 // Get the users from the DB
 //--------------------------------

            $DB->simple_construct(array('select' => 'id, name, last_activity, posts, last_post, last_ip, login_anonymous, mgroup',
                 'from' => 'members',
                                         'where' => "id != 0 AND mgroup != {$ibforums->vars['guest_group']}
                                             AND (last_activity BETWEEN '{$use_timestamp_s}' AND '{$use_timestamp_e}')",
                                         'order' => "last_activity DESC"));
 $DB->simple_exec();

            //-----------------------------------------
 // FETCH...
 //-----------------------------------------

 while ($r = $DB->fetch_row() )
 {

                if (($r['last_activity'] >= $timestamp) and ($r['last_activity'] < ($timestamp + 86400)))
         {
                 $rows[] = $r;
  }

                //--------------------------------
                // Server's just only counts
  //--------------------------------

                if (($r['last_activity'] >= $realtimestamp) and ($r['last_activity'] < ($realtimestamp + 86400)))
             {
                 $realmemcount++;
             }
 }

           //--------------------------------
           // Client should get extra info, if allowed, of course
           //--------------------------------

           if (($ibforums->vars['show_wwo']) and ($ibforums->member['g_can_view_wwo']))
           {
 if ( !empty($rows) )
 {
            foreach ( $rows as $r )
            {
                   //--------------------------------
                   // Why should we redo this comparsion?
                   //--------------------------------

                   $posted_today = (($r['last_post'] >= $timestamp) and ($r['last_post'] < ($timestamp + 86400)));

                   //--------------------------------
                   // Getting login type
                   //--------------------------------

                   $be_anon = substr( $r['login_anonymous'], 0, 1 );

                   //--------------------------------
                   // Yeah, count'em all
                   //--------------------------------

                   $members['TOTAL']++;

                   //--------------------------------
                   // Getting group info for current member
                   //--------------------------------

                   $g = $ibforums->cache['group_cache'][$r['mgroup']];

                   //--------------------------------
                   // Just writing group infos, if we need to do so
                   //--------------------------------

                   if ($ibforums->vars['show_wwo_groups'])
                   {
                       $groups [($r['mgroup'])]['names'] = preg_replace ( array("/<#NAME#>/", "/<#POSTED#>/"),
                                                                          array("<a href='{$ibforums->base_url}act=idx&wwo=1{$r['mgroup']}'>{$g['g_wwo_prefix']}{$g['prefix']}{$g['g_title']}{$g['suffix']}{$g['g_wwo_suffix']}</a>",
                                                                                "<a href='{$ibforums->base_url}act=idx&wwo=2{$r['mgroup']}'>{$g['g_wwo_post_prefix']}{$g['prefix']}{$ibforums->lang['wwo_posted']}{$g['suffix']}{$g['g_wwo_post_suffix']}</a>"),
                                                                          $ibforums->lang['wwo_g_info']
                                                                        );
                       $groups [($r['mgroup'])]['count']++;

                       if ($posted_today)
                       {
                           $groups [($r['mgroup'])]['posted_count']++;
                       }
                   }

                   //--------------------------------
                   // Filter it up
                   //--------------------------------
                   // Default - show
                   //--------------------------------

                   $add = true;

                   //--------------------------------
                   //  Can we see anonymous logins?
                   //--------------------------------

                   if ($be_anon == 1)
                   {
                       $members['ANON']++;
                       $add = ( ($ibforums->member['mgroup'] == $ibforums->vars['admin_group']) and ($ibforums->vars['disable_admin_anon'] != 1) );
                   }

                   //--------------------------------
                   //  Checking filters
                   //--------------------------------

                   $add = (($add) and (( $r['mgroup'] == $filter ) or ( $filter == "0" )));
                   $add = (($add) and ((!$posted_only) or ($posted_today)));

                   //--------------------------------
                   //  So, we about to add member to list
                   //--------------------------------
                   if ($add)
                   {
                       //--------------------------------
                       // Building user info
                       //--------------------------------

                       $user_info  = "{$ibforums->lang['last_activity']}".$std->get_date($r['last_activity'], 'LONG');
                       $user_info .= "\n{$ibforums->lang['wwo_posts']}{$r['posts']}";
                       $user_info .= "\n{$ibforums->lang['wwo_last_post']}".$std->get_date($r['last_post'], 'LONG');

                       if ($ibforums->member['mgroup'] == $ibforums->vars['admin_group'])
                       {
                           $user_info .= "\n{$ibforums->lang['wwo_ip_address']}{$r['last_ip']}";
                       }

                       if ($posted_today)
                       {
                           $members['NAMES'] .= $g['g_wwo_post_prefix'];
                           $members['NAMES'] .= "<a href='{$ibforums->base_url}showuser={$r['id']}' title='$user_info'>{$g['prefix']}{$r['name']}{$g['suffix']}</a>";
                           $members['NAMES'] .= $g['g_wwo_post_suffix'];
                           if ($be_anon == 1)
                           {
                               $members['NAMES'] .= "*";
                           }
                           $members['NAMES'] .= "{$this->sep_char} \n";
                       }
                       else
                       {
                           $members['NAMES'] .= $g['g_wwo_prefix'];
                           $members['NAMES'] .= "<a href='{$ibforums->base_url}showuser={$r['id']}' title='$user_info'>{$g['prefix']}{$r['name']}{$g['suffix']}</a>";
                           $members['NAMES'] .= $g['g_wwo_suffix'];
                           if ($be_anon == 1)
                           {
                               $members['NAMES'] .= "*";
                           }
                           $members['NAMES'] .= "{$this->sep_char} \n";
                       }
                   }

            }
 }
            $members['MEMBERS'] = $members['TOTAL'] - $members['ANON'];

            if ($members['NAMES'] != "")
            {
                $members['NAMES'] = preg_replace( "/".preg_quote($this->sep_char)."$/", "", trim($members['NAMES']) );
            }
            else
            {
                $members['NAMES'] = $ibforums->lang['wwo_empty'];
            }

            //--------------------------------
            //  Filter list make-up
            //--------------------------------

            $members['LINKS']  = "<#MARK1#><a href='{$ibforums->base_url}act=idx&wwo=10'>{$ibforums->lang['wwo_all']}</a>, ";
            $members['LINKS'] .= "<#MARK2#><a href='{$ibforums->base_url}act=idx&wwo=0'>{$ibforums->lang['wwo_none']}</a>";

            $mark1 = "";
            $mark2 = "";

            if ($filt == "10")
            {
                $mark1 = $ibforums->lang['wwo_marker'];
            }
            elseif ($filt == "0")
            {
                $mark2 = $ibforums->lang['wwo_marker'];
            }

            $members['LINKS'] = preg_replace( array ( "/<#MARK1#>/","/<#MARK2#>/" ),
                                              array ( $mark1, $mark2 ),
                                              $members['LINKS'] );

            //--------------------------------
            //  Going around groups' info
            //--------------------------------

            if ((!empty($groups)) and ($ibforums->vars['show_wwo_groups']) and ($ibforums->vars['show_wwo']) and ($ibforums->member['g_can_view_wwo']))
            {
                ksort ($groups);
                foreach ($groups as $k => $v)
                {
                    $mark           = "";
                    $posted_mark    = "";

                    if (($filter == $k) and (!$posted_only))
                    {
                        $mark           = $ibforums->lang['wwo_marker'];
                    }
                    elseif (($filter == $k) and ($posted_only))
                    {
                        $posted_mark    = $ibforums->lang['wwo_marker'];
                    }

                    $members['GROUPS'] .= preg_replace( array ( "/<#NUM#>/","/<#PNUM#>/","/<#MARK#>/","/<#PMARK#>/" ),
                                            array ($std->do_number_format(intval($v['count'])), $std->do_number_format(intval($v['posted_count'])), $mark, $posted_mark),
                                            $v['names'] ).", \n";
                }
                $members['LINKS'] .= ",";
                $members['GROUPS'] = preg_replace( "/".preg_quote(',')."$/", "", trim($members['GROUPS']) );
            }
 }

    $this->wwo_users_online = $realmemcount;

    //--------------------------------
           // Lets update log
    //--------------------------------

           if ($ibforums->vars['log_wwo'])
           {
            $DB->simple_construct( array( 'select' => '*',
                                          'from'   => 'wwo_days',
                                          'where'  => "day_id = $realtimestamp",
                                 )      );

            $DB->simple_exec();

            if ( $DB->get_num_rows() != 0 )
            {
                $r = $DB->fetch_row();

                    $members['GUESTS']  = intval($r['guests']);
                    $members['SPIDERS']  = intval($r['spiders']);

                if ($r ['was_online'] < $realmemcount)
                {
                    $DB->do_shutdown_update( 'wwo_days', array( 'was_online' => $realmemcount ), 'day_id = '.$realtimestamp );
                }
            }
            else
            {
                $DB->do_insert( 'wwo_days', array( 'day_id' => $realtimestamp,
                                                   'was_online' => $realmemcount ) );
            }
               if (($ibforums->vars['show_wwo_guest']) and ($ibforums->vars['log_wwo_guest']))
               {
                   $members['T_GUESTS'] = "{$ibforums->lang['guests']},";
               }
               else
               {
                   $members['GUESTS'] = "";
 }

               if (($ibforums->vars['show_wwo_spider']) and ($ibforums->vars['log_wwo_spider']))
               {
                   $members['T_SPIDERS'] = "{$ibforums->lang['wwo_spiders']},";
               }
               else
               {
                   $members['SPIDERS'] = "";
 }
           }

  //--------------------------------
  // Should we print this?
  //--------------------------------

           if (($ibforums->vars['show_wwo']) and ($ibforums->member['g_can_view_wwo']))
           {
         return $this->class->html->online_today($members);
           }
       }
   }


Tìm:

CODE
//----------------------------------------
  // Update the most active count if needed
  //----------------------------------------

  if ($this->users_online > $stats['most_count'])
  {
   $stats['most_count'] = $this->users_online;
   $stats['most_date']  = time();

   $DB->do_update( 'cache_store',
       array( 'cs_array' => 1, 'cs_value' => addslashes(serialize($stats)) ),
          "cs_key='stats'"
        );
  }


Thêm bên dưới:

CODE
//----------------------------------------
  // Who Was Online Statistics
  //----------------------------------------

  if (($ibforums->vars['show_most_wwo']) and ($ibforums->vars['enable_wwo']))
             {
       if ($this->wwo_users_online > $stats['wwo_most_count'])
          {
           $stats['wwo_most_count'] = $this->wwo_users_online;
               $stats['wwo_most_date']  = mktime(0,0,0,date("m,d,Y"));

               $DB->do_update( 'cache_store',
                         array( 'cs_array' => 1, 'cs_value' => addslashes(serialize($stats)) ),
                                "cs_key='stats'"
                                 );
          }
          $wwo_most_time = $std->get_date( $stats['wwo_most_date'], 'JOINED', 1 );
   $ibforums->lang['wwo_most_online'] = str_replace( "<#NUM#>" ,   $std->do_number_format($stats['wwo_most_count'])  , $ibforums->lang['wwo_most_online'] );
   $ibforums->lang['wwo_most_online'] = str_replace( "<#DATE#>",                   $wwo_most_time                    , $ibforums->lang['wwo_most_online'] );
  }


Tìm:

CODE
$ibforums->lang['most_online'] = str_replace( "<#NUM#>" ,   $std->do_number_format($stats['most_count'])  , $ibforums->lang['most_online'] );
  $ibforums->lang['most_online'] = str_replace( "<#DATE#>",                   $most_time                    , $ibforums->lang['most_online'] );

Thêm bên dưới:
//wwo
           if (($ibforums->vars['show_most_wwo']) and ($ibforums->vars['enable_wwo']))
           {
 $ibforums->lang['most_online'] .= "<br />".$ibforums->lang['wwo_most_online'];
           }
//wwo


Xem tiếp bên dưới


--------------------
Nhóm bạn bè:


dung_buong_tay

tamhonngoc_536

uchinhuong

MTTH

xuxusp2

Xem tất cả


--------------------

Sao không là mặt trời, gieo hạt nắng vô tư?


 
Nếu bạn thấy bài viết này vi phạm nội quy forum, hãy click nút này:
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Tacaza
post Sep 7 2005, 12:59 AM
Gửi vào: #2


Group Icon

The chALLeNgER
**********
Thành viên: 1
Nhập: 3-July 05
Bài viết: 3,003
Tiền mặt: 1,210
Thanked: 1572
Cấp bậc: 43
------
Giới tính: Male
Sinh nhật: 3 Tháng 4 - 1983
Đến từ: Hà Nội
------
Xem blog
Bạn bè: 253 (Xem)
Thêm vào nhóm bạn bè
Gửi thiệp điện tử
Trang thông tin





Mở file ./sources/classes/class_session.php

Tìm:

CODE
// No last visit set, do so now!

   $DB->simple_construct( array( 'update' => 'members',
            'lowpro' => 1,
            'set'    => "last_visit=".$this->time_now.", last_activity=".$this->time_now,
            'where'  => "id=".$this->member['id']
         )      );


Thay bằng:

CODE
// No last visit set, do so now!

//wwo
   $DB->simple_construct( array( 'update' => 'members',
            'lowpro' => 1,
            'set'    => "last_visit=".$this->time_now.", last_activity=".$this->time_now.", last_ip='".$this->ip_address."'",
            'where'  => "id=".$this->member['id']
         )      );
//wwo


Tìm:

CODE
list( $be_anon, $loggedin ) = explode( '&', $this->member['login_anonymous'] );

   $DB->simple_construct( array( 'update' => 'members',
            'set'    => "login_anonymous='$be_anon&1', last_visit=last_activity, last_activity=".$this->time_now,
            'where'  => "id=".$this->member['id']
         )      );


Thay bằng:

CODE
list( $be_anon, $loggedin ) = explode( '&', $this->member['login_anonymous'] );
//wwo
   $DB->simple_construct( array( 'update' => 'members',
            'set'    => "login_anonymous='$be_anon&1', last_visit=last_activity, last_activity=".$this->time_now.", last_ip='".$this->ip_address."'",
            'where'  => "id=".$this->member['id']
         )      );
//wwo


Tìm:

CODE
function create_bot_session($bot, $name="")
   {
       global $DB, $std, $ibforums;


Thêm bên dưới:

CODE
//wwo
       //--------------------------------
       // Lets update log
       //--------------------------------

       if (($ibforums->vars['log_wwo_spider']) and ($ibforums->vars['enable_wwo']))
       {
           $realtimestamp = mktime(0,0,0,date("m,d,Y"));

           $DB->simple_construct( array( 'select' => '*',
                                         'from'   => 'wwo_days',
                                         'where'  => "day_id = $realtimestamp" ) );

           $DB->simple_exec();

           if ( $DB->get_num_rows() != 0 )
           {
 $DB->simple_construct( array( 'update' => 'wwo_days', 'set' => 'spiders = spiders + 1', 'where' => "day_id = ".$realtimestamp) );
               $DB->simple_shutdown_exec();
           }
           else
           {
               $DB->do_insert( 'wwo_days', array( 'day_id' => $realtimestamp,
                                                  'spiders' => "1" ) );
           }
       }
//wwo


Tìm:

CODE
function create_guest_session()
   {
       global $DB, $std, $ibforums;


Thêm bên dưới:

CODE
//wwo
       //--------------------------------
       // Lets update log
       //--------------------------------

       if (($ibforums->vars['log_wwo_guest']) and ($ibforums->vars['enable_wwo']))
       {
           $realtimestamp = mktime(0,0,0,date("m,d,Y"));

           $DB->simple_construct( array( 'select' => '*',
                                         'from'   => 'wwo_days',
                                         'where'  => "day_id = $realtimestamp" ) );

           $DB->simple_exec();

           if ( $DB->get_num_rows() != 0 )
           {
 $DB->simple_construct( array( 'update' => 'wwo_days', 'set' => 'guests = guests + 1', 'where' => "day_id = ".$realtimestamp) );
               $DB->simple_shutdown_exec();
           }
           else
           {
               $DB->do_insert( 'wwo_days', array( 'day_id' => $realtimestamp,
                                                  'guests' => "1" ) );
           }
       }
//wwo



Mở file ./sources/admin/admin_pages.php

Tìm:

CODE
5 => array( 'Topic Views'        , 'act=stats&code=views' ),


Thêm bên dưới:

CODE
6 => array( 'Members Were Online', 'act=stats&code=online'),




Mở file ./sources/admin/ad_statistics.php

Tìm:

CODE
case 'show_views':
   $this->show_views();
   break;

  case 'views':
   $this->main_screen('views');
   break;

  //-----------------------


Thêm bên dưới:
CODE
//wwo
  case 'show_online':
   $this->show_online();
   break;

  case 'online':
   $this->main_screen('online');
   break;
  //wwo
  //-----------------------


Tìm:

CODE
default:
   $this->main_screen('reg');
   break;
 }

}


Thêm bên dưới:

CODE
//---------------------------------------------------------------------------------
//| Results screen for Members were online
//---------------------------------------------------------------------------------

function show_online()
{
 global $ibforums, $DB,  $std;

 $ibforums->admin->page_title = "Statistic Center Results";

 $ibforums->admin->page_detail = "Showing members were online statistics";

 //+---------------------

 if ( ! checkdate($ibforums->input['to_month']   ,$ibforums->input['to_day']   ,$ibforums->input['to_year']) )
 {
  $ibforums->admin->error("The 'Date To:' time is incorrect, please check the input and try again");
 }

 if ( ! checkdate($ibforums->input['from_month'] ,$ibforums->input['from_day'] ,$ibforums->input['from_year']) )
 {
  $ibforums->admin->error("The 'Date From:' time is incorrect, please check the input and try again");
 }

 //+---------------------

 $to_time   = mktime(12 ,0 ,0 ,$ibforums->input['to_month']   ,$ibforums->input['to_day']   ,$ibforums->input['to_year']  );
 $from_time = mktime(12 ,0 ,0 ,$ibforums->input['from_month'] ,$ibforums->input['from_day'] ,$ibforums->input['from_year']);

 $human_to_date   = getdate($to_time);
 $human_from_date = getdate($from_time);

 $DB->simple_construct( array( 'select' => '*', 'from' => 'wwo_days', 'where' => "day_id BETWEEN $from_time AND $to_time ", 'order' => "day_id ".$ibforums->input['sortby'] ) );
 $DB->simple_exec();

 $running_total = 0;
        $guests_total  = 0;
        $spiders_total = 0;
 $max_result    = 0;

 $results       = array();

 $ibforums->adskin->td_header[] = array( "Date"    , "20%" );

        if (($ibforums->vars['log_wwo_guest']) and ($ibforums->vars['log_wwo_spider']))
        {
         $ibforums->adskin->td_header[] = array( "Result"  , "50%" );
        }
        elseif (($ibforums->vars['log_wwo_guest']) or ($ibforums->vars['log_wwo_spider']))
        {
         $ibforums->adskin->td_header[] = array( "Result"  , "60%" );
        }
        else
        {
         $ibforums->adskin->td_header[] = array( "Result"  , "70%" );
        }

 $ibforums->adskin->td_header[] = array( "Count"   , "10%" );

 if ($ibforums->vars['log_wwo_guest'])
        {
  $ibforums->adskin->td_header[] = array( "Guests"   , "10%" );
        }

 if ($ibforums->vars['log_wwo_spider'])
        {
  $ibforums->adskin->td_header[] = array( "Spiders"   , "10%" );
        }

 //-------------------------------

 $ibforums->html .= $ibforums->adskin->start_table( "Members Were Online"
             ." ({$human_from_date['mday']} {$this->month_names[$human_from_date['mon']]} {$human_from_date['year']} to"
             ." {$human_to_date['mday']} {$this->month_names[$human_to_date['mon']]} {$human_to_date['year']})"
           );

 if ( $DB->get_num_rows() )
 {

  while ($row = $DB->fetch_row() )
  {

   if ( $row['was_online'] >  $max_result )
   {
    $max_result = $row['was_online'];
   }

   $running_total  += $row['was_online'];
                 $guests_total  += $row['guests'];
                 $spiders_total  += $row['spiders'];

   $results[] = array(
         'result_name'     => date('F jS - Y',$row['day_id']),
         'result_count'    => $row['was_online'],
         'result_guests'   => $row['guests'],
         'result_spiders'  => $row['spiders'],
     );

  }

  foreach( $results as $pOOp => $data )
  {

      $img_width = intval( ($data['result_count'] / $max_result) * 100 - 8);

      if ($img_width < 1)
      {
       $img_width = 1;
      }

      $img_width .= '%';

      unset ($res);

                $res = array ( $data['result_name'],
     "<img src='{$ibforums->adskin->img_url}/bar_left.gif' border='0' width='4' height='11' align='middle' alt=''><img src='{$ibforums->adskin->img_url}/bar.gif' border='0' width='$img_width' height='11' align='middle' alt=''><img src='{$ibforums->adskin->img_url}/bar_right.gif' border='0' width='4' height='11' align='middle' alt=''>",
    "<center>".$data['result_count']."</center>", );
                $ub = count($res);

                if ($ibforums->vars['log_wwo_guest'])
                {
                 $res[$ub] = "<center>".$data['result_guests']."</center>";
                     $ub++;
                }

   if ($ibforums->vars['log_wwo_spider'])
                {
                 $res[$ub] = "<center>".$data['result_spiders']."</center>";
                }
      $ibforums->html .= $ibforums->adskin->add_td_row( $res );
  }

  unset ($res);

             $res = array( '&nbsp;',
  "<div align='right'><b>Total</b></div>",
  "<center><b>".$running_total."</b></center>");
             $ub = count($res);

             if ($ibforums->vars['log_wwo_guest'])
             {
                 $res[$ub] = "<center><b>".$guests_total."</b></center>";
                 $ub++;
             }

             if ($ibforums->vars['log_wwo_spider'])
             {
                 $res[$ub] = "<center><b>".$spiders_total."</b></center>";
             }

  $ibforums->html .= $ibforums->adskin->add_td_row( $res );

 }
 else
 {
  $ibforums->html .= $ibforums->adskin->add_td_basic( "No results found", "center" );
 }

 $ibforums->html .= $ibforums->adskin->end_table();

 $ibforums->admin->output();

}


Tìm:

CODE
else if ($mode == 'views')
 {
  $form_code = 'show_views';

  $table     = 'Topic View Statistics';
 }


Thêm bên dưới:

CODE
else if ($mode == 'online')
 {
  $form_code = 'show_online';

  $table     = 'Members Were Online';
 }


Tìm:

CODE
if ($mode != 'views')


Thay bằng:

[/code]if (($mode != 'views') and ($mode != 'online'))
CODE


Mở file ./sources/admin/ad_groups.php

Tìm:

 [code]$prefix = preg_replace( "/'/", "'" , $std->txt_safeslashes($_POST['prefix']) );
 $prefix = preg_replace( "/&lt;/" , "<" , $prefix          );
 $suffix = preg_replace( "/'/", "'" , $std->txt_safeslashes($_POST['suffix']) );
 $suffix = preg_replace( "/&lt;/" , "<" , $suffix          );


Thêm bên dưới:

CODE
//wwo
 $wwo_prefix = preg_replace( "/'/", "'" , $std->txt_safeslashes($_POST['g_wwo_prefix']) );
 $wwo_prefix = preg_replace( "/&lt;/" , "<" , $wwo_prefix          );
 $wwo_suffix = preg_replace( "/'/", "'" , $std->txt_safeslashes($_POST['g_wwo_suffix']) );
 $wwo_suffix = preg_replace( "/&lt;/" , "<" , $wwo_suffix          );

 $wwo_post_prefix = preg_replace( "/'/", "'" , $std->txt_safeslashes($_POST['g_wwo_post_prefix']) );
 $wwo_post_prefix = preg_replace( "/&lt;/" , "<" , $wwo_post_prefix          );
 $wwo_post_suffix = preg_replace( "/'/", "'" , $std->txt_safeslashes($_POST['g_wwo_post_suffix']) );
 $wwo_post_suffix = preg_replace( "/&lt;/" , "<" , $wwo_post_suffix          );
 //wwo


Tìm:

CODE
'g_attach_per_post'    => $ibforums->input['g_attach_per_post'],


Thêm bên dưới:

CODE
//wwo
       'g_can_view_wwo'    => $ibforums->input['g_can_view_wwo'],
       'g_wwo_prefix'   => $wwo_prefix,
       'g_wwo_suffix'      => $wwo_suffix,
       'g_wwo_post_prefix'    => $wwo_post_prefix,
       'g_wwo_post_suffix'    => $wwo_post_suffix,
       //wwo


Tìm:

CODE
$prefix = preg_replace( "/'/", "'", $group['prefix'] );
 $prefix = preg_replace( "/</", "&lt;" , $prefix          );
 $suffix = preg_replace( "/'/", "'", $group['suffix'] );
 $suffix = preg_replace( "/</", "&lt;" , $suffix          );

Thêm bên dưới:

 //wwo
 $wwo_prefix = preg_replace( "/'/", "'", $group['g_wwo_prefix'] );
 $wwo_prefix = preg_replace( "/</", "&lt;" , $wwo_prefix          );
 $wwo_suffix = preg_replace( "/'/", "'", $group['g_wwo_suffix'] );
 $wwo_suffix = preg_replace( "/</", "&lt;" , $wwo_suffix          );

 $wwo_post_prefix = preg_replace( "/'/", "'", $group['g_wwo_post_prefix'] );
 $wwo_post_prefix = preg_replace( "/</", "&lt;" , $wwo_post_prefix          );
 $wwo_post_suffix = preg_replace( "/'/", "'", $group['g_wwo_post_suffix'] );
 $wwo_post_suffix = preg_replace( "/</", "&lt;" , $wwo_post_suffix          );
 //wwo


Tìm:

CODE
$ibforums->html .= $ibforums->adskin->add_td_row( array( "<b>Online List Format [Suffix]</b><br>(Can be left blank)<br>(Example:&lt;/span&gt;)" ,
             $ibforums->adskin->form_input("suffix", $suffix )
             )      );

Thêm bên dưới:

CODE
//wwo
 $ibforums->html .= $ibforums->adskin->add_td_row( array( "<b>Who Was Online List Format [Prefix]</b><br>(Can be left blank)<br>(Example:&lt;span style='color:red'&gt;)" ,
             $ibforums->adskin->form_input("g_wwo_prefix", $wwo_prefix )
             )      );

 $ibforums->html .= $ibforums->adskin->add_td_row( array( "<b>Who Was Online List Format [Suffix]</b><br>(Can be left blank)<br>(Example:&lt;/span&gt;)" ,
             $ibforums->adskin->form_input("g_wwo_suffix", $wwo_suffix )
             )      );

 $ibforums->html .= $ibforums->adskin->add_td_row( array( "<b>Who Was Online List Already Posted Format [Prefix]</b><br>(Can be left blank)<br>(Example:&lt;i&gt;&lt;span style='color:red'&gt;)" ,
             $ibforums->adskin->form_input("g_wwo_post_prefix", $wwo_post_prefix )
             )      );

 $ibforums->html .= $ibforums->adskin->add_td_row( array( "<b>Who Was Online List Already Posted Format [Suffix]</b><br>(Can be left blank)<br>(Example:&lt;/span&gt;&lt;/i&gt;)" ,
             $ibforums->adskin->form_input("g_wwo_post_suffix", $wwo_post_suffix )
             )      );
 //wwo


Tìm:

CODE
$ibforums->html .= $ibforums->adskin->add_td_row( array( "<b>Can view OFFLINE board?</b>" ,
             $ibforums->adskin->form_yes_no("g_access_offline", $group['g_access_offline'] )
             )      );


Thêm bên dưới:

CODE
//wwo
 $ibforums->html .= $ibforums->adskin->add_td_row( array( "<b>Can view who was online today?</b>" ,
             $ibforums->adskin->form_yes_no("g_can_view_wwo", $group['g_can_view_wwo'] )
             )      );
 //wwo



Mở file ./sources/admin/ad_administration.php

Tìm:

CODE
$ibforums->main_msg = 'Moderators Updated';
   break;

  //-------------------------------------------------------------
  // Stats
  //-------------------------------------------------------------

  case 'stats':


Thêm bên dưới:

CODE
//wwo
               //lets get most online during day from database, if we have log of course

               if (($ibforums->vars['show_most_wwo']) and ($ibforums->vars['log_wwo']) and ($ibforums->vars['enable_wwo']))
               {
                $DB->simple_construct( array( 'select' => '*', 'from' => 'cache_store', 'where' => "cs_key = 'stats' " ) );
                $DB->simple_exec();

                while ( $r = $DB->fetch_row() )
                {
                        if ( $r['cs_array'] )
                        {
                             $ibforums->cache[ $r['cs_key'] ] = unserialize(stripslashes($r['cs_value']));
                        }
                        else
                        {
                             $ibforums->cache[ $r['cs_key'] ] = $r['cs_value'];
                        }
                }
  $max_count = $DB->simple_exec_query( array( 'select' => 'MAX(was_online) as max_online', 'from' => 'wwo_days' ) );
  if ($max_count['max_online'] > $ibforums->cache['stats']['wwo_most_count'])
                    {
                 $ibforums->cache['stats']['wwo_most_count'] = $max_count['max_online'];
     $day = $DB->simple_exec_query( array( 'select' => 'day_id', 'from' => 'wwo_days', 'where' => "was_online = ".$max_count['max_online'], 'limit' => array("0","1") ) );
     $ibforums->cache['stats']['wwo_most_date'] = $day['day_id'];
                     $std->update_cache( array( 'name' => 'stats', 'array' => 1, 'deletefirst' => 1 ) );
                    }
               }
               //wwo



Bước 2 (Skins and langs):


Mở file ./lang/*/lang_board.php

Tìm:

CODE
$lang = array (


Thêm bên dưới:

CODE
//wwo
'today_online' => "member(s) online today",
'last_activity' => "last online: ",
'wwo_ip_address' => "IP: ",
'wwo_posts' => "posts: ",
'wwo_last_post' => "last post: ",
'wwo_spiders' => "spider bots",
'wwo_most_online' => "Most users during day was <b><#NUM#></b> on <b><#DATE#></b>",
'wwo_posted' => "have posted",
'wwo_empty' => "None",
'wwo_filter' => "Show:",
'wwo_all' => "All",
'wwo_none' => "None",
'wwo_marker' => "&gt; ",
'wwo_g_info' => "<#MARK#><b><#NUM#></b> <#NAME#> (<#PMARK#><b><#PNUM#></b> <#POSTED#>)",
//wwo


Thêm new template bit:
ACP -> Skin Manager -> *skin* -> Edit Skin Template HTML -> Board Index -> Add Template Bit
Name: online_today
Incoming Data Variables: $data
Value:
CODE
<tr>
          <td class='pformstrip' colspan='2'>$data[TOTAL] {ipb.lang['today_online']}</td>
    </tr>
    <tr>
         <td width="2%" class='row2'><{F_ACTIVE}></td>
         <td class='row4' width='95%'>
           <b>{$data[GUESTS]}</b> {$data[T_GUESTS]} <b>{$data[SPIDERS]}</b> {$data[T_SPIDERS]} <b>{$data[MEMBERS]}</b> {ipb.lang['public_members']} <b>{$data[ANON]}</b> {ipb.lang['anon_members']}
           <div class='thin'>{$data[NAMES]}</div>
           {ipb.lang['wwo_filter']} {$data[LINKS]} {$data[GROUPS]}
         </td>
       </tr>


Bước 3 (Database modification):

Upload wwo_db.php vào thư mục gốc diễn đàn & chạy bằng browser
(ví dụ: http://yoursite.com/forums/wwo_db.php).

Bước 4 (importing settings):

Vào ACP -> View All General Settings -> Import an XML settings file
--> import wwo_settings.xml

Vào ACP & enable mod trong "CPU Saving", edit nhóm nào có thể xem được số người online

Done!
Chúc vui!!!


--------------------
Nhóm bạn bè:


dung_buong_tay

tamhonngoc_536

uchinhuong

MTTH

xuxusp2

Xem tất cả


--------------------

Sao không là mặt trời, gieo hạt nắng vô tư?


 
Nếu bạn thấy bài viết này vi phạm nội quy forum, hãy click nút này:
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

cachuaxanh
post Sep 19 2005, 10:32 PM
Gửi vào: #3


Group Icon

Thực tập viên
*
Thành viên: 159
Nhập: 19-September 05
Bài viết: 1
Tiền mặt: 14
Thanked: 0
Cấp bậc: 1
------
------
Bạn bè: 0
Thêm vào nhóm bạn bè
Gửi thiệp điện tử
Trang thông tin





nếu mà dùng php như trang của mình http://cachuaxanhckt.good.to thì dùng mã như thế nào?


--------------------
Nhóm bạn bè:

Thành viên này chưa có người bạn nào trong mạng VnVista, nếu bạn muốn trở thành người bạn đầu tiên của thành viên này, hãy click vào đây


--------------------
user posted image


Cảnh cáo: (0%)----- 
Nếu bạn thấy bài viết này vi phạm nội quy forum, hãy click nút này:
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Tacaza
post Sep 19 2005, 10:43 PM
Gửi vào: #4


Group Icon

The chALLeNgER
**********
Thành viên: 1
Nhập: 3-July 05
Bài viết: 3,003
Tiền mặt: 1,210
Thanked: 1572
Cấp bậc: 43
------
Giới tính: Male
Sinh nhật: 3 Tháng 4 - 1983
Đến từ: Hà Nội
------
Xem blog
Bạn bè: 253 (Xem)
Thêm vào nhóm bạn bè
Gửi thiệp điện tử
Trang thông tin





QUOTE(cachuaxanh @ Sep 19 2005, 10:32 PM)
nếu mà dùng php như trang của mình http://cachuaxanhckt.good.to thì dùng mã như thế nào?
*



Mình không hiểu bạn hỏi. Thì IPB nào chả chạy trên php? Hay bạn muốn hỏi về việc hack mod cho invisionfree?


--------------------
Nhóm bạn bè:


dung_buong_tay

tamhonngoc_536

uchinhuong

MTTH

xuxusp2

Xem tất cả


--------------------

Sao không là mặt trời, gieo hạt nắng vô tư?


 
Nếu bạn thấy bài viết này vi phạm nội quy forum, hãy click nút này:
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

roxy
post Nov 1 2005, 12:19 AM
Gửi vào: #5
No avartar

Group Icon

Thực tập viên
*
Thành viên: 114
Nhập: 4-September 05
Bài viết: 1
Tiền mặt: 14
Thanked: 0
Cấp bậc: 1
------
------
Bạn bè: 0
Thêm vào nhóm bạn bè
Gửi thiệp điện tử
Trang thông tin





huhuhu ! nói seo mừ chẳng hiểu jì cả , tui đang cần cái nì gấp đê , có thể nói rõ hơn được ko , đưa ra cái CODE scrip cho khỏe !


--------------------
Nhóm bạn bè:

Thành viên này chưa có người bạn nào trong mạng VnVista, nếu bạn muốn trở thành người bạn đầu tiên của thành viên này, hãy click vào đây


Cảnh cáo: (0%)----- 
Nếu bạn thấy bài viết này vi phạm nội quy forum, hãy click nút này:
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Tacaza
post Nov 1 2005, 09:13 AM
Gửi vào: #6


Group Icon

The chALLeNgER
**********
Thành viên: 1
Nhập: 3-July 05
Bài viết: 3,003
Tiền mặt: 1,210
Thanked: 1572
Cấp bậc: 43
------
Giới tính: Male
Sinh nhật: 3 Tháng 4 - 1983
Đến từ: Hà Nội
------
Xem blog
Bạn bè: 253 (Xem)
Thêm vào nhóm bạn bè
Gửi thiệp điện tử
Trang thông tin





Đây không phải là hack mod cho invisionfree mà là hack mod cho diễn đàn ipb tự tay mình cài đặt bạn à.


--------------------
Nhóm bạn bè:


dung_buong_tay

tamhonngoc_536

uchinhuong

MTTH

xuxusp2

Xem tất cả


--------------------

Sao không là mặt trời, gieo hạt nắng vô tư?


 
Nếu bạn thấy bài viết này vi phạm nội quy forum, hãy click nút này:
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

miencattrang
post Nov 24 2005, 03:18 PM
Gửi vào: #7
No avartar

Group Icon

Thực tập viên
*
Thành viên: 229
Nhập: 16-October 05
Bài viết: 9
Tiền mặt: 92
Thanked: 0
Cấp bậc: 1
------
------
Bạn bè: 0
Thêm vào nhóm bạn bè
Gửi thiệp điện tử
Trang thông tin





cho mình hỏi cái này dùng cho ibf bao nhiu
như của mình hack được không?
http://www.muatrenpho.net


--------------------
Nhóm bạn bè:

Thành viên này chưa có người bạn nào trong mạng VnVista, nếu bạn muốn trở thành người bạn đầu tiên của thành viên này, hãy click vào đây


Cảnh cáo: (0%)----- 
Nếu bạn thấy bài viết này vi phạm nội quy forum, hãy click nút này:
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Tacaza
post Nov 24 2005, 03:36 PM
Gửi vào: #8


Group Icon

The chALLeNgER
**********
Thành viên: 1
Nhập: 3-July 05
Bài viết: 3,003
Tiền mặt: 1,210
Thanked: 1572
Cấp bậc: 43
------
Giới tính: Male
Sinh nhật: 3 Tháng 4 - 1983
Đến từ: Hà Nội
------
Xem blog
Bạn bè: 253 (Xem)
Thêm vào nhóm bạn bè
Gửi thiệp điện tử
Trang thông tin





Đây là mod cho ipb 2.0.x. Diễn đàn bạn là 2.1.0 thì ko dùng mod này được.


--------------------
Nhóm bạn bè:


dung_buong_tay

tamhonngoc_536

uchinhuong

MTTH

xuxusp2

Xem tất cả


--------------------

Sao không là mặt trời, gieo hạt nắng vô tư?


 
Nếu bạn thấy bài viết này vi phạm nội quy forum, hãy click nút này:
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Papillon
post Nov 24 2005, 05:01 PM
Gửi vào: #9


Group Icon

Trưởng Phòng
*****
Thành viên: 349
Nhập: 2-November 05
Bài viết: 285
Tiền mặt: 1,960
Thanked: 1
Cấp bậc: 15
------
------
Bạn bè: 2 (Xem)
Thêm vào nhóm bạn bè
Gửi thiệp điện tử
Trang thông tin





Theo mình biết thì có mod member online today dành cho version 2.1.x rồi đó. Nếu bạn muốn thì bạn có thể vào trang này xem nha: www.invisionize.com
Bạn chịu khó dịch lại nha, tiếng Anh. Mình cũng đã thử mod rồi, chạy tốt!


--------------------
Nhóm bạn bè:


michael

kathy123

Xem tất cả


Cảnh cáo: (0%)----- 
Nếu bạn thấy bài viết này vi phạm nội quy forum, hãy click nút này:
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Thank you! Reply to this topicTopic OptionsStart new topic
 

Bản Rút Gọn Bây giờ là: 18th July 2025 - 03:24 PM
Home | Mạng xã hội | Blog | Thiệp điện tử | Tìm kiếm | Thành viên | Sổ lịch