Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

How can I increase the title length for discussions?

FiftyFifty New
edited June 2015 in Vanilla 2.0 - 2.8

The current max length is 100. I want to increase this to something like 200. Can that be done?

I've tried $Configuration['Vanilla']['Title']['MaxLength'] = '200'; but that doesn't work for this.

Thanks in advance!

Answers

  • Options
    R_JR_J Ex-Fanboy Munich Admin

    I guess it is defined by the length of the "Name" column of the table GDN_Discussion. But if you increase that value, it would be decreased whenever you run utility/structure (which you should do after an upgrade).

    I know ways to reset that automatically but I guess it would trim all discussion titles to 100 characters every time...

    If no one else comes up with a better solution, you can make the db change and then, everytime before you run utility/structure, you have to make sure that you edit /applications/vanilla/settings/structure.php and change the column definition in that file from 100 to 200 for the discussion table. But that feels kind of ugly... :-/

  • Options

    I checked it and indeed it's a varchar(100) for the field Name. I'm a bit surprised by this, why shouldn't this default to 255 and be limited in the config file. Would be much better imho.

  • Options
    hgtonighthgtonight ∞ · New Moderator

    @R_J said:
    I guess it is defined by the length of the "Name" column of the table GDN_Discussion. But if you increase that value, it would be decreased whenever you run utility/structure (which you should do after an upgrade).

    I know ways to reset that automatically but I guess it would trim all discussion titles to 100 characters every time...

    If no one else comes up with a better solution, you can make the db change and then, everytime before you run utility/structure, you have to make sure that you edit /applications/vanilla/settings/structure.php and change the column definition in that file from 100 to 200 for the discussion table. But that feels kind of ugly... :-/

    If you write a plugin structure that makes the change, the field shouldn't be truncated to 100 and then increased, it should just stay where you want it. That is my experience, anyway.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

Sign In or Register to comment.