The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Maximum # Posts Per Day
Hi All,
I've searched around and haven't found it, so I thought I'd request it here -- either where to find it, or if anyone thinks it would be useful enough to write (I'm no programmer!) I'm looking for a hack that does this... I could create a new user group called something like Registered-Limited. People in that group would only be able to post X times per day (new threads and replies combined, in all forums), and that number could either be set globally (for all members in that group) or by the individual -- though by group would be fine for my purposes (and I think would be easier for me since I wouldn't have to add a field to the table). What do you think? Has it been done? If not, would anyone be interested in writing it? Thanks |
#2
|
||||
|
||||
<a href="https://vborg.vbsupport.ru/showthread.php?s=&threadid=40094&highlight=per+day " target="_blank">https://vborg.vbsupport.ru/showt...hlight=per+day</a>
|
#3
|
|||
|
|||
Thanks Logician...
Problem is, I'm not sure how to modify that hack for my purposes. I don't want it to occur on a specified forum, but on all existing forums. Can you help? I know it said in that thread to delete $cantpostforumid==$forumid AND but I wasn't sure that was complete, and I wasn't exactly sure on the syntax -- like double (( and such. Thanks |
#4
|
|||
|
|||
oh, and one other thing...
I wasn't sure how to make this work for REPLIES as well, not just threads. I want it to be amount of allowed posts (threads and replies) per day. So maybe like 1 thread and 4 replies per day allowed. |
#5
|
|||
|
|||
Please tell me, if you can, if this is right...
Code:
// ############################### start limit threads hack ############################### // Cant post more than X threads in the last Y hours // User cant post before this time expires: $cantposthour=48; // User cant post if he has more than X threads in the allowed time: $allowedthreadcount=1; if ($bbuserinfo[usergroupid]!=11) { $cantpostsqltime= mktime (date("H")-$cantposthour, date("i"), date("s"), date("m"), date("d"), date("Y")); $tcinforum_db=$DB_site->query_first("SELECT count(*) as count FROM thread WHERE postuserid=$bbuserinfo[userid] AND dateline>$cantpostsqltime AND forumid=$forumid"); // User new thread count in the last X hours $bbuserinfo[tcinforum]=$tcinforum_db['count']; if ($bbuserinfo[tcinforum]>=$allowedthreadcount AND ($bbuserinfo[usergroupid]!=11)) { eval("standarderror(\"".gettemplate("cantpostnow")."\");"); } } // Cant post more than X threads in the last Y hours updateuserforum($threadinfo['forumid']); Thanks |
#6
|
|||
|
|||
Okay, obviously the above code DOESNT work... that makes everyone not able to post more than X thread per Y hours, unless they are in usergroup 11.
The original code made is so that everyone OTHER thans mods, admins and supermods could only post X threads per Y hours. I don't want that either. Could someone please help me out here and tell me how to make it so that only ONE usergroup is permitted X posts (threads AND replies) they are allowed per Y hours. If I knew what I was doing I wouldn't have to ask and taking code that was meant to do something else isn't working for me because I don't know how to modify it properly. Thanks |
#7
|
||||
|
||||
here you go
|
#8
|
|||
|
|||
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in ///newreply.php on line 93
Thanks Log... but the above error is what I got using your code. Line 93 is Code:
$bbuserinfo[tcinforum]=$tcinforum_db['count']; And... in your code you said to find updateuserforum($foruminfo['forumid']); -- that doesn't exist in either newthread.php or newreply.php |
#9
|
||||
|
||||
problems fixed in the updated attachment..
|
#10
|
|||
|
|||
Awesome Log! I just went through a whole bunch of testing and it seems to work perfectly!
Thank you so much! |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|