vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Minimum post need to make a thread in a certain forum (https://vborg.vbsupport.ru/showthread.php?t=136372)

elsonar 01-13-2007 10:43 AM

Minimum post need to make a thread in a certain forum
 
Hey guys,

I am running 3.6.2 and was wondering if they is a mod that would allow me to say specify that 10 posts were neded to post in an advertising forum?

Any help would be great

Jay

Nathanial Horn 01-13-2007 05:47 PM

1. Back-up newthread.php and newreply.php (only do newreply if you do not want them to make replies either)

2. in newthread.php find:

if (!$foruminfo['allowposting'] OR $foruminfo['link'] OR !$foruminfo['cancontainthreads'])
{

eval(standard_error(fetch_error('forumclosed')));
}

3. After add:


// check to see if they have enough posts
if ((($vbulletin->userinfo['posts'] < '10') AND ($foruminfo[forumid] == 'xx')) AND (($vbulletin->userinfo['usergroupid'] < '5') OR ($vbulletin->userinfo['usergroupid'] > '6')))
{

eval(standard_error(fetch_error('notenoughposts')) );
}

4. Change xx to the forumid you do not want the posts to be made. Note: admins/gm's excluded from restriction. If you allow guests to posts, they will not be able to as well in the forum you specify.

5. Save.

6. open newreply.php (if you want to stop members with <10 from replying as well)

7. Find:

if (!$threadinfo['open'])
{
if (!can_moderate($threadinfo['forumid'], 'canopenclose'))
{
$vbulletin->url = 'showthread.php?' . $vbulletin->session->vars['sessionurl'] . "t=$threadid";


eval(standard_error(fetch_error('threadclosed')));
}
}

8. After, add code from step 3, and save.


9. Create a new error phrase called notenoughposts

10. Add at own risk, ;)

Kirk Y 01-13-2007 06:52 PM

Or use the User Promotions system, to avoid hacking your vBulletin, lol.

da420 01-13-2007 06:54 PM

Promotions make a lot more sense if you ask me.

Nathanial Horn 01-13-2007 07:04 PM

Promotions take resources that are required to execute, and also requires another group to be made and permissions set up for. The code offered above takes next to nothing execution time, no additional queries required, and requires one less group with permissions for every forum set up.

Why set up a promotion for a post count check of less than 10 in one forum? Waste of time.

Kirk Y 01-13-2007 07:06 PM

Some would consider keeping your vBulletin free of custom code worth it.

josh_B 01-14-2007 07:29 AM

Promotions dont take that much up, and if you decide you dont want that anymore, is far easier to return to the original setup..

Dismounted 01-14-2007 07:36 AM

Quote:

Originally Posted by Nathanial Horn (Post 1158287)
Promotions take resources that are required to execute, and also requires another group to be made and permissions set up for. The code offered above takes next to nothing execution time, no additional queries required, and requires one less group with permissions for every forum set up.

Why set up a promotion for a post count check of less than 10 in one forum? Waste of time.

Because it's more logical than hacking your vBulletin core files. vBulletin DOES have a plugin system, you know (if you don't want promotions).

NeoToxic 01-14-2007 09:20 AM

I am looking for this too. Is the a product for this if not WHY! not.

elsonar 01-14-2007 03:29 PM

yeah a product would be great.


All times are GMT. The time now is 06:39 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.01095 seconds
  • Memory Usage 1,729KB
  • 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
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete