[วิธีทำ] เพิ่มจำนวน Character forum title limit

admin

Staff Member
Administrator
#1
เพิ่มจำนวน 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 ต้องทำการแก้ไขทุกครั้งครับ.
 
แก้ไขล่าสุดเมื่อ:

แฟนเพจ


Top