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 SHEET Thương tình nhân      ♥ SHEET Liêu xiêu đường tình      ♥ SHEET Tình yêu lung linh      ♥ 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      

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

Top 5 diễn đàn


billythekids
post Jan 31 2006, 10:24 AM
Gửi vào: #1


Group Icon

Phó phòng
****
Thành viên: 632
Nhập: 8-December 05
Bài viết: 113
Tiền mặt: 16
Thanked: 1
Cấp bậc: 9
------
Giới tính: Male
------
Xem blog
Bạn bè: 0
Thêm vào nhóm bạn bè
Gửi thiệp điện tử
Trang thông tin





Tác giả: Dean
* CHMOD 755 cho file d2_top5_install.php xong rùi chạy
* Mở sources/boards.php, tìm
CODE

 //-----------------------------------------
       // What are we doing?
       //-----------------------------------------


Thêm phía trên
CODE
    //-----------------------------------------
       // Display Top 5 Statistics Module
       //-----------------------------------------

   if ($ibforums->cache['group_cache'][$ibforums->member['mgroup']]['g_view_t5bs'] == 1)
   {
 $cids = ','.$std->my_getcookie('collapseprefs').',';
 $t5bs['open'] = 'show';
 $t5bs['close'] = 'none';
 if (strstr($cids, ',t5bs,'))
 {
     $t5bs['open'] = 'none';
     $t5bs['close'] = 'show';
 }
 $this->output = str_replace("<!--TOP5STATS-->", $this->html->top_five_stats($this->statfunc->top_5_stats(), $t5bs), $this->output);
   }


* Mở sources/lib/boardstats_functions.php, tìm:
CODE

/*-------------------------------------------------------------------------*/
   //
   // DISPLAY ACTIVE USERS
   //
   /*-------------------------------------------------------------------------*/


Thêm phía trên
CODE
/*-------------------------------------------------------------------------*/
   //
   // Calculate & Display Top 5 Statistics Table
   //
   /*-------------------------------------------------------------------------*/

   function top_5_stats()
   {
 global $ibforums, $DB, $std, $forums;

 if ($ibforums->cache['group_cache'][$ibforums->member['mgroup']]['g_view_t5bs'] == 1)
 {
     $data = array();
     $aforums = array();
     $aforums[] = '0';
     foreach($forums->forum_by_id as $k => $v)
     {
   $aforums[] = $v['id'];
     }
     $allow_forums = implode(",", $aforums);

     if (!$ibforums->member['is_mod'])
     {
   $approved = 'and approved=1';
     }
     else
     {
   $approved = '';
     }

     $DB->simple_construct(array('select' => '*', 'from' => 'members', 'where' => 'posts>0', 'order' => 'posts DESC', 'limit' => array(0, 5)));
     $DB->simple_exec();
     if ($DB->get_num_rows())
     {
   while ($r = $DB->fetch_row())
   {
       $text = str_replace("{name}", $r['name'], $ibforums->lang['top_five_posts_text']);
       $text = str_replace("{posts}", $std->do_number_format($r['posts']), $text);
       $data['top_posters'] .= "<tr><td width='80%' align='left'><a href='{$ibforums->base_url}showuser={$r['id']}' title='{$text}\n{$ibforums->lang['top_five_view_my_profile']}'>{$ibforums->cache['group_cache'][$r['mgroup']]['prefix']}{$r['name']}{$ibforums->cache['group_cache'][$r['mgroup']]['suffix']}</a></td><td align='center' width='20%'><a href='{$ibforums->base_url}act=search&CODE=getalluser&mid={$r['id']}'>".$std->do_number_format($r['posts'])."</a></td></tr>";
   }
     }
     else
     {
   $data['top_posters'] = "<tr><td align='center' width='100%' colspan='2'>{$ibforums->lang['top_five_not_available']}</td></tr>";
     }

     $DB->simple_construct(array('select' => '*', 'from' => 'members', 'where' => 'id>0', 'order' => 'joined DESC', 'limit' => array(0, 5)));
     $DB->simple_exec();
     if ($DB->get_num_rows())
     {
   while ($r = $DB->fetch_row())
   {
       $text = str_replace("{name}", $r['name'], $ibforums->lang['top_five_posts_text']);
       $text = str_replace("{posts}", $std->do_number_format($r['posts']), $text);
       $data['new_members'] .= "<tr><td width='80%' class='row2' align='left'><a href='{$ibforums->base_url}showuser={$r['id']}' title='{$text}\n{$ibforums->lang['top_five_view_my_profile']}'>{$ibforums->cache['group_cache'][$r['mgroup']]['prefix']}{$r['name']}{$ibforums->cache['group_cache'][$r['mgroup']]['suffix']}</a></td><td align='center' width='20%'><a href='{$ibforums->base_url}act=search&CODE=getalluser&mid={$r['id']}'>".$std->do_number_format($r['posts'])."</a></td></tr>";
   }
     }
     else
     {
   $data['new_members'] = "<tr><td align='center' width='100%' colspan='2'>{$ibforums->lang['top_five_not_available']}</td></tr>";
     }

     $DB->simple_construct(array('select' => 't.*, m.mgroup', 'from' => "topics t LEFT JOIN ".SQL_PREFIX."members m ON (m.id=t.last_poster_id)", 'where' => 't.forum_id IN ('.$allow_forums.')'.$approved, 'order' => 't.last_post DESC', 'limit' => array(0, 5)));
     $DB->simple_exec();
     if ($DB->get_num_rows())
     {
   while ($r = $DB->fetch_row())
   {
       $text = str_replace("{name}", $r['last_poster_name'], $ibforums->lang['top_five_topics_text']);
       $text = str_replace("{topic}", $r['title'], $text);
       $data['latest_posts'] .= "<tr><td width='80%' align='left'><a href='{$ibforums->base_url}showtopic={$r['tid']}&view=getlastpost' title='{$text}'>{$r['title']}</a></td><td align='center' width='20%'><a href='{$ibforums->base_url}showuser={$r['last_poster_id']}' title='{$ibforums->lang['top_five_view_my_profile']}'>{$ibforums->cache['group_cache'][$r['mgroup']]['prefix']}{$r['last_poster_name']}{$ibforums->cache['group_cache'][$r['mgroup']]['prefix']}</a></td></tr>";
   }
     }
     else
     {
   $data['latest_posts'] = "<tr><td align='center' width='100%' colspan='2'>{$ibforums->lang['top_five_not_available']}</td></tr>";
     }

     return $data;
 }
   }


* Mở sources/admin/ad_groups.php, tìm
CODE
 'g_attach_per_post'    => $ibforums->input['g_attach_per_post'],


Thêm phía dưới
CODE
  'g_view_t5bs'  => $ibforums->input['g_view_t5bs'],


* Tìm
CODE

$ibforums->html .= $ibforums->adskin->add_td_row( array( "<b>Can use search?</b>" ,
             $ibforums->adskin->form_yes_no("g_use_search", $group['g_use_search'] )
             )      );


Thêm phía dưới
CODE
 $ibforums->html .= $ibforums->adskin->add_td_row( array( "<b>Can View Top 5 Board Stats?</b>" ,
             $ibforums->adskin->form_yes_no("g_view_t5bs", $group['g_view_t5bs'] )
             )      );


* Mở lang/en/lang_boards.php, tìm
CODE
// added in 2.0


Thêm bên dưới
CODE
'top_five_stats' => "Top 5 Statistics",
'top_five_posters' => "Top 5 Posters",
'top_five_new_mems' => "Top 5 New Members",
'top_five_latest_topics' => "Top 5 Latest Posts",
'top_five_not_available' => "<i>Not Available</i>",
'top_five_posts_text' => "{name} Has A Total Of {posts} Posts",
'top_five_topics_text' => "{name} Is The Latest Posts In The Topic: {topic}\nClick Here To View This Topic",
'top_five_view_my_profile' => "Click Here To View My Profile",



* Vào Admin CP: Skins & Templates: Skin Manager: Edit HTML: Board Index: Add New Template
- Template Name: top_five_stats
- Template Data Variables: $data, $show
- Template HTML:
CODE
<div class='borderwrap' style='display:{$show['close']}' id='fc_t5bs'>
<div class='maintitlecollapse'>
 <p class='expand'><a href="javascript:togglecategory('t5bs', 0)"><{E_PLUS}></a></p>
 <p>{ipb.lang['top_five_stats']}</p>
</div></div>
<div class='borderwrap' style='display:{$show['open']}' id='fo_t5bs'>
<div class='maintitle'>
 <p class='expand'><a href="javascript:togglecategory('t5bs', 1)"><{E_MINUS}></a></p>
 <p>{ipb.lang['top_five_stats']}</p>
</div>
<table align='center' width='100%' cellspacing='1' cellpadding='0'>
 <tr>
   <th width='32%' align='center'>{ipb.lang['top_five_posters']}</th>
   <th width='33%' align='center'>{ipb.lang['top_five_new_mems']}</th>
   <th width='35%' align='center'>{ipb.lang['top_five_latest_topics']}</th>
 </tr>
 <tr>
   <td class='row2' width='32%' valign='top'>
     <table align='left' width='100%' cellspacing='0' cellpadding='0'>
     {$data['top_posters']}
     </table>
   </td>
   <td class='row2' width='33%' valign='top'>
     <table align='left' width='100%' cellspacing='0' cellpadding='0'>
     {$data['new_members']}
     </table>
   </td>
   <td class='row2' width='35%' valign='top'>
     <table align='left' width='100%' cellspacing='0' cellpadding='0'>
     {$data['latest_posts']}
     </table>
   </td>
 </tr>
</table></div><br>


* Tiếp tục Admin CP: Skins & Templates: Skin Manager: Edit HTML: Board Index: PageTop, tìm:
CODE
</table>
<br />


Thêm bên dưới
CODE
<!--TOP5STATS-->




--------------------
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



Thank you! Reply to this topicTopic OptionsStart new topic
 

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