vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Maximum New Threads/Replies per Day Per Usergroup (https://vborg.vbsupport.ru/showthread.php?t=69308)

kall 09-10-2004 10:00 PM

Maximum New Threads/Replies per Day Per Usergroup
 
Hack Name: Maximum New Threads/Replies per Day Per Usergroup
Hack Version: 1.2
Hack Author: Kall
Release: 11 September 2004
Last Update: 19 April 2005
Description: Restricts specific Usergroups to a maximum number of new threads/replies per defined time (in hours).
Requested by: Several people on vb.org.
Credit for the base of the code goes to 006, from his 'Require X Posts per Day to play in Arcade' hack.

Files to edit: 3 (/admincp/usergroup.php, newthread.php and newreply.php)
New Phrases: 1
Other edits: 4 queries to run.

Update to v1.15: Added ability to restrict New Replies per Usergroup, corrected query. If you installed it prior to this edit, please re-download and apply the newthread modification block again.

Update to v1.2: Made all variables unique (appeneded $nzb to the front of each, so as to avoid conflicts with any other hacks).
Added template modifications to inform members of number fo new threads/replies remaining.
It actually works on newthread for versions above 3.0.4 now! (I had no idea. Sorry.)

Freezerator 09-12-2004 09:14 PM

Sounds really nice this hack, anyone using this without problems?

nhuhuu 09-14-2004 01:39 PM

i think so ! i hoppe problems with me ! thanks

kall 10-23-2004 09:07 AM

Could an admin/mod please change this thread's title to "Maximum New Threads/Replies per Day Per Usergroup"?

TIA. :)

HiDeo 10-23-2004 09:43 AM

Nice job thanks ;)

marsauae.com 10-27-2004 09:32 PM

Thank you for anice hack
but ihave error with Database

Database error in vBulletin 3.0.3:

Invalid SQL: UPDATE usergroup SET

### UPDATE QUERY GENERATED BY fetch_query_sql() ###
title = 'Administrators',
description = '',
usertitle = 'Administrator',
opentag = '',
closetag = '',
passwordexpires = '180',
passwordhistory = '360',
maxnewthread = '0',
maxnewtime = '0',
maxnewpost = '1',
maxnewposttime = '1',
attachlimit = '0',
avatarmaxwidth = '80',
avatarmaxheight = '80',
avatarmaxsize = '20000',
profilepicmaxwidth = '100',
profilepicmaxheight = '100',
profilepicmaxsize = '65535',
pmquota = '50',
pmsendmax = '5',
forumpermissions = '393215',
pmpermissions = '3',
calendarpermissions = '31',
wolpermissions = '31',
adminpermissions = '3',
genericpermissions = '4194239',
genericoptions = '31'
WHERE usergroupid=6
mysql error: Unknown column 'maxnewposttime' in 'field list'

mysql error number: 1054

trilOByte 10-27-2004 09:41 PM

Can this be applied to a single forum rather than the whole board?

It might be just what I'm looking for to restrict postings to a "trader sales" forum, to stop a particular member monopolising the forum.

kall 10-27-2004 09:51 PM

@marsauae.com: You have done something wrong. At a guess, you haven't run the database query to add that column.

trilObyte: most likely. Some form of check at the beginning like: if !(forumid) then do this script. I can have a look at it over the next few days, but am a bit busy at present.

If anyone wants to do this addition, that's cool too. I'll add it to the first post and credit your contribution.

Oreamnos 01-01-2005 04:28 AM

kall,

this might be THE hack i need. I have one question: Can I restrict the Max number of threads to a particular forum?

Thanks!

kall 04-18-2005 08:43 PM

Quote:

Originally Posted by Oreamnos
kall,

this might be THE hack i need. I have one question: Can I restrict the Max number of threads to a particular forum?

Thanks!

You *could* ... you would just need to stick an IF statement around the entire code I add to the various files.

MarcoH64 has released an excellent 'posts per Forum per usergroup' hack...

007 04-22-2005 04:25 AM

Interestingly enough, the code looks very familiar.. lol

Thanks for the credit.

If this was also per forum based.. it would be awesome. :)

SFishy 05-31-2005 02:43 PM

Quote:

Originally Posted by 007
Interestingly enough, the code looks very familiar.. lol

Thanks for the credit.

If this was also per forum based.. it would be awesome. :)

Very nice hack -- I needed the update (from version 2.x) of this -- nice job!

fridayweb 07-01-2005 07:07 PM

Screenshots? I'm having a hard time figuring out where the "You may start $nzbpostsremaining more replies today." goes in my newthread & newreply templates. Thanks!

Avi_Goldstein 07-10-2005 05:09 AM

Nice hack.

Can it be used if I am interested to resrict members of a usergroup to One posting per their subscription period, which they are permitted to edit at any time and which will be deleted after their subscription period ends ?

Thank You,

Avi

T3MEDIA 07-10-2005 12:35 PM

Quote:

Originally Posted by Avi_Goldstein
Nice hack.

Can it be used if I am interested to resrict members of a usergroup to One posting per their subscription period, which they are permitted to edit at any time and which will be deleted after their subscription period ends ?

Thank You,

Avi

Well I installed this for a person and I saw it does not work for secondary groups. Only main.
So your subscription would have to change the main group for this to work.
I dont think Kall will do this for me nor care about vb's mood swings but you can ask and see if he will adjust that for you. OR you can do what you ask with the work around I just stated.

Avi_Goldstein 07-12-2005 02:14 PM

I am interested to help develop it, but not alone, meaning I can work on that project if someone will be doing/discussing it with me. Can ANYONE help, PLEASE :-).

You can send me a private message, I will be checking those often.

T3MEDIA 08-03-2005 07:34 AM

Anyway to have this work with secondary usergroups?

dune 08-17-2005 04:26 PM

Quote:

Originally Posted by T3MEDIA
Well I installed this for a person and I saw it does not work for secondary groups. Only main.
So your subscription would have to change the main group for this to work.

We use subscriptions with only secondary groups as well. I think it's a better overall method (keep primary groups limited, all additional and flucuating perms come from secondary groups). Here's my idea. Someone smack me if I'm stupid... ;)

For example:
Code:

$nzbmaxnewthread = $DB_site->query_first("
                SELECT maxnewthread AS number FROM " . TABLE_PREFIX . "usergroup
                WHERE usergroupid=$bbuserinfo[usergroupid]
        ");

Becomes

Code:

$nzbmaxnewthread = $DB_site->query_first("
                SELECT max(maxnewthread) AS number FROM " . TABLE_PREFIX . "usergroup
                WHERE usergroupid IN $bbuserinfo[membergroupids]
        ");

This way we get the maximum value for the given variable for all the groups the user belongs too. Since a value of zero means no max, only non-zero values will give us a limit.

I want this to apply only in a given forum though, not site wide. I don't know if the forum-permissions will take this into account?

dune 08-17-2005 05:59 PM

Nevermind, found what I needed here:
https://vborg.vbsupport.ru/showthread.php?t=81584

Ghanem 10-17-2005 09:43 AM

Hi,

any update for 3.5.0..

Ghanem 12-04-2005 07:18 PM

Quote:

Originally Posted by unicorn
Hi,

any update for 3.5.0..

sory.. reminder :o

kall 12-05-2005 03:46 AM

Quote:

Originally Posted by unicorn
sory.. reminder :o

Hey.. I think someone has actually released a more functional version of this.. try searching the 3.5 Plugins forum.

T3MEDIA 12-05-2005 07:25 AM

Quote:

Originally Posted by dune
Nevermind, found what I needed here:
https://vborg.vbsupport.ru/showthread.php?t=81584

Is that version working? Did you ever test your database query to work?

Ghanem 12-28-2005 06:14 AM

Quote:

Originally Posted by kall
Hey.. I think someone has actually released a more functional version of this.. try searching the 3.5 Plugins forum.

I know about the other one, located:
https://vborg.vbsupport.ru/showthrea...threadid=96848
but its per forum per user group per time..
in other words:
If I have 3 forums and set 3 new threads per each forum per x hours, group will end up with 9 threads per x hours..
While I want what your hack do, a Max 3 new threads per x hours per group regardless forums..

Can you please do it for 3.5.x

Regards


All times are GMT. The time now is 02:46 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.01210 seconds
  • Memory Usage 1,769KB
  • 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_code_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (24)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