Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Beta Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Min Post count to start a new thread Details »»
Min Post count to start a new thread
Version: 1.00, by luke2kz71 luke2kz71 is offline
Developer Last Online: Dec 2009 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 10-05-2004 Last Update: Never Installs: 0
Is in Beta Stage  
No support by the author.

I made this for our for-sale section..... thought someone else may want it... it has no user friendly control pannel or anything.... just plain code.


Open your newthread.php file in your forum directory...

find this line:
PHP Code:
// ############################### start post thread ############################### 
right before it add this:
PHP Code:
// check to see if user meets post count requirments

//set the min posts count
$minpostcount 49;
//enter the forumids of the forums u want a post count limit on. i used 73, 28, and 40.

if ((($forumid == 73) OR ($forumid == 28) OR ($forumid == 40) OR ($forumid == 80)) AND ($bbuserinfo['posts'] < $minpostcount)) {
print_no_permission();

This simple hack is extreamly simple, and there is nothing special about it.... but it may help someone who wants to limit access to a forum or 2... to make it work for only 1 forum... use this:

PHP Code:
if (($forumid == 73) AND ($bbuserinfo['posts'] < $minpostcount)) {
print_no_permission();

73 being the only forumid

or for 2 forums:

PHP Code:
if ((($forumid == 73) OR ($forumid == 100)) AND ($bbuserinfo['posts'] < $minpostcount)) {
print_no_permission();

73 and 100 being the forum ids...

If you do not know how to get a forum id, just copy and paste a link to your forum.... like this:
http://www.fullsizechevy.com/forums/...isplay.php?f=3

the number after the equal sign is the forumid .... which in this case... is 3

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 10-06-2004, 02:41 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i suggest to replace
PHP Code:
if ((($forumid == 73) OR ($forumid == 28) OR ($forumid == 40) OR ($forumid 80)) AND ($bbuserinfo['posts'] < $minpostcount)) {
print_no_permission();

with
PHP Code:
if (in_array($forumid, array(73284080)) AND $bbuserinfo['posts'] < $minpostcount
{
print_no_permission();

way easier to read or change
Reply With Quote
  #3  
Old 10-06-2004, 03:39 PM
luke2kz71 luke2kz71 is offline
 
Join Date: Dec 2003
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Xenon
i suggest to replace
PHP Code:
if ((($forumid == 73) OR ($forumid == 28) OR ($forumid == 40) OR ($forumid 80)) AND ($bbuserinfo['posts'] < $minpostcount)) {
print_no_permission();

with
PHP Code:
if (in_array($forumid, array(73284080)) AND $bbuserinfo['posts'] < $minpostcount
{
print_no_permission();

way easier to read or change
Thanks, i am still a php noob

I also just realised i put 1 equal sign instead of 2 up there on the third forum, which would have changed the forumid to 80 everytime a new thread was started
Reply With Quote
  #4  
Old 10-06-2004, 03:46 PM
Colin F's Avatar
Colin F Colin F is offline
 
Join Date: Jul 2004
Location: Switzerland
Posts: 1,551
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would edit your first post, to reflect the fix for that one =, as some users don't read past the first post...
Reply With Quote
  #5  
Old 10-06-2004, 04:27 PM
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
Location: AnimationTalk.com
Posts: 2,367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

am i just missing something cant you just use the promotions system....
Reply With Quote
  #6  
Old 10-06-2004, 04:42 PM
Colin F's Avatar
Colin F Colin F is offline
 
Join Date: Jul 2004
Location: Switzerland
Posts: 1,551
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by AN-net
am i just missing something cant you just use the promotions system....
now that you mention it, yes you could.

Still, this might be helpful for users that already have tons of usergroups, which would make an implementation of the promotion system rather hard...
Reply With Quote
  #7  
Old 10-06-2004, 04:43 PM
luke2kz71 luke2kz71 is offline
 
Join Date: Dec 2003
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Colin F
now that you mention it, yes you could.

Still, this might be helpful for users that already have tons of usergroups, which would make an implementation of the promotion system rather hard...

well we allready have a dozen usergroups, and 19,000 members...
Reply With Quote
  #8  
Old 10-06-2004, 06:28 PM
Mephisteus's Avatar
Mephisteus Mephisteus is offline
 
Join Date: Dec 2001
Location: The Netherlands
Posts: 288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I believe this already exists, https://vborg.vbsupport.ru/showthread.php?t=64607

Nice work anyway
Reply With Quote
  #9  
Old 10-06-2004, 06:52 PM
kall's Avatar
kall kall is offline
 
Join Date: Apr 2004
Location: New Zealand
Posts: 2,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by AN-net
am i just missing something cant you just use the promotions system....
AFAIK, default Usergroup Permissions doesn't allow for per-forum posting restrictions.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:44 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04357 seconds
  • Memory Usage 2,305KB
  • Queries Executed 24 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (8)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete