MyBB Community Forums

Full Version: Set a minimum character length in thread subject
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello.

Environment

MyBB version 1.8.12
PHP Version 5.5.38
SQL Engine MySQL 5.6.35

I've gone through all the ACP -> Configuration > Board Settings and can't find a way to set a minimum character length allowed when opening a new thread. For instance, some of my forum users open threads with a subject of "hello" or "hi". I'd like to set a miminum of 30 characters. Where can I set this?

Thanks,
albano
https://mods.mybb.com/view/length-minimum-in-new-thread

put file in /inc/plugins folder
activate, then set your character limit in the plugin settings
It's in Spanish, but easy to comprehend

to make compitable for MyBB 1.8.x , change line #19 in file to :
"compatibility" => "*"
If you're going to use that file you need to add
if(!defined('IN_MYBB'))
    die();

on the first line after
<?php
That did it!

Thank you, all that assisted me.
Hello comrades:

I recently upgraded to 1.8.26 and the plugin https://mods.mybb.com/view/length-minimum-in-new-thread no longer works. I've searched the Extend section as well as the Plugin Release forums but don't see any updated plugins with this feature. If someone knows of a plugin available, let me know or if I can somehow add a manual code change to accomplish this, I would really appreciate it.
Try this one - https://community.mybb.com/mods.php?acti...d&pid=1116

works for thread subject and/or post content Smile
(2021-03-27, 11:33 AM)Eldenroot Wrote: [ -> ]Try this one - https://community.mybb.com/mods.php?acti...d&pid=1116

works for thread subject and/or post content Smile

Thank you for the assistance.

I tried it but got the following after activating the plugin

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1366 - Incorrect integer value: 'NULL' for column `forum_mybb853`.`mybb_settinggroups`.`gid` at row 1
Query:
INSERT INTO mybb_settinggroups (`gid`,`name`,`title`,`description`,`disporder`,`isdefault`) VALUES ('NULL','threadlimit','Thread Limit Plugin','Settings For Thread Limit','1','0')
If you're a visitor of this website, please wait a few minutes and try again. If this problem persists, please contact the site owner.

If you are the site owner, please check the MyBB Documentation for help resolving common issues, or get technical help on the MyBB Community Forums.
Edit the inc/plugins/threadlimit.php file and remove line 29: 'gid' => 'NULL',
(2021-04-30, 07:43 AM)Crazycat Wrote: [ -> ]Edit the inc/plugins/threadlimit.php file and remove line 29: 'gid'    => 'NULL',

Nailed it!!!!!
If no plugins work I wonder if this method still works but it's a core edit 

https://community.mybb.com/thread-50907-...#pid357359