mod rewrite friendly url ภาษาไทยสำหรับ SEO ของ SMF 2.0 ขึ้นไปครับ ผมลองทำแล้ว ได้ผมแจ่มมากครับ
ทำให้ url เป็นภาษาไทยแล้วมี.html ตามหลังด้วยครับ
ลองทำเมื่อกี้นี่เอง ทำได้แล้วเลยเอามาแบ่งให้คนที่ยังทำไม่ได้ไปลองทำดูครับ
1. Login เข้าสู่ระบบ ไปที่เมนูผู้ดูแล จากนั้นเลือก
ส่วนปรับแต่งค่าการใช้งาน > คลิ๊กที่แสดง URLs โดยปราศจาก ?'s Apache เท่านั้น!
Login as Admin > Edit Features and Options > Show URL's without ?'s
Search engine friendly URLs
Apache/Lighttpd only!
2. แก้ไขไฟล์ ./Source/MessageIndex.php
ค้นหา
'time' => timeformat($row['first_poster_time']),
'timestamp' => forum_time(true, $row['first_poster_time']),
'subject' => $row['first_subject'],
'preview' => $row['first_body'],
'icon' => $row['first_icon'],
'icon_url' => $settings[$context['icon_sources'][$row['first_icon']]] . '/post/' . $row['first_icon'] . '.gif',
'href' => $scripturl . '?topic=' . $row['id_topic'] . '.0',
'link' => '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.0">' . $row['first_subject'] . '</a>'
เอาไปทับของเดิม
'time' => timeformat($row['first_poster_time']),
'timestamp' => forum_time(true, $row['first_poster_time']),
'subject' => $row['first_subject'],
'preview' => $row['first_body'],
'icon' => $row['first_icon'],
'icon_url' => $settings[$context['icon_sources'][$row['first_icon']]] . '/post/' . $row['first_icon'] . '.gif',
'href' => $scripturl . '?topic=' . $row['id_topic'] . '.0',
$keyword= preg_replace("~[\s]+~","-",$row['first_subject']),
$keyword = urlencode(preg_replace('~[^a-z0-9ก-๙\.\-\_]~iu','',$keyword)),
'link' => '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.0/' . str_replace(" ","-",$row['first_subject']) . '" target="_blank">' . $row['first_subject'] . '</a>'
/*'link' => '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.0[color=red][b]/' . urlencode(preg_replace('~[^a-z0-9ก-๙\.\-\_]~iu','',$keyword)) . '[/b][/color]">' . $row['first_subject'] . '</a>'*/
/*'link' => '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.0/' . urlencode($keyword) . '" target="_blank">' . $row['first_subject'] . '</a>'*/
3. Save as
แล้วอัพไฟล์ขึ้นโฮสไปทับของเดิมครับ
ขอบคุณ jigload.com
***ผมไม่ต้องการอะไรมากมาย
ขอแค่ คำขอบคุณ และ +1 ก็พอครับ ^^

ใช้ 2RC3 โมเรียบร้อยแล้วไม่มีอะไรเปลี่ยนแปลงอ่ะครับ

ลิงค์ยังเหมือนเดิม ต้องทำอะไรเพิ่มเติมอีกหรือเปล่า ??
อย่างไรก็ขอบคุณครับ +1
ขอบคุณคุณหูกางด้วยเช่นกันครับ