Log in

View Full Version : Require X posts in the last Y hours to play games in the arcade


007
06-01-2004, 10:00 PM
Require X posts in the last Y hours to play games in the arcade

by ~006

Let me start out by saying that I made this hack for the V3Arcade system. All credit for that hack goes to John. If you can think of any other pages that this limitation hack could be used for, let me know and I can code it.

I know ever since the V3Arcade was released, we all have been noticeing new members signing up only to spend time in the arcade. They may post once or twice, but for the most part they do not post. Instead they just suck your bandwidth. What can you do about this? Well, with this hack you can customize the number (x) posts required in the last (y) hours. This is all on a per usergroup basis.

There are other ways people have been doing this, such as base arcade access on postsperday. This is a bad way to do this because if somebody goes out of town for a week, their posts per day will suffer. Soon it becomes impossible to get your posts back to the minimum posts per day level. This hack is fair to all members based on usergroups.

This hack adds two new usergroup fields, and adds the option to edit these fields directly form your admincp. It is very self explanatory.

The hack may not seem like much, but I put a lot of time into it, so I would appreciate it if everyone would click install!

PLEASE CLICK INSTALL (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=65735)! That's all I ask. :)

*Please do not edit or redistribute this hack without my permission. Thanks!

~~~~~~~~~~~~
Queries: 2
File edits: 2
New Phrases: 1
~~~~~~~~~~~~

TOTAL INSTALL TIME: ~5 minutes or less

~006

SnowBot
06-02-2004, 02:53 AM
well i will be the first to say THANKS :)

SnowBot
06-02-2004, 03:44 AM
small question before i install, if i have a min post required to enter the arcade via another user hack will this only then take effect after that post count has been made?

007
06-02-2004, 04:09 AM
Most likely yes. They shold both work together just fine. :)

Osterling
06-02-2004, 04:47 AM
Fatal error: Call to a member function on a non-object in /ww.exasko.info/forum/arcade.php on line 515


any idea what the problem is? and if ur qondering this is line 515

$minimumposts = $DB_site->query_first("

007
06-02-2004, 04:59 AM
Sounds like you didn't add the tables. Make sure you add both queries. I have this running perfecty and exactly the same as the install file shows. Make sure you follow the install. Let me know if you still have trouble after double checking the instructions. :)

Osterling
06-02-2004, 05:01 AM
i doubled checked.. copied and pasted the querys in the run box.. :confused:

Osterling
06-02-2004, 05:03 AM
ALTER TABLE `usergroup` ADD `arcademinposts` INT( 11 ) DEFAULT '0' NOT NULL ;

ALTER TABLE `usergroup` ADD `arcademintime` INT( 11 ) DEFAULT '0' NOT NULL ;

those two i ran exactly liek that

007
06-02-2004, 05:08 AM
Go to your usergroup manager and set values for the groups. Maybe I need to make the defaults greater than 0. Try setting values and try it then.

Osterling
06-02-2004, 05:11 AM
i have both set up.. and yet i still get the error :confused:

007
06-02-2004, 05:15 AM
What version of VB3 are you running? I am using 3.01. I noticed at least your profile shows 3.0. Perhaps upgrading first wouldn't be a bad idea?

Osterling
06-02-2004, 05:18 AM
has anyone else got this to work?

Rampag33
06-02-2004, 05:24 AM
I definitely need this. I had the same problem too.

SnowBot
06-02-2004, 05:34 AM
Installed and no errors, now just to hang about for 24h to see if the 2 hacks work together, the first hack worked by saying i have not got enough posts.

Set to 2 posts in 24h

/me clicked installed already

007
06-02-2004, 05:47 AM
It's dynamic. Set it to 30 posts in 24 hours temporarily for your usergroup and try playing a game. :) Basically, it runs a query and counts your total posts in the defined period of time. No need to wait to see results. :) Should take effect immediately.

I have added a step in the arcade.php edits. My appologies. Redownload the file and look at the arcade.php edits. You may have to clear your history to get the most recent file. Sorry for the extra troubles! Everything should work fine now. :)

~006

Osterling
06-02-2004, 05:49 AM
i am running none extra hacks for arcade...

all i've done is made a post requirement for user groups to be able to play in it.. but that shouldn't be causin a problem

SnowBot
06-02-2004, 05:55 AM
hhhmm infact i got the error now.

Fatal error: Call to a member function on a non-object in /home/synergy4/public_html/forum/arcade.php on line 527

007
06-02-2004, 06:00 AM
I updated the install file. Did you rehack the arcade.php edits? It should work now.

SnowBot
06-02-2004, 06:04 AM
I updated the install file. Did you rehack the arcade.php edits? It should work now.
so its just the added

// ######################### REQUIRE BACK-END ############################
require_once('./global.php');
part ?

007
06-02-2004, 06:05 AM
Correct. I forgot to put that in the install file. It's been added now though. Try that and let me know how it works :)

SnowBot
06-02-2004, 06:14 AM
Correct. I forgot to put that in the install file. It's been added now though. Try that and let me know how it works :)works but with the other hack its not realy working...

I set the other hack to require 1 post to get to the arcade.

I have set yours to 2 posts in 24h.

So its now saying

Original hack






Synergy you do not have enough posts to play in the Arcade.

In order to play in the Synergy arcade you need a total of 1 posts. Please make these required posts of a non spamming nature or they will be deleted.


Thank you.
Synergy Staff





this works off post count so if posts are deleted they may loose arcade rights depending on what number is set. I only have it at 1 for the moment.




your hack
You cannot play games in the arcade unless you have made 2 posts within the last 24 hours so i have to set these 2 fields to the same i guess but its a shame as it would be good to allow new reged people just to make 1 post so they can see the arcade and then after 24h they loose it unless they post X number.

Is there anyway to delay it for 24h before the hack kicks in ? or anything like that?

007
06-02-2004, 06:19 AM
Well my hack will check for whatever value you set for minimum posts. If another hack checks for less, and you have this set for more, the other won't work. There is an easy way to get what you want by adding a quick if else statement. I don't have time now to look into it now though because I have to get up in the morning and go to work. :)

SnowBot
06-02-2004, 06:27 AM
Well my hack will check for whatever value you set for minimum posts. If another hack checks for less, and you have this set for more, the other won't work. There is an easy way to get what you want by adding a quick if else statement. I don't have time now to look into it now though because I have to get up in the morning and go to work. :)
ok np but can you PM me the code and where to add it when you have time please ?

Osterling
06-02-2004, 06:28 AM
works now (smile) glad it wasn't due to my error.. great hack!

gmarik
06-02-2004, 07:18 AM
This one sound nice

Fluous
06-02-2004, 03:06 PM
Umm. I need to know which pieces to edit. Theres like a piece that says

Enter time requirements here (in hours) // what would i put there?

'arcademinposts' => 2, 'arcademintime' => 24 // What are those 2 numbers mean? 24 as in hours?

and then this

$definedtime = ($minimumtime[time] * 3600 // whats that number?

Also why I'm here. Does this work with 3.0.0? Hope it does.

You cannot play games in the arcade unless you have made $minimumposts[number] posts within the last $minimumtime[time] hours. << Do I have to take out the $minimumposts[number] and replace that with a number. or replace number with the number.? same for the time.. sorry i'm just coding stupid

SnowBot
06-02-2004, 03:39 PM
Theres like a piece that says

Enter time requirements here (in hours) // what would i put there?
Add the number in hours that they have to make a post within. So you may do something like this.....

2
24

2 is for the ammount of time they have to make there 2 posts within.

'arcademinposts' => 2, 'arcademintime' => 24 // What are those 2 numbers mean? 24 as in hours?
thats just code needed to make the hack work like it should, just do all the changes it says and it will work fine, dont change the code.

and then this

$definedtime = ($minimumtime[time] * 3600 // whats that number?
Same for this do not change it as they are variables the hack looks for in order for it to function.

Also why I'm here. Does this work with 3.0.0? Hope it does.
It should work fine.

You cannot play games in the arcade unless you have made $minimumposts[number] posts within the last $minimumtime[time] hours. << Do I have to take out the $minimumposts[number] and replace that with a number. or replace number with the number.? same for the time..
NO DO NOT change these, they are variables it has to look for, they will check what you have set in the usergroup settings and display that amount, if you change these it will not work. But you can add other phrases to it such as $bbuserinfo[username] to dispay the username of whoever is doing it.

I have this

$bbuserinfo[username]

You cannot play games in the $vboptions[bbtitle] arcade unless you have made $minimumposts[number] posts within the last $minimumtime[time] hours.

Please make these required posts of a non spamming nature or they will be deleted.
<a href="$vboptions[forumhome].php?$session[sessionurl]">Return to forums index</a></li> </ul>
Thank you.

$vboptions[bbtitle] Staff

Fluous
06-02-2004, 03:44 PM
so I only change these: Enter time requirements here (in hours) // the posts one too. and then the

'arcademinposts' => 2, 'arcademintime' => 24 If I wanted 5 posts in the last 2 hours it would be like

'arcademinposts' => 5, 'arcademintime' => 2

?

Fluous
06-02-2004, 04:08 PM
Okay. Now I have this

// Arcade header template
eval('$arcadeheader = "' . fetch_template('arcade_header') . '";');
eval('print_output("' . fetch_template('ARCADE') . '");');?>


The eval $arcade header is that line. any ideas? www.gameraxis.com/forum/arcade.php

SnowBot
06-02-2004, 04:57 PM
so I only change these: Enter time requirements here (in hours) // the posts one too. and then the

'arcademinposts' => 2, 'arcademintime' => 24 If I wanted 5 posts in the last 2 hours it would be like

'arcademinposts' => 5, 'arcademintime' => 2

?
leave that as it says in the instructions. thats just code.

007
06-02-2004, 06:41 PM
Don't change any numbers in the code. If you do, the hack will not work properly. Add all the code and then to change the time and posts variables, go to your usergroup settings and enter the numbers there.

Cold Steel
06-02-2004, 07:45 PM
/me installs. Thanks!

contramontanum
06-02-2004, 09:23 PM
OK, I ran the queries, did the file edits, added the phrase, retraced my steps to double check I did everything right and even clicked install :), but I must be missing something. Can't find any new user group fields in ACP. Where do I set the values? Please help because I've really been waiting for this hack. Thanks.

007
06-02-2004, 09:57 PM
You MUST not have done the admincp/usergroup.php edits. Go double check that part. :)

Fluous
06-02-2004, 10:04 PM
I really want to install this hack. But it's being like you have an error in the last lines of your code. Which is only like eval = ARCADE and fetching those templates. :( So I reuploaded the other files :(

007
06-02-2004, 10:12 PM
You installed it wrong. Where it says "find," do just that. Then ADD below the template code. You mentioned something about changing that code. There are no changes. Just adding the next section that says "add below" below it..

contramontanum
06-03-2004, 12:05 AM
You MUST not have done the admincp/usergroup.php edits. Go double check that part. :)
Double checked and triple checked. All edits done as per instructions. Maybe I'm just low on sugar right now, but where in ACP should I be looking for the new settings? Under Usergroups, yes?

007
06-03-2004, 12:10 AM
Go to yourforums.com/forums/admincp/usergroup.php?do=modify

Click "Go" next to a usergroup. Scroll down to the "Arcade Permissions"

It should show two new options there.

contramontanum
06-03-2004, 12:16 AM
Guess I'm not that familiar with usergroups... :surprised: You are my hero, seriously you are! :banana: I wish I could see the faces of the arcade addicted freeloaders when the get the error message. Woohoo!!!

007
06-03-2004, 01:14 AM
Haha! Sorry for not releasing this earlier. I had originally coded it right after installing the arcade for this very reason, bandwith freeloaders.. :) Who needs em! ;)

colicab-d
06-03-2004, 10:29 AM
Thnks :D been gettin real annoyed with this recently, now to stop the buggers for a few weeks then i,ll be removing the arcade from my site anyways, but thnx :D

Fluous
06-03-2004, 04:25 PM
K now I have one thing. When I redid it and all it shows up fine. Now in the usergroup part. I put 5 posts 2 hours. Now what things do I put yes to? I have it at

Yes they can play / view arcade. Post comments. and the other one. I don't have it where they can delete and edit them. But then I log in as my test and it lets me straight in the arcade :(

Fluous
06-03-2004, 11:31 PM
bump..

007
06-03-2004, 11:32 PM
Did you set the usergroup settings for your test? Also do you actually have 5 posts in the last 2 hours? For testing purpases I always set the minimum to 1 more than I had in that spedified time period. Try that.

007
06-03-2004, 11:33 PM
Lol, no need to bump... Look at the time I replied and the time you bumped.. ;) I'm on it!

Fluous
06-04-2004, 01:24 AM
hmm. Well I had set the usergroup settings for the one that the user test was in. I put 5 posts in 2 hours. That's what I really want it at. I went to the arcade and it gave me permission crap :(

RapCheck
06-04-2004, 01:54 AM
*clicked install*

great one!!!

I asked for this EXACT hack when I installed the arcade months ago. This is perfect.

Fluous
06-04-2004, 11:15 AM
Hmm. I know the aliensoup owner, he had told me how to install a minimum post thing. I think that it's getting in the way now.. Because when I delete the line in the arcade where it showed it. And insert yours. Login as a user and it says " You do not have the ten posts necessary to play in the arcade " . So I give him 11 posts and he can play in the arcade. So did I run a query, and if so can I take it out?

I know I ran a query just forgot what it was called.

007
06-04-2004, 12:45 PM
DO NOT delete any line in the arcade.php. Read the instructions. :) It says "Add below," not "DELETE." PM me with your arcade.php and I will make the edits for you..

Fluous
06-04-2004, 04:06 PM
lol I deleted one that I had used to install the older hack where there was a minimum post count.. Can you message me on AIM: Gamer Axis, or MSN: artofficialao@hotmail.com ?

SnowBot
06-04-2004, 04:30 PM
00r did you have chance to write that IF ELS line for me ?

atomic fireball
06-06-2004, 05:14 PM
Very cool hack.

The install was flawless and very clear. Had it up and running in 5 mins just as noted.

Works like charm! Thanks 006!!

corsacrazy
06-06-2004, 05:52 PM
i have a problem... now i have hundreds of people just spam posting in oder ot get into arcade :(

350Chevy
06-07-2004, 12:40 AM
i have a problem... now i have hundreds of people just spam posting in oder ot get into arcade :(


Then ban them or ban a few as a warning to the others...

Nice hack.. Anyway to integrate this to work with a particular forum as well? I have a forum loaded with "pictures" that people will sign up to just view as well (instead of posting.)

* clicks install

Edit: installed and works flawlessly. Thanks! You saved me alot of time trying to write this myself! :D

007
06-08-2004, 01:08 AM
:) Well it took me a long time. As for using it for a forum, I actually use a variation of it for many things on my board. It get's tricky though and I don't have time to support variations of it. Just look at the code. Basically you'll add the tables again with different names. Then add everything else again. You'll need an "if" statement asking for the forumid you want to limit access to. This will go in forumdisplay.php. That's off the top of my head so don't quote me on it. Like I said though I don't have time to create custom mods. :ermm:

~006

Fluous
06-08-2004, 01:26 AM
Hey thanks for that file edit. Although it DIDN'T fully work I am more pleased with the outcome than if it did. Now they have to have at least ten posts to play in the arcade AND they have to have 5 posts in 2 hours after that to play. :D Ty very much

350Chevy
06-09-2004, 12:43 AM
NM.. was the code in acarde.php.. I edited it from monstercontrols which threw in some weird characters.. All better now.. :) ;)

350Chevy
06-10-2004, 01:22 PM
:) Well it took me a long time. As for using it for a forum, I actually use a variation of it for many things on my board. It get's tricky though and I don't have time to support variations of it. Just look at the code. Basically you'll add the tables again with different names. Then add everything else again. You'll need an "if" statement asking for the forumid you want to limit access to. This will go in forumdisplay.php. That's off the top of my head so don't quote me on it. Like I said though I don't have time to create custom mods. :ermm:

~006

Nah, it was actually pretty simple for what I wanted to do.. I just edited showthread.php and forumdisplay.php with something like:


if ($bbuserinfo['posts'] < 100 AND $foruminfo[forumid]==14)
{
eval(print_standard_error('notforyou'));
}


and add a phrase to print_standard_error called notforyou.. ;) Thanks though..

007
06-12-2004, 07:23 AM
Yeah Chevy, if you wanted to base if off of posts in the last x hours, you would just put my code in place of your if statement in those files. :)

And Flous, I thought that's what you WANTED it to do in the first place? Well either way it's good to know you like it how I coded it :) I must have misunderstood you. Oh well.

AND they have to have 5 posts in 2 hours after that to play. :D Ty very much

5 posts in 2 hours is just asking for spam... ;)

350Chevy
07-30-2004, 04:31 PM
nm.. think I replaced the arcade.php with an old one when backing up..

Diva
08-01-2004, 05:54 PM
Hi! I just had a guy sign up and play without posting. I emailed him to ask how but so far nothing. Has anyone else had this problem?

hutzack
08-03-2004, 03:32 PM
i get Database error in vBulletin 3.0.3:

Invalid SQL:
SELECT arcademinposts AS number FROM vb_33usergroup
WHERE usergroupid=6

mysql error: Unknown column 'arcademinposts' in 'field list'

mysql error number: 1054

Date: Tuesday 03rd of August 2004 11:31:50 AM
Script: http://teenagechaos.com/arcade.php?do=play&gameid=17
Referer: http://teenagechaos.com/arcade.php?
Username: Adam
IP Address: #######

hutzack
08-03-2004, 03:34 PM
pm with help.

007
08-05-2004, 07:15 PM
You didn't run the query toa dd the field "arcademinposts." Read the instructions carefulyl and see if you missed any steps.

And Diva, I've never heard of that happening.. If you find out what happened, let me know and I will post a bug fix. I think it could be your installation though. Make sure you go through every step. Also make sure that you specified the minimum posts for your default usergroup that new users are put into..

MindTrix
08-15-2004, 02:58 PM
installed and so far looks like its working fine :) Nice one ima click install :p

Rampag33
08-19-2004, 01:24 PM
At first I thought I messed up something. Then after examining the code I realize what it was.

My original mod stops people from accessing the games.
This one stops from playing the games. So they still have access to view games and scores but can't play them.

Works with my heavily modded vb3. Thx

INSTALLS!!!

keithnec
10-30-2004, 06:11 AM
I am looking at adding this usefull hack to my forum but just need to check something.

running these queries as they are give me an error because I have a prefix on my forum of vb3_. I can edit the queries with no problem, but how much on the edited code do I also need to edit to get this to work, I can see a few references to 'usergroup[arcademinposts]' which I assume need editing, but what about the references to $usergroup['arcademinposts'] ??
regards
keith
REF: queries that fail
ALTER TABLE `usergroup` ADD `arcademinposts` INT( 11 ) DEFAULT '0' NOT NULL ;
ALTER TABLE `usergroup` ADD `arcademintime` INT( 11 ) DEFAULT '0' NOT NULL ;

Cold Steel
11-11-2004, 02:40 PM
I believe that if people have made two spam posts, and then got those posts deleted by staff, they can still play in the arcade.

Is there any way to check to see if the user has made two still-existent posts before letting him play?

TwinsX2Dad
11-12-2004, 07:06 PM
vB3.03 Here.

Installed perfectly.

Works even better.

Thank you! It is what I've been looking for.

And yes, I whole heartedly clicked INSTALL!

Can you tell I am happy now?

:banana:

neocorteqz
11-16-2004, 07:09 PM
Clicked install, great hack. only one small problem.

http://upload.nemesisforums.net/userfiles/Neocorteqz/code1.png


I'm sure it's not ok to remove it, so why is it showing up?

HarryBO
11-20-2004, 02:43 AM
Nice Hack 006!

Works fine 4 me!

My users ask me, if there is a way to avoid the Hack, when a user have a defined Post Count!

Example: User have 200 Posts ---> He can play everytime and mustnĀ“t have had 3 Post in 24 Hours!

Is there a way to code it?

neocorteqz
11-23-2004, 08:14 PM
bump for last two post. :)

well actually if you want to make it so that there is a required amount of post, you can create a new usergroup and make it a promotion group where it will promote someone once they reach a certain post level. I did that with avatars.

Intex
12-29-2004, 06:59 AM
I know there's a few mods out there that restrict arcade access based upon amount of posts you create. However, I personally thought that this would just increase spam on the website.

So, is there a mod out there that restricts the amount of times games can be played per day. For example, you can put a limit of 50 per day and this would restrict everyone to playing games more than 50 times in any one day.

I assume this could be done by tracking how many scores have been recorded for a user within 24 hours or perhaps if they select the link to play the game?

Any help appreciated.

Deimos
12-29-2004, 09:49 AM
/me installs

Great hack! Thanks!

007
01-05-2005, 12:56 AM
neocorteqz, I'm not sure why that is showing up.. I'm assuming you mean the functon text at the top? Anyway, I don't think that has anything to do with my hack, as nobody else has had that happen. Are you still having problems with it?

rjpa
01-08-2005, 12:09 PM
Hi,

I'm running vB3 3.0.5 and in the install docs it says:
// in admincp/usergroup.php
********
* FIND *
********
__________________________________________________ __

'profilepicmaxsize' => 25000

But I cannot find the variable: 'profilepicmaxsize' => 25000 in the file: admincp/usergroup.php

What do I do wrong?

/rjpa

BeatificFaith
01-26-2005, 08:04 PM
Hi :) ... is there a way to exclude certain forums that people can post in. For instance, I want it to work where they will need 5 posts in 48 hours but I want to exclude forums that are just for games... is there a way to do this? By the way a big THANK YOU for this :)

lowcarbscoop
03-25-2005, 12:27 AM
Installed and it works great at my low carb board.

Deimos
03-25-2005, 02:33 PM
This is a great hack, but I don't think it works properly?

Although it DOES restrict access properly, here's the issue I noticed

We have several forums where you don't gain post counts with any replies or topics you make, yet people with a ZERO post count can make 2 posts in one of these forums and get access to the arcade?

007
04-07-2005, 11:57 PM
This currently counts ALL posts. It pulls the posts from the database. I think it could be changed to not pull posts that didn't add to the user's postcount, but right now I don't have time to mess with that.

If somebody wants to look into it I can add it to the hack. :)

Deimos
04-10-2005, 04:54 PM
Doh, ok

Deimos
04-15-2005, 06:33 PM
Can anyone do this?

wolfyman
04-29-2005, 12:40 AM
running 3.0.7
logged in from a dummy account that hadn't posted in 5 days or so.
played without posting.

suggestions please?

chriswible
05-02-2005, 10:03 PM
I needed this, thanks. *clicks install*

iceytdot
05-09-2005, 07:54 PM
siiick hack just installed works proper ... i needed this to increase activity!
*clicks install*

wolfyman
05-12-2005, 09:12 PM
running 3.0.7
logged in from a dummy account that hadn't posted in 5 days or so.
played without posting.

suggestions please?

hello hello!

Aeolian_X
06-18-2005, 12:17 AM
Excellent hack! I totally needed this one too.

*Clicks Install and Rocks On!*

Gutspiller
08-13-2005, 04:52 AM
I have a spam / test forum and despite having it set not to increase users post counts, they can still post in it and get access to the arcade. Can somebody come up with a fix for this?

Also, I was hoping it would be possible to make it so on the error message it would show how many posts they still need to make to gain access.

Can somebody help me with either of these? :(