เพิ่มคำค้นภาษาไทยให้ยาวขึ้น (TAG) 7.1/7.2
จากกระทู้นี้ครับhttp://www.discuzthai.com/thread-6324-1-2.html
เพิ่มความยาวคำค้นสำหรับภาษาไทย
ไฟลล์ที่ต้องแก้ไข
tag.php
include/editpost.inc.php
include/newthread.inc.php
1. ไปที่ admincp > เครื่องมือ > ฐานข้อมูล > อัพเดทฐานข้อมูล
ใส่โค๊ดนี้ลงไปALTER TABLE`cdb_tags` CHANGE`tagname``tagname` CHAR( 80 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;หรือไปที่ phpMyadmin ของคุณ
หาตารางที่ชื่อ cdb_tags คลิ๊กแก้ไขที่ ฟิลด์ tagname เปลี่ยน char(20) จาก 20 เป็น 80 หรือจะใส่เท่าไหร่ก็ตามใจ
2. เปิดไฟลล์ tag.php
ค้นหา
if(!preg_match('/^([\x7f-\xff_-]|\w|\s)+$/', $name) || strlen($name) > 20) {
เปลี่ยนเป็น
if(!preg_match('/^([\x7f-\xff_-]|\w|\s)+$/', $name) || strlen($name) > 80) {
3. เปิดไฟลล์ include/editpost.inc.php และ include/newthread.inc.php
ค้นหา
if(preg_match('/^([\x7f-\xff_-]|\w|\s){3,20}$/', $tagname)) {
เปลี่ยนเป็น
if(preg_match('/^([\x7f-\xff_-]|\w|\s){3,80}$/', $tagname)) {
4. บันทึก และ อัพโหลดขึ้นโฮส
5. อัพเดทแคชไฟลล์
เสร็จแล้วครับ ขอบคุณมากครับๆ ขอบคุณครับ
หน้า:
[1]