PDA

View Full Version : How do I increase number of characters allowed


mark350
10-01-2008, 03:02 PM
Is there a way to increase the number of characters allowed in a forum post - specially, I want to increase it for a specific user group (but not necessarily everyone)?

Lynne
10-01-2008, 03:35 PM
vboptions > message posting and editing options > maximum characters per post.

The variable is $vbulletin->options['postmaxchars'] . I'm sure you can write a plugin at global_start (or actually, I'd pick one specific to the showthread/postings pages) to increate that variable just for a certain usergroup.

thecore762
10-01-2008, 05:04 PM
Thanks, that helps me too.

mark350
10-01-2008, 05:31 PM
Thanks for the information... I foudn the field to change max number of characters, but I don't understand how to set it for a specific user group... not sure what you meant "The variable is $vbulletin->options['postmaxchars']"

Lynne
10-01-2008, 07:27 PM
Thanks for the information... I foudn the field to change max number of characters, but I don't understand how to set it for a specific user group... not sure what you meant "The variable is $vbulletin->options['postmaxchars']"
If you hover over the title in vboptions, you get told what the variable name is and $vbulletin->options['postmaxchars'] is the name of the variable that is used when they set the maximum number of characters per post.

When you write your plugin, you would use a conditional for the usergroup (something like this, it depends what hook you use):
if (in_array($post['usergroupid'], array(x,y))) {
// set postmaxchars differently for those in usergroupid x or y
$vbulletin->options['postmaxchars']='40000';
}
This is NOT TESTED AT ALL!!!! I can't play around on my test site at the moment, so I can't figure this out through trial and error myself, you will have to play with it.