มีการแก้ไขครับท่าน เรียงตามนี้เลย มีการใช้คำสั่ง sql ด้วยตามนี้
http://www.phpbbthailand.com/viewtopic.php?f=32&t=9220
กระทู้นี้ผมเราจะมาเพิ่มให้ phpbb3 ของเราเรียงตามเวลาตั้งกระทู้กัน นะครับ
ก่อนทำให้ Backup ไฟล์ และฐานข้อมูลไว้ก่อนนะครับ
แก้ไขไฟล์ ต่างๆ เหล่านี้
เปิดไฟล์ viewforum.php
ค้นหา
โค้ด: เลือกทั้งหมด
โค้ด: เลือกทั้งหมด
$sort_by_text?=?array('a'?=>?$user->lang['AUTHOR'],?'t'?=>?$user->lang['POST_TIME'],?'r'?=>?$user->lang['REPLIES'],?'s'?=>?$user->lang['SUBJECT'],?'v'?=>?$user->lang['VIEWS']);?
แทนที่ด้วย
โค้ด: เลือกทั้งหมด
โค้ด: เลือกทั้งหมด
//?Sort?by?topic?time?ADDED?'m'?=>?$user->lang['SORT_TOPIC_TIME'],
$sort_by_text?=?array('a'?=>?$user->lang['AUTHOR'],?'t'?=>?$user->lang['POST_TIME'],?'m'?=>?$user->lang['SORT_TOPIC_TIME'],?'r'?=>?$user->lang['REPLIES'],?'s'?=>?$user->lang['SUBJECT'],?'v'?=>?$user->lang['VIEWS']);?
ค้นหา
โค้ด: เลือกทั้งหมด
โค้ด: เลือกทั้งหมด
$sort_by_sql?=?array('a'?=>?'t.topic_first_poster_name',?'t'?=>?'t.topic_last_post_time',?'r'?=>?'t.topic_replies',?'s'?=>?'t.topic_title',?'v'?=>?'t.topic_views');?
แทนที่ด้วย
โค้ด: เลือกทั้งหมด
โค้ด: เลือกทั้งหมด
//?Sort?by?topic?time?ADDED?'m'?=>?'t.topic_time',
$sort_by_sql?=?array('a'?=>?'t.topic_first_poster_name',?'t'?=>?'t.topic_last_post_time',?'m'?=>?'t.topic_time',?'r'?=>?'t.topic_replies',?'s'?=>?'t.topic_title',?'v'?=>?'t.topic_views');?
เปิดไฟล์ includes/ucp/ucp_prefs.php
ค้นหา
โค้ด: เลือกทั้งหมด
โค้ด: เลือกทั้งหมด
????????????????$sort_by_topic_text?=?array('a'?=>?$user->lang['AUTHOR'],?'t'?=>?$user->lang['POST_TIME'],?'r'?=>?$user->lang['REPLIES'],?'s'?=>?$user->lang['SUBJECT'],?'v'?=>?$user->lang['VIEWS']);?
แทนที่ด้วย
โค้ด: เลือกทั้งหมด
โค้ด: เลือกทั้งหมด
//?Sort?by?topic?time?ADDED?'m'?=>?$user->lang['SORT_TOPIC_TIME'],
????????????????$sort_by_topic_text?=?array('a'?=>?$user->lang['AUTHOR'],?'t'?=>?$user->lang['POST_TIME'],?'m'?=>?$user->lang['SORT_TOPIC_TIME'],?'r'?=>?$user->lang['REPLIES'],?'s'?=>?$user->lang['SUBJECT'],?'v'?=>?$user->lang['VIEWS']);?
ค้นหา
โค้ด: เลือกทั้งหมด
โค้ด: เลือกทั้งหมด
????????????????$sort_by_topic_sql?=?array('a'?=>?'t.topic_first_poster_name',?'t'?=>?'t.topic_last_post_time',?'r'?=>?'t.topic_replies',?'s'?=>?'t.topic_title',?'v'?=>?'t.topic_views');?
แทนที่ด้วย
โค้ด: เลือกทั้งหมด
/
โค้ด: เลือกทั้งหมด
/?Sort?by?topic?time?ADDED?'m'?=>?'t.topic_time',
????????????????$sort_by_topic_sql?=?array('a'?=>?'t.topic_first_poster_name',?'t'?=>?'t.topic_last_post_time',?'m'?=>?'t.topic_time',?'r'?=>?'t.topic_replies',?'s'?=>?'t.topic_title',?'v'?=>?'t.topic_views');?
เปิดไฟล์ language/en/common.php (อย่าลืมทำที่ไฟล์ภาษาไทยด้วยนะครับ ค้นหา
โค้ด: เลือกทั้งหมด
แล้วเพิ่ม
โค้ด: เลือกทั้งหมด
ลงไป )
ค้นหา
โค้ด: เลือกทั้งหมด
โค้ด: เลือกทั้งหมด
????'SORT_RANK'????????????????????=>?'Rank',?
เพิ่มหลัง
โค้ด: เลือกทั้งหมด
เปิดไฟล์ language/en/ucp.php (อย่าลืมทำที่ไฟล์ภาษาไทยด้วยนะครับ ค้นหา
โค้ด: เลือกทั้งหมด
แล้วเพิ่ม
โค้ด: เลือกทั้งหมด
'
ลงไป)
ค้นหา
โค้ด: เลือกทั้งหมด
โค้ด: เลือกทั้งหมด
????'SORT_SIZE'????????????????????=>?'File?size',?
เพิ่มหลัง
โค้ด: เลือกทั้งหมด
เปิดไฟล์ includes/acp/acp_user.php
ค้นหา
โค้ด: เลือกทั้งหมด
โค้ด: เลือกทั้งหมด
$sort_by_topic_text?=?array('a'?=>?$user->lang['AUTHOR'],?'t'?=>?$user->lang['POST_TIME'],?'r'?=>?$user->lang['REPLIES'],?'s'?=>?$user->lang['SUBJECT'],?'v'?=>?$user->lang['VIEWS']);?
แทนที่ด้วย
โค้ด: เลือกทั้งหมด
โค้ด: เลือกทั้งหมด
$sort_by_topic_text?=?array('a'?=>?$user->lang['AUTHOR'],?'t'?=>?$user->lang['POST_TIME'],?'m'?=>?$user->lang['SORT_TOPIC_TIME'],?'r'?=>?$user->lang['REPLIES'],?'s'?=>?$user->lang['SUBJECT'],?'v'?=>?$user->lang['VIEWS']);?
เสร็จแล้ว save ทุกไฟล์แล้วอัพขึ้น server ไปไว้ที่เดิมครับ
ถ้าต้องการให้ บอร์ดเราเริ่มต้นด้วยการเรียงตามเวลาตั้งกระทู้สำหรับทุกคนให้เอาโค้ดนี้ไปรันด้วย phpMyadmin
โค้ด: เลือกทั้งหมด
โค้ด: เลือกทั้งหมด
ALTER TABLE `phpbb_users` CHANGE `user_topic_sortby_type` `user_topic_sortby_type` VARCHAR( 1 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT 'm'
และถ้าต้องการ ให้สมาชิกทุกคนเรียงตามเวลาตั้งกระทู้ ให้เอาโค้ดนี้ไปรันด้วย phpMyadmin
โค้ด: เลือกทั้งหมด
โค้ด: เลือกทั้งหมด
UPDATE `phpbb_users` SET user_topic_sortby_type = 'm'
เป็นอันเสร็จพิธีครับ