The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]() Code:
##################################################### # Require X posts in the last Y hours to use arcade # ##################################################### # ~ by 006 # ############ // official support thread available at vbulletin.org https://vborg.vbsupport.ru/showthrea...221#post518221 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! That's all I ask. :) *Please do not edit or redistribute this hack without my permission. Thanks! ~006 // On to the installation! ~~~~~~~~~~~~ Queries: 2 File edits: 2 New Phrases: 1 ~~~~~~~~~~~~ TOTAL INSTALL TIME: ~5 minutes or less ################### ##### Step 1. ##### ################### Run the following queries ____________________________________________________ ALTER TABLE `usergroup` ADD `arcademinposts` INT( 11 ) DEFAULT '0' NOT NULL ; ____________________________________________________ then ____________________________________________________ ALTER TABLE `usergroup` ADD `arcademintime` INT( 11 ) DEFAULT '0' NOT NULL ; ____________________________________________________ ################### ##### Step 2. ##### ################### ____________________________________________________ ************** * FILE EDITS * ************** // in admincp/usergroup.php ******** * FIND * ******** ____________________________________________________ 'profilepicmaxsize' => 25000 ____________________________________________________ **************** * REPLACE WITH * **************** ____________________________________________________ 'profilepicmaxsize' => 25000, 'arcademinposts' => 2, 'arcademintime' => 24 ____________________________________________________ ******** * FIND * ******** ____________________________________________________ print_yes_no_row("Can Delete Leaderboard Scores? <dfn>Allows usergroup to delete scores and comments left by other members</dfn>", 'usergroup[candelscores]', $ug_bitfield['candelscores']); ____________________________________________________ ************* * ADD UNDER * ************* ____________________________________________________ print_input_row("006's Require X posts in last Y hours to play games in arcade? <dfn>Enter post requirements here</dfn>", 'usergroup[arcademinposts]', $usergroup['arcademinposts']); print_input_row("006's Require X posts in last Y hours to play games in arcade? <dfn>Enter time requirements here (in hours)</dfn>", 'usergroup[arcademintime]', $usergroup['arcademintime']); ____________________________________________________ // SAVE AND UPLOAD admincp/usergroup.php // in arcade.php ******** * FIND * ******** ____________________________________________________ // pre-cache templates used by specific actions $actiontemplates = array(); ____________________________________________________ ************* * ADD UNDER * ************* ____________________________________________________ // ######################### REQUIRE BACK-END ############################ require_once('./global.php'); ____________________________________________________ ******** * FIND * ******** ____________________________________________________ // ############################ PLAY PAGE ################################ if ($_GET['do']=="play") { ____________________________________________________ ************* * ADD UNDER * ************* ____________________________________________________ //start require x posts in the last y hours to use arcade by 006 $minimumposts = $DB_site->query_first(" SELECT arcademinposts AS number FROM " . TABLE_PREFIX . "usergroup WHERE usergroupid=$bbuserinfo[usergroupid] "); $minimumtime = $DB_site->query_first(" SELECT arcademintime AS time FROM " . TABLE_PREFIX . "usergroup WHERE usergroupid=$bbuserinfo[usergroupid] "); $definedtime = ($minimumtime[time] * 3600); $limit = TIMENOW - $definedtime; $recentpostcount = $DB_site->query_first(" SELECT COUNT(*) AS total FROM " . TABLE_PREFIX . "post WHERE userid=$bbuserinfo[userid] AND dateline >= $limit "); if ($recentpostcount[total] < $minimumposts[number]) { eval(print_standard_error('error_no_arcade_permission')); } //end require x posts in the last y hours to use arcade by 006 ____________________________________________________ // SAVE AND UPLOAD arcade.php ################### ##### Step 3. ##### ################### *************** * New Phrases * *************** ____________________________________________________ Type: Front-End Error Messages VarName: no_arcade_permission Text: You cannot play games in the arcade unless you have made $minimumposts[number] posts within the last $minimumtime[time] hours. ____________________________________________________ ################### ##### Step 4. ##### ################### *************** * INSTALL ME! * *************** ____________________________________________________ Go to vbulletin.org and click INSTALL! :) ____________________________________________________ Done! I put a lot of time into this. The least you can do in return is click the install button at vbulletin.org. PLEASE CLICK INSTALL IF YOU USE THIS HACK :) https://vborg.vbsupport.ru/vborg_mis...threadid=65735 Thanks everybody! ~006 Can someone install this for me? I might pay you ![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|