+4 votes
in CMS Tips by (33.8k points)
I am creating a new discussion in the Vanilla forum with a title length of 132. The textbox for the title chops off the last 32 characters. It seems that the title does not accept more than 100 characters. How can I increase the title length for the discussion?

1 Answer

+1 vote
by (157k points)

The default title length in the "Vanilla Forums" discussion is 100. Also, there is no option in the dashboard to increase its size. You need to modify the database table and a code to increase the length.

You need to make the following two changes to increase the title length:

1.  Access the database tables of the "Vanilla Forums". In table 'GDN_Discussion', change the type of column 'Name' from varchar(100) to varchar(xx), where xx=a bigger value e.g. 150.

varchar(100) -> varchar(150)

2. Open the code '/applications/vanilla/views/post/discussion.php' in any editor and search for "echo wrap($this->Form->textBox('Name', ['maxlength' => 100, 'class' => 'InputBox BigInput', 'spellcheck' => 'true']), 'div', ['class' => 'TextBoxWrapper']);" and make the following change:


echo wrap($this->Form->textBox('Name', ['maxlength' => 100, 'class' => 'InputBox BigInput', 'spellcheck' => 'true']), 'div', ['class' => 'TextBoxWrapper']);


echo wrap($this->Form->textBox('Name', ['maxlength' => 150, 'class' => 'InputBox BigInput', 'spellcheck' => 'true']), 'div', ['class' => 'TextBoxWrapper']);