View Full Version : How to set a MAX character limit per forum (not per board)?
bzcomputers
11-09-2012, 01:49 PM
I have a group of forums (about 10) I would like to limit the max character limit for posting to be something less that what the other forums on the board are. Currently VB options only allows you to set a universal board setting that affects all forums.
Can this be done be inserting a conditional somewhere and adding the forums in question into an array for that conditional?
Can this be done be inserting a conditional somewhere and adding the forums in question into an array for that conditional?
That should work. If you use a hook like global_init_setup_complete and code like this:
global $forumid, $vbulletin;
if (in_array($forumid, array(1, 2, 3))) // change 1, 2, 3 to your list of forum ids
{
$vbulletin->options['postmaxchars'] = X; // change X to new char limit
}
bzcomputers
11-09-2012, 02:19 PM
Get this error:
Warning: in_array() expects at most 3 parameters, 10 given in [path]/global.php(37) : eval()'d code on line 2
Oh, yeah, sorry. I was thinking about is_member_of() which works like that. Anyway, I fixed the code above.
bzcomputers
11-09-2012, 02:41 PM
Works great, thanks!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.