Helpful Information
 
 
Category: Community Discussions
Post Limits Per Forum?

Hey all,

Just had a very good request from a member, and I've tried to find it and haven't been able to. If it's there and I'm just blind, please let me know :)

Basically I need to have a larger character limit in posts in one particular forum. It's a forum where users post stories they've written and so on, so the whole 5,000 character thing I've got at the moment (or whatever it's set at) isn't really enough.

Any help is greatly appreciated.

J

edit newthread.php, find:


if (strlen($message)>$postmaxchars and $postmaxchars!=0) {


Before that add:

if ($foruminfo[forumid]==X) {$postmaxchars=Y;}

Replace X with your forumid of the forum with more chars allowed and Replace Y with the new allowed chars of that forum.

Add the same code right before
// ############################### start post thread ###############################
too..

that should do the trick.. :)

I assume that you only want to allow longer new threads in that special forum but not replies so I didnt give you the newreply.php hack..

I have an upped character limit for new threads but I am in need of Editpost and Newreply as well. Any help would be greatly appreciated.

Do the same thing in those files.

I did and nothing. Only seems to work for newthread.php. :ermm:

Try changing:

($foruminfo[forumid]==X)

to:

($foruminfo[threadid]==X)

for those 2, then.

as far as I can see my code should work for editpost and newreply.php as well without any changes. I'd say make sure you applied correctly and modified X and Y yoo.

Boofo,

Wouldn't I have to specify every new thread created with that?

Logician,

I just copy and pasted from newthread.php. If you would like to see my editpost.php or newreply.php to see exactly where I will be more than happy to send it to you.

Ok 86 the editpost.php it does work for editpost, it is newreply that code doesn't seem to work.

@yxboom - Boofo posted incorrect code;)

It should be:

$threadinfo[forumid]

Therefore, change:
($foruminfo[forumid]==X)
to:
($threadinfo[forumid]==X)

:)

Satan

I had that first, don't know why it ended up being what it is. Actually, though, Logician's code should work fine for the newreply since it works in editpost. yxboom, I would say try again in the newreply.

Yes it should work fine...

Try searching for this in your newreply.php:
$foruminfo=getforuminfo($threadinfo[forumid]);
$forumid=$foruminfo['forumid'];
If you do not have it, add it after:
if ($wordwrap!=0) {
$threadinfo[title]=dowordwrap($threadinfo[title]);
}
:)

Satan

Changing the code in newreply from

($foruminfo[forumid]==X)

to

($threadinfo[forumid]==X)

worked. Thanks a lot Log, Boofo and HS.

No problems:)

Satan










privacy (GDPR)