Help Xin cách làm tăng số ký tự của chuyên mục

ntzthanh

Sergeant
Tham gia
07/08/2015
Bài viết
421
Được Like
134

PhuongBinzz

Moderator
Thành viên BQT
Tham gia
21/07/2016
Bài viết
1,255
Được Like
477
First off, I would always recommend that if you can't write file edits for yourself, don't use file edits. Same goes for queries.

That said if you have a clone of your site to test things on....


Do both bullets:

  • MySQL Query:

Mã:
ALTER TABLE `xf_node` MODIFY title varchar(100), MODIFY node_name varchar(100);

- - - - - - - - - - - - - - - - - - - - - - - - - - - -

  • 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' => ****, 'verification' => array('$this', '_verifyNodeName'), 'maxLength' => 50),

Replace/Edit: ('maxLength' => NUMERIC_VALUE)
PHP:
  'node_name'          => array('type' => self::TYPE_STRING, 'default' => ****, 'verification' => array('$this', '_verifyNodeName'), 'maxLength' => 100),


I have not tested it through an upgrade but when you do update xf you will have to redo the file edit with the possibility of having to redo the query as well (not sure if XF upgrades touch that).​
 

Top Bottom