vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Post Limits Per Forum? (https://vborg.vbsupport.ru/showthread.php?t=43034)

Jeremy W. 09-01-2002 12:02 PM

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

Logician 09-01-2002 03:25 PM

edit newthread.php, find:

PHP Code:

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

Before that add:
PHP Code:

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
PHP Code:

// ############################### 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..

yxboom 05-25-2003 12:38 AM

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.

Boofo 05-25-2003 01:04 AM

Do the same thing in those files.

yxboom 05-25-2003 05:17 AM

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

Boofo 05-25-2003 05:22 AM

Try changing:

PHP Code:

($foruminfo[forumid]==X

to:

PHP Code:

($foruminfo[threadid]==X

for those 2, then.

Logician 05-25-2003 10:26 AM

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.

yxboom 05-25-2003 12:19 PM

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.

yxboom 05-25-2003 12:28 PM

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

Chris M 05-25-2003 12:36 PM

@yxboom - Boofo posted incorrect code;)

It should be:

Code:

$threadinfo[forumid]
Therefore, change:
Code:

($foruminfo[forumid]==X)
to:
Code:

($threadinfo[forumid]==X)
:)

Satan

Boofo 05-25-2003 12:56 PM

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.

Chris M 05-25-2003 01:21 PM

Yes it should work fine...

Try searching for this in your newreply.php:
Code:

  $foruminfo=getforuminfo($threadinfo[forumid]);
  $forumid=$foruminfo['forumid'];

If you do not have it, add it after:
Code:

  if ($wordwrap!=0) {
    $threadinfo[title]=dowordwrap($threadinfo[title]);
  }

:)

Satan

yxboom 05-25-2003 01:55 PM

Changing the code in newreply from

Code:

($foruminfo[forumid]==X)
to

Code:

($threadinfo[forumid]==X)
worked. Thanks a lot Log, Boofo and HS.

Chris M 05-25-2003 10:48 PM

No problems:)

Satan


All times are GMT. The time now is 04:15 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01453 seconds
  • Memory Usage 1,743KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (7)bbcode_code_printable
  • (5)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (14)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete