vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Limiting posts per month (https://vborg.vbsupport.ru/showthread.php?t=71383)

manguish 11-05-2004 12:51 PM

Limiting posts per month
 
Is this possible?

Say i wanted to limit a usergroups posts to 10 per month?

I figured i could do it with promotions, by moving the users when they'd made 10 posts - but there is no time scale.

Once the month ends, and the next starts, i would like the 10 posts to become available again.

Cheers.

Colin F 11-05-2004 01:17 PM

Quote:

Originally Posted by manguish
Is this possible?

Say i wanted to limit a usergroups posts to 10 per month?

I figured i could do it with promotions, by moving the users when they'd made 10 posts - but there is no time scale.

Once the month ends, and the next starts, i would like the 10 posts to become available again.

Cheers.

You could add a cron job that runs on the first of every month and moves the users back to the first usergroup.

manguish 11-05-2004 02:39 PM

I thought about that but couldn't figure out the sql - any chance of a hand?

Andreas 11-05-2004 02:47 PM

I guess this won't work Colin, he would also have to reset the post counter each month, as otherwiese the users will get promoted to the "over quota" group instantly after 1 post.

manguish 11-05-2004 02:49 PM

Couldn't the cron job also reset posts?

Andreas 11-05-2004 02:51 PM

Sure, but do you want that?

manguish 11-05-2004 03:08 PM

Yes.

I want the users to be able to post to 10, get moved to differing "cripple" user group, then after 30 days - reset post to 0 and move back to original usergroup - therby allowing them 10 posts again.

Andreas 11-05-2004 03:12 PM

Then you could use the following query:
[sql]update user set posts=0, usergroupid=original where usergroupid in (original, crippled)[/sql]

Colin F 11-05-2004 03:28 PM

... and don't forget to exchange original and crippled for the usergroupid's of those usergroups ;)

manguish 11-05-2004 03:52 PM

Hero ;)

Many thanks Colin.


All times are GMT. The time now is 09: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.01058 seconds
  • Memory Usage 1,727KB
  • 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