กรุณาปิด โปรแกรมบล๊อกโฆษณา เพราะเราอยู่ได้ด้วยโฆษณาที่ท่านเห็น
Please close the adblock program. Because we can live with the ads you see


วิธีการทํา เพิ่มจำนวน Character forum title limit

  • เริ่มกระทู้โดย เริ่มกระทู้โดย thxf.org
  • วันที่เริ่มกระทู้ วันที่เริ่มกระทู้

thxf.org

Staff Member
Adminstrator
Moderater
VIP Member
Registered
เพิ่มจำนวน Character forum title limit ทำได้ดังนี้

มีสองส่วนคือที่ sql และ php

MySQL Query:
SQL:
ALTER TABLE `xf_node` MODIFY title varchar(100), MODIFY node_name varchar(100);

- - - - - - - - - - - - - - - - - - - - - - - - - - - -
xeForo 1.x File Edit library/XenForo/DataWriter/Node.php
@ line: 59
Find:
PHP:
  'title'              => array('type' => self::TYPE_STRING, 'required' => true, 'maxLength' => 50,
Replace/Edit: ('maxLength' => NUMERIC_VALUE)
PHP:
  'title'              => array('type' => self::TYPE_STRING, 'required' => true, 'maxLength' => 100,

@ line: 62
Find:
PHP:
  'node_name'          => array('type' => self::TYPE_STRING, 'default' => null, 'verification' => array('$this', '_verifyNodeName'), 'maxLength' => 50),
Replace/Edit: ('maxLength' => NUMERIC_VALUE)
PHP:
  'node_name'          => array('type' => self::TYPE_STRING, 'default' => null, 'verification' => array('$this', '_verifyNodeName'), 'maxLength' => 100),


xeForo 2.x File Edit /src/XF/Entity/Node.php
@ line: 269
Find:
PHP:
  'title'              => array('type' => self::TYPE_STRING, 'required' => true, 'maxLength' => 50,
Replace/Edit: ('maxLength' => NUMERIC_VALUE)
PHP:
  'title'              => array('type' => self::TYPE_STRING, 'required' => true, 'maxLength' => 100,

@ line: 272
Find:
PHP:
'node_name' => ['type' => self::STR, 'maxLength' => 50, 'nullable' => true, 'default' => null,
                'unique' => 'node_names_must_be_unique',
                'match' => 'alphanumeric_hyphen'
            ],
Replace/Edit: ('maxLength' => NUMERIC_VALUE)
PHP:
'node_name' => ['type' => self::STR, 'maxLength' => 100, 'nullable' => true, 'default' => null,
                'unique' => 'node_names_must_be_unique',
                'match' => 'alphanumeric_hyphen'
            ],


ปล เมื่อมีการอับเดทตัว xenforo ต้องทำการแก้ไขทุกครั้งครับ.
 
แก้ไขล่าสุดเมื่อ:

Similar threads

  • บทความ บทความ
ตอบ
0
อ่าน
867
  • บทความ บทความ
ข่าว XenForo 2.2.9 Released
ตอบ
0
อ่าน
791
ตอบ
0
อ่าน
379
  • บทความ บทความ
ข่าว XenForo 2.2.6 Released
ตอบ
0
อ่าน
2K



กรุณาปิด โปรแกรมบล๊อกโฆษณา เพราะเราอยู่ได้ด้วยโฆษณาที่ท่านเห็น
Please close the adblock program. Because we can live with the ads you see
ด้านบน ด้านล่าง