vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Add-On Releases - Throttle Posts/Threads (restrict number of posts/threads by usergroup/forum by time) (https://vborg.vbsupport.ru/showthread.php?t=131014)

Nathan2006 06-17-2007 01:33 AM

Hello CyberRanger,

I made a request back in march about the following:

Quote:

Originally Posted by Nathan2006 (Post 1197444)
Hi,

I have been getting members who are adding more than 1 thread in our introductions forum.

Is there anyway to limit a member only 1 thread in that forum?

Would I be able to use your hack to do this?

Thanks for any help :)

Chad Beattie 06-17-2007 04:42 AM

Quote:

Originally Posted by CyberRanger (Post 1270087)
No, the time is in minutes. I originally had the defaults in hours, hence the 24. But, I changed it to minutes so that admins had more granular control. The time 60 is to bring the value in the time field into the right factor as the vb time stamp.

Thank you for clarifying. I just wanted to make sure. When I saw the default 24 I automatically assumed hours. Thanks!

jwocky 06-19-2007 09:09 PM

Quote:

Originally Posted by Nathan2006 (Post 1270098)
Hello CyberRanger,

I made a request back in march about the following:



Would I be able to use your hack to do this?

Thanks for any help :)


I would just set the time to a rediculously high number and that should take care of that :)

Nathan2006 06-19-2007 09:43 PM

Quote:

Originally Posted by jwocky (Post 1272030)
I would just set the time to a rediculously high number and that should take care of that :)


Thanks for your reply :)

Would I be able to set this to 365 days? :D lol

nautiqeman 06-20-2007 07:10 PM

I can't thank you enough for this. I have been wanting an add-on like this for a LONG time.

I'm not a programmer though so I couldn't make it.

www.thatcomputerdudellc.com

CyberRanger 06-21-2007 11:42 PM

Quote:

Originally Posted by Nathan2006 (Post 1272049)
Thanks for your reply :)

Would I be able to set this to 365 days? :D lol

You sure could. Just calculate how many minutes are in a year (525600 btw) and enter that into the time field. ;)

Nathan2006 06-22-2007 12:16 AM

Quote:

Originally Posted by CyberRanger (Post 1273628)
You sure could. Just calculate how many minutes are in a year (525600 btw) and enter that into the time field. ;)


Cool thank you for your help CyberRanger

Works great! :D

Thanks

Install

ElForro 06-27-2007 01:55 PM

I've put 1440 (minutes for 24 hours), and I can't post in a forum where I haven't posted in three months...

What could be wrong?

It could be something to do with the post I made early on that forum? This mods makes a sort of average or something? I just would like to restrict the number of posts per day since NOW... no matter how many posts i've made before....

ElForro 06-27-2007 04:43 PM

I'm sorry... but this is not working in any way when I try to limit to ONE forum... I've changed the settings a million times, and there are only two results:

- I can post unlimited times
- I can't post not even one time

Could you explain a little more how to limit a usergroup to post X times in 24 hs in ONE forum?

CyberRanger 06-27-2007 06:26 PM

Quote:

Originally Posted by ElForro (Post 1277800)
I'm sorry... but this is not working in any way when I try to limit to ONE forum... I've changed the settings a million times, and there are only two results:

- I can post unlimited times
- I can't post not even one time

Could you explain a little more how to limit a usergroup to post X times in 24 hs in ONE forum?

The setting is in minutes. I'm working with another site that is seeing the same problem so I think I have a bug somewhere. I plan to look at it in great detail tomorrow.

Can you tell me what version of vb you are running? Thanks!

CyberRanger 06-27-2007 07:17 PM

Quote:

Originally Posted by ElForro (Post 1277800)
I'm sorry... but this is not working in any way when I try to limit to ONE forum... I've changed the settings a million times, and there are only two results:

- I can post unlimited times
- I can't post not even one time

Could you explain a little more how to limit a usergroup to post X times in 24 hs in ONE forum?

Okay, I figured out the stupid coding mistake I made.

I'll release a full update tomorrow. In the meantime, for the per forum/usergroup number of allowed threads to work right, replace the plugin "Check if Max Number of Threads Reached" with the code below:

PHP Code:

global $vbulletin;
$vbulletin->input->clean_array_gpc('r', array(
    
'f'     => TYPE_INT
));

$limitquery '';


if (
$vbulletin->options['throttle_advanced'])
{
   
// see if per forum/usergroup permissions exist
   
$tempadvanced $db->query_first("
       SELECT * 
       FROM " 
TABLE_PREFIX "tp_throttleposts 
       WHERE `tp_forumid` = " 
$vbulletin->GPC['f'] . " AND `tp_usergroupid` = ".$db->sql_prepare($vbulletin->userinfo['usergroupid']));
   
   if (
$tempadvanced['tp_id'] > 0// forum\usergroup advanced record exists
   
{
    
$vbulletin->options['throttle_threads_time'] = $tempadvanced['tp_threadtime'];
    
$permissions['throttle_threadspermissions'] = $tempadvanced['tp_threadlimit'];            
        
$limitquery " AND `forumid` = " $vbulletin->GPC['f'] . " ";
   }

}


if (
$permissions['throttle_threadspermissions'] >= 0)
{

     
$tempmax2 $db->query_first("SELECT COUNT(threadid) AS threadcount 
                FROM " 
TABLE_PREFIX "thread 
                WHERE `postuserid`="
.$db->sql_prepare($vbulletin->userinfo['userid']).
                                AND `visible`=1
                                
$limitquery
                     AND `dateline` >= "
.$db->sql_prepare((int) (TIMENOW - ($vbulletin->options['throttle_threads_time'] * 60))));

  
$threadremaining = ($permissions['throttle_threadspermissions']) - ($tempmax2['threadcount']);

        
  if (
$threadremaining <= AND $permissions['throttle_threadspermissions'] >= 0)
  {
     eval(
standard_error(fetch_error('throttle_threads_max_reached'$permissions['throttle_threadspermissions'], $vbulletin->options['throttle_threads_time'])));
  }


The per forum/usergroup number of posts is also not working properly. I'll have that in tomorrow's fix.

bigcurt 06-27-2007 08:49 PM

Did that and everything seems to be fixed so far.

ElForro 06-29-2007 05:23 PM

Quote:

Originally Posted by CyberRanger (Post 1277907)
Okay, I figured out the stupid coding mistake I made.

I'll release a full update tomorrow. In the meantime, for the per forum/usergroup number of allowed threads to work right, replace the plugin "Check if Max Number of Threads Reached" with the code below:

PHP Code:

global $vbulletin;
$vbulletin->input->clean_array_gpc('r', array(
    
'f'     => TYPE_INT
));

$limitquery '';


if (
$vbulletin->options['throttle_advanced'])
{
   
// see if per forum/usergroup permissions exist
   
$tempadvanced $db->query_first("
       SELECT * 
       FROM " 
TABLE_PREFIX "tp_throttleposts 
       WHERE `tp_forumid` = " 
$vbulletin->GPC['f'] . " AND `tp_usergroupid` = ".$db->sql_prepare($vbulletin->userinfo['usergroupid']));
   
   if (
$tempadvanced['tp_id'] > 0// forum\usergroup advanced record exists
   
{
    
$vbulletin->options['throttle_threads_time'] = $tempadvanced['tp_threadtime'];
    
$permissions['throttle_threadspermissions'] = $tempadvanced['tp_threadlimit'];            
        
$limitquery " AND `forumid` = " $vbulletin->GPC['f'] . " ";
   }

}


if (
$permissions['throttle_threadspermissions'] >= 0)
{

     
$tempmax2 $db->query_first("SELECT COUNT(threadid) AS threadcount 
                FROM " 
TABLE_PREFIX "thread 
                WHERE `postuserid`="
.$db->sql_prepare($vbulletin->userinfo['userid']).
                                AND `visible`=1
                                
$limitquery
                     AND `dateline` >= "
.$db->sql_prepare((int) (TIMENOW - ($vbulletin->options['throttle_threads_time'] * 60))));

  
$threadremaining = ($permissions['throttle_threadspermissions']) - ($tempmax2['threadcount']);

        
  if (
$threadremaining <= AND $permissions['throttle_threadspermissions'] >= 0)
  {
     eval(
standard_error(fetch_error('throttle_threads_max_reached'$permissions['throttle_threadspermissions'], $vbulletin->options['throttle_threads_time'])));
  }


The per forum/usergroup number of posts is also not working properly. I'll have that in tomorrow's fix.

Thanks! I think it's working just fine now!!!

CyberRanger 06-29-2007 05:40 PM

Quote:

Originally Posted by ElForro (Post 1279331)
Thanks! I think it's working just fine now!!!

Great! I just uploaded ver2.1 that incorporates the fix for the per forum/usergroup setting for threads and posts.

TCattitude 06-29-2007 11:06 PM

Really nice mod.
Thanks for this ;)

jwocky 07-10-2007 12:27 AM

Quote:

Originally Posted by CyberRanger (Post 1279342)
Great! I just uploaded ver2.1 that incorporates the fix for the per forum/usergroup setting for threads and posts.

Awesome! does 2.1 include the update to exclude the deleted/closed threads?

CyberRanger 07-13-2007 02:49 AM

Quote:

Originally Posted by jwocky (Post 1287157)
Awesome! does 2.1 include the update to exclude the deleted/closed threads?

No, but I'll get that out "soon"!

jwocky 07-16-2007 08:42 PM

Quote:

Originally Posted by CyberRanger (Post 1289676)
No, but I'll get that out "soon"!

Can't wait, thanks!!!

Nathan2006 07-24-2007 10:07 PM

Thank you for the update :)

lostgirl815 09-09-2007 04:50 AM

It seems that people can get around this by using Quick Reply. Anybody have a solution?

apiasto 09-10-2007 05:08 PM

very neat thnx

Rolito 11-21-2007 07:16 PM

Congratulations for this great mod.

There are 2 questions pending...I would appreciate some feedback:

1) exclude the deleted/closed threads? Will it be fixed in V2.2?

2) people can get around this by using Quick Reply. Will it be fixed in V2.2?

Any release date for V2.2 ?

Thanks a lot !

sylar 11-30-2007 05:07 AM

Great MOD, installed it and it works great. Even if threads are closed by the person that created them they can not create another one until the time defined has expired.

Thanks a lot.

CyberRanger 11-30-2007 05:26 PM

Quote:

Originally Posted by Rolito (Post 1387108)

2) people can get around this by using Quick Reply. Will it be fixed in V2.2?

I'm working on V2.2 but I cannot replicate the "Quick Reply" get around. The "Quick Reply" box displays but if you try to post a message, the throttle still kicks in. See my attached pic for what I got.

Sandy-XXX 12-22-2007 06:23 PM

Thanks, Installed

hippiesimz 01-01-2008 12:23 PM

is it possible to make it " maximum post per forum / thread based on user title "
thanks.. by the way... very very good work !!!!!

CyberRanger 01-07-2008 09:20 PM

Quote:

Originally Posted by hippiesimz (Post 1413162)
is it possible to make it " maximum post per forum / thread based on user title "
thanks.. by the way... very very good work !!!!!

sorry, but that would be a complete re-write. :eek:

orok 02-01-2008 05:38 AM

Hello,
i want to thank you for this Product, i want to ask if i could limit the the total number for usergroup's thread at all forums >> for example:
at all forums the registered users could only post 4 thread a day but a premium group could post unlimited messages.
thank you

CyberRanger 02-01-2008 01:24 PM

Quote:

Originally Posted by orok (Post 1433705)
Hello,
i want to thank you for this Product, i want to ask if i could limit the the total number for usergroup's thread at all forums >> for example:
at all forums the registered users could only post 4 thread a day but a premium group could post unlimited messages.
thank you

If you leave "Activate per Forum/Usergroup Checking" set to "No", what you want is the default behavior.

abduljso 02-07-2008 06:56 AM

Hi, thanks for the porduct it sounds really useful. I just don't know how to restrict the # posts. Could you please clarify more after installing the file product_throttol_posts_v2.1
Please see the attached menu that I see in my admin cp

And to clarify more from my side :-), I can not get the "throttle post/Threads" options in the left hand side of my admic cp after downloading the above file. I only get the attached under the Vb options!

Thanks alot

sylar 02-08-2008 09:02 AM

This is a great hack and I use it a lot.

Could this be modified so you can also restrict the users based their number of posts they have accumulated.

IE .... I want only to allow a VIP usergroup and also Registered members with 100 posts or more to be able to post on certain forums.

orok 02-09-2008 07:19 AM

Quote:

Originally Posted by CyberRanger (Post 1433943)
If you leave "Activate per Forum/Usergroup Checking" set to "No", what you want is the default behavior.

lol .. i instelled another Product and i ask you the qustion >> it's work now

thank you :D

athlon64bit 02-15-2008 01:56 AM

Great hack, does this work on v3.7? If it doesn't are their plans for it to be made compatable with v3.7?::confused:

baghdad4ever 02-15-2008 04:27 AM

thank you

can you make it by forum only

i want to prevent all user to write more than 3 topics in certain forum

if you make by forum

i can

if by usergroups it is defficult

can you help plz

Acido 03-12-2008 11:30 PM

Quote:

Originally Posted by CyberRanger (Post 1392450)
I'm working on V2.2 but I cannot replicate the "Quick Reply" get around. The "Quick Reply" box displays but if you try to post a message, the throttle still kicks in. See my attached pic for what I got.

Hi

Have you plans to extend this hack to Blog Post's in V2.2?

Regards

aleclee 04-10-2008 02:59 AM

Can this be modified to act on a category and its subforums? I have a classified ad category with multiple subforums and I'd like to throttle the total number of ads that a user can post in a given period.

dragon_1973 04-14-2008 07:14 PM

I installed this, and I can't seem to get it to work.

It looks like it works on the users primary group, correct?

I set all 4 groups a test user is in to 1/1440 and 2/1440 for threads and posts respectively, yet that user can keep adding new threads and posts as he wants.

dragon_1973 04-15-2008 12:07 AM

Just in case it matters, I am running 3.6.8.

CyberRanger 04-15-2008 01:08 AM

Quote:

Originally Posted by dragon_1973 (Post 1490631)
I installed this, and I can't seem to get it to work.

It looks like it works on the users primary group, correct?

I set all 4 groups a test user is in to 1/1440 and 2/1440 for threads and posts respectively, yet that user can keep adding new threads and posts as he wants.

PM me you site details (including an admin login) and I'll check it out.

thedudleys 04-19-2008 11:49 AM

Tested this on Version 3.7.0 Release Candidate 3, no errors when installing it, nor encountered any errors with testing it out as well.. this mod is good for vbulletin 3.7

hope this information helps :D


All times are GMT. The time now is 07:21 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.01615 seconds
  • Memory Usage 1,872KB
  • 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
  • (2)bbcode_php_printable
  • (19)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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