หมวดไฟฟ้า/อิเล็กทรอนิกส์/คอมพิวเตอร์ => ห้อง SMF 2.0.X => Programming => ห้องคอมพิวเตอร์ => ห้อง MOD => ข้อความที่เริ่มโดย: Auto Man ที่ 25 ตุลาคม 2558, 08:48:18

หัวข้อ: ติดตั้ง Users Online Today ใน SMF 2.0.11
เริ่มหัวข้อโดย: Auto Man ที่ 25 ตุลาคม 2558, 08:48:18
การติดตั้งไม่ได้ยุ่งยากอะไรเลยครับ

ติดตั้ง Users Online Today Mod smf 2.0.2

ดาวน์โหลด  Users Online Today Mod smf 2.0.2 (http://custom.simplemachines.org/mods/index.php?action=download;mod=217;id=197069)

ทำ Users Online Today ภาษาไทย
ไฟล์ที่เกี่ยวข้อง
สร้างไฟล์ ./default/languages/UsersOnlineToday.thai-utf8 ด้วยการก็อบจาก ./default/languages/UsersOnlineToday.english-utf8
หา
โค๊ด:

// Main page
$txt['uot_users_online_current_day']='Users Logged In Today';
$txt['uot_users_online_last_24_hours']='Users Logged In Last 24 Hours';
$txt['uot_users_online_last_7_days']='Users Logged In Last 7 Days';
$txt['uot_total']='Total';
$txt['uot_visible']='Visible';
$txt['uot_hidden']='Hidden';

// Settings
$txt['uot_setting_sortby_pre_txt']='Sort the user list by';
$txt['uot_setting_username']='username';
$txt['uot_setting_login_time']='login time';
$txt['uot_setting_sortby_post_txt']='';

$txt['uot_setting_sortorder_pre_txt']='Display the user list in';
$txt['uot_setting_ascending']='ascending';
$txt['uot_setting_descending']='descending';
$txt['uot_setting_sortorder_post_txt']='order';

$txt['uot_setting_period_pre_txt']='The user list should cover the';
$txt['uot_setting_current_day']='current day';
$txt['uot_setting_last_24_hours']='last 24 hours';
$txt['uot_setting_last_7_days']='last 7 days';
$txt['uot_setting_period_post_txt']='';

$txt['uot_setting_canview_pre_txt']='Make the user list visible to';
$txt['uot_setting_admin']='administrators';
$txt['uot_setting_registered']='registered users';
$txt['uot_setting_everyone']='everyone';
$txt['uot_setting_canview_post_txt']=''
?>

แก้ไขเป็น
โค๊ด :

// Main page
$txt['uot_users_online_current_day']='ออนไลน์วันนี้';
$txt['uot_users_online_last_24_hours']='ผู้ใช้งานภายใน 24 ชั่วโมง';
$txt['uot_users_online_last_7_days']='ผู้ใช้งาน 7 วันล่าสุด';
$txt['uot_total']='รวมทั้งหมด';
$txt['uot_visible']='แสดงตัวตน';
$txt['uot_hidden']='แอบซ่อนตัวตน';

// Settings
$txt['uot_setting_sortby_pre_txt']='เรียงลำดับรายชื่อผู้ใช้โดย';
$txt['uot_setting_username']='ชื่อผู้ใช้';
$txt['uot_setting_login_time']='เข้าสู่ระบบเวลา';
$txt['uot_setting_sortby_post_txt']='';

$txt['uot_setting_sortorder_pre_txt']='แสดงรายการของผู้ใช้ใน';
$txt['uot_setting_ascending']='น้อยไปหามาก';
$txt['uot_setting_descending']='มากไปหาน้อย';
$txt['uot_setting_sortorder_post_txt']='คำสั่ง';

$txt['uot_setting_period_pre_txt']='รายชื่อผู้ใช้ควรครอบคลุมถึง';
$txt['uot_setting_current_day']='วันที่ปัจจุบัน';
$txt['uot_setting_last_24_hours']='24 ชั่วโมงล่าสุด';
$txt['uot_setting_last_7_days']='7 วันล่าสุด';
$txt['uot_setting_period_post_txt']='';

$txt['uot_setting_canview_pre_txt']='ทำให้รายการของผู้ใช้สามารถมองเห็นได้';
$txt['uot_setting_admin']='ผู้ดูแลระบบ';
$txt['uot_setting_registered']='ผู้ใช้ที่ลงทะเบียน';
$txt['uot_setting_everyone']='ทุกคน';
$txt['uot_setting_canview_post_txt']=''
?>
หัวข้อ: ติดตั้ง Users Online Today ใน SMF 2.0.11
เริ่มหัวข้อโดย: Auto Man ที่ 25 ตุลาคม 2558, 08:49:16
ทดสอบแล้ว ผ่านครับ
ข้อมูลมาจากบ้านหลังนี้ http://www.banpongpond-src.com/smf/index.php?topic=43.0

 :-X
หัวข้อ: ติดตั้ง Users Online Today ใน SMF 2.0.11
เริ่มหัวข้อโดย: Auto Man ที่ 28 เมษายน 2559, 11:21:43
  เห็นแว๊บๆ มีหัวข้อสถิติ ผู้ใช้งานในรอบเจ็ดเวันด้วย น่าสนใจ...
เลยไปย้อนรอยดูที่เว็บ http://custom.simplemachines.org/mods/index.php?mod=217


ตรงนี้มีภาพ! แต่ท่านจะมองไม่เห็น , ท่านต้อง  สมัครสมาชิก หรือ ลงชื่อเข้าระบบ
 (http://upic.me/show/58374070)

   ตัวนี้ของเดิมของเว็บ auto-nkp.com ว่ามีไฟล์อะไรลงไปแล้วบ้าง

ตรงนี้มีภาพ! แต่ท่านจะมองไม่เห็น , ท่านต้อง  สมัครสมาชิก หรือ ลงชื่อเข้าระบบ
 (http://upic.me/show/58374071)

   ส่วนตัวนี้เป็นตัวอย่างที่นำไปใช้งาน

ตรงนี้มีภาพ! แต่ท่านจะมองไม่เห็น , ท่านต้อง  สมัครสมาชิก หรือ ลงชื่อเข้าระบบ
 (http://upic.me/show/58374072)
หัวข้อ: ติดตั้ง Users Online Today ใน SMF 2.0.11
เริ่มหัวข้อโดย: Auto Man ที่ 28 เมษายน 2559, 11:33:44
  เข้าไปปรับแต่งได้นิดหน่อย ที่เมนู ผู้ดูแล

ตรงนี้มีภาพ! แต่ท่านจะมองไม่เห็น , ท่านต้อง  สมัครสมาชิก หรือ ลงชื่อเข้าระบบ
 (http://upic.me/show/58374140)

ปรับแต่งอะไรกันได้บ้าง...

ตรงนี้มีภาพ! แต่ท่านจะมองไม่เห็น , ท่านต้อง  สมัครสมาชิก หรือ ลงชื่อเข้าระบบ
 (http://upic.me/show/58374142)
หัวข้อ: ติดตั้ง Users Online Today ใน SMF 2.0.11
เริ่มหัวข้อโดย: Auto Man ที่ 28 เมษายน 2559, 11:41:47
  ถ้าต้องการปรับแต่งบอร์ด SMF 2.0.11 แบบแมนวล ทำได้ตามนี้เลย

File Edits

./Sources/BoardIndex.php
Find:
   
โค๊ด: [Select]
$context += getMembersOnlineStats($membersOnlineOptions);
Add After:

โค๊ด: [Select]
// Get the user online today list.
$context += getUsersOnlineTodayStats();
         

./Themes/default/BoardIndex.template.php

Find:
โค๊ด: [Select]
// If they are logged in, but statistical information is off... show a personal message bar.
Add Before:

โค๊ด: [Select]
// Users Online Today
echo '
<div class="title_barIC">
<h4 class="titlebg">
<span class="ie6_header floatleft">
<img class="icon" src="', $settings['images_url'], '/icons/online.gif', '" alt="', $txt['online_users'], '" />', $txt['uot_users_online_'.$modSettings['uot_setting_period']], '
</span>
</h4>
</div>
<p class="inline smalltext">';
echo
$txt['uot_total'], ': <b>', $context['num_users_online_today'], '</b>';

if ($context['viewing_allowed'])
echo
' (', $txt['uot_visible'], ': ', ($context['num_users_online_today'] - $context['num_users_hidden_today']), ', ', $txt['uot_hidden'], ': ', $context['num_users_hidden_today'], ')';

// Assuming there ARE users online... each user in users_online has an id, username, name, group, href, and link.
if (!empty($context['users_online_today']) && $context['viewing_allowed'])
{
echo
'<br />', implode(', ', $context['list_users_online_today']);
}
echo '
</p>';

หัวข้อ: ติดตั้ง Users Online Today ใน SMF 2.0.11
เริ่มหัวข้อโดย: Auto Man ที่ 28 เมษายน 2559, 11:42:50
Code
db_install.php
This file should be able to execute standalone.

File Operations
Move the included file "Subs-UsersOnlineToday.php" to "./Sources".
Move the included file "lang/UsersOnlineToday.english.php" to "./Themes/default/languages".
Move the included file "lang/UsersOnlineToday.english-utf8.php" to "./Themes/default/languages".
Move the included file "lang/UsersOnlineToday.danish.php" to "./Themes/default/languages".
Move the included file "lang/UsersOnlineToday.danish-utf8.php" to "./Themes/default/languages".
Move the included file "lang/UsersOnlineToday.portuguese_brazilian.php" to "./Themes/default/languages".
Move the included file "lang/UsersOnlineToday.portuguese_brazilian-utf8.php" to "./Themes/default/languages".
Move the included file "lang/UsersOnlineToday.portuguese_pt.php" to "./Themes/default/languages".
Move the included file "lang/UsersOnlineToday.portuguese_pt-utf8.php" to "./Themes/default/languages".
Move the included file "lang/UsersOnlineToday.hungarian.php" to "./Themes/default/languages".
Move the included file "lang/UsersOnlineToday.hungarian-utf8.php" to "./Themes/default/languages".
Move the included file "lang/UsersOnlineToday.german.php" to "./Themes/default/languages".
Move the included file "lang/UsersOnlineToday.german-utf8.php" to "./Themes/default/languages".
Move the included file "lang/UsersOnlineToday.spanish.php" to "./Themes/default/languages".
Move the included file "lang/UsersOnlineToday.spanish-utf8.php" to "./Themes/default/languages".
Move the included file "lang/UsersOnlineToday.spanish_latin.php" to "./Themes/default/languages".
Move the included file "lang/UsersOnlineToday.spanish_latin-utf8.php" to "./Themes/default/languages".
Move the included file "lang/UsersOnlineToday.dutch.php" to "./Themes/default/languages".
Move the included file "lang/UsersOnlineToday.dutch-utf8.php" to "./Themes/default/languages".
Move the included file "lang/UsersOnlineToday.croatian.php" to "./Themes/default/languages".
Move the included file "lang/UsersOnlineToday.croatian-utf8.php" to "./Themes/default/languages".
Move the included file "lang/UsersOnlineToday.serbian_latin.php" to "./Themes/default/languages".
Move the included file "lang/UsersOnlineToday.serbian_latin-utf8.php" to "./Themes/default/languages".
Move the included file "lang/UsersOnlineToday.russian.php" to "./Themes/default/languages".
Move the included file "lang/UsersOnlineToday.russian-utf8.php" to "./Themes/default/languages".
Move the included file "lang/UsersOnlineToday.finnish.php" to "./Themes/default/languages".
Move the included file "lang/UsersOnlineToday.finnish-utf8.php" to "./Themes/default/languages".
Move the included file "lang/UsersOnlineToday.turkish.php" to "./Themes/default/languages".
Move the included file "lang/UsersOnlineToday.turkish-utf8.php" to "./Themes/default/languages".
Move the included file "lang/UsersOnlineToday.persian.php" to "./Themes/default/languages".
Move the included file "lang/UsersOnlineToday.persian-utf8.php" to "./Themes/default/languages".
หัวข้อ: ติดตั้ง Users Online Today ใน SMF 2.0.11
เริ่มหัวข้อโดย: Auto Man ที่ 28 เมษายน 2559, 11:59:40
ลองปรับ ผู้ใช้งานในรอบ 7 วัน (รอบสัปดาห์นี้)

ตรงนี้มีภาพ! แต่ท่านจะมองไม่เห็น , ท่านต้อง  สมัครสมาชิก หรือ ลงชื่อเข้าระบบ
 (http://upic.me/show/58374483)

ผลการปรับแต่งออกมา

ตรงนี้มีภาพ! แต่ท่านจะมองไม่เห็น , ท่านต้อง  สมัครสมาชิก หรือ ลงชื่อเข้าระบบ
 (http://upic.me/show/58374484)
หัวข้อ: ติดตั้ง Users Online Today ใน SMF 2.0.11
เริ่มหัวข้อโดย: Auto Man ที่ 28 เมษายน 2559, 12:51:20
มีไฟล์แนบมา เพื่อนำไปติดตั้งผ่านแอดมินในเว็บอีกที

ขอบคุณที่ติดตามครับ มีปัญหา ก็แจ้งเข้ามาได้ครับ