vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   v3Arcade mod (https://vborg.vbsupport.ru/showthread.php?t=64532)

contramontanum 04-29-2004 11:38 AM

v3Arcade mod
 
I'm looking for a (simple?) mod that restricts access to the Arcade based on number of posts in the last x days. I know Arcade access can be regulated with promotions, but when the member is promoted unlimited access is granted, and I'm looking for an incentive to continous posting. I'm also aware of the Arcade Pass hack in combination with a points system, but frankly that seems like overkill for what I want to achieve. I was hoping for something simple like a template mod.

Giveit2u43 04-29-2004 01:54 PM

I did this the cheap and nasty way... in arcade.php find the first instance of:

Code:

$DB_site->free_result($result_gamesettings);
BELOW it add:

Code:

$jointime = (TIMENOW - $bbuserinfo['joindate']) / 86400; // Days Joined
        $postsperday = $bbuserinfo['posts'] / $jointime;

        if ($postsperday <= 3) {
                print_no_permission();
        }

Change 3 in that to whatever value you wish.. then as long as the member has a postsperday average that is above that number they can view the arcade, if not they get a no permission screen.

Boofo 04-29-2004 02:12 PM

Quote:

Originally Posted by Giveit2u43
I did this the cheap and nasty way... in arcade.php find the first instance of:

Code:

$DB_site->free_result($result_gamesettings);
BELOW it add:

Code:

$jointime = (TIMENOW - $bbuserinfo['joindate']) / 86400; // Days Joined
        $postsperday = vb_number_format($bbuserinfo['posts'] / $jointime, 2);

        if ($postsperday <= 3) {
                print_no_permission();
        }

Change 3 in that to whatever value you wish.. then as long as the member has a postsperday average that is above that number they can view the arcade, if not they get a no permission screen.

You don't want to use the number format in that. You don't really need to. ;)

dstruct2k 04-29-2004 02:15 PM

Number format is BAAAD if you're not done with the numbers, especially when you're never displaying the output.

Change that line to:
Code:

        $postsperday = $bbuserinfo['posts'] / $jointime;

Giveit2u43 04-29-2004 02:36 PM

ahhh yes, should have remembered to change that, I`m doing more with this on my own site.. but don`t want to give away all my secrets ;)

Boofo 04-29-2004 03:10 PM

Quote:

Originally Posted by Giveit2u43
ahhh yes, should have remembered to change that, I`m doing more with this on my own site.. but don`t want to give away all my secrets ;)

So I take it I'm not gonna get the secrets either? :(

Giveit2u43 04-29-2004 03:31 PM

Quote:

Originally Posted by Boofo
So I take it I'm not gonna get the secrets either? :(

awww. I`ll always make an exception for you buddy ;)

007 04-29-2004 09:55 PM

Perhaps you can just answer one question? Hopefully it's not one of your secrets, but how would I make it so the error message is a custom message that I can set? I don't know how to make error messages in VB3 yet.. Thanks! :)

~006

Giveit2u43 05-06-2004 03:53 PM

Sadly 006.. nor do I :(

Hopefully one of the vb3 expert hackers might be able to answer this question.

007 05-06-2004 06:16 PM

Good news Giveit2u43, I found this a few days ago. Found it very helpful with making custom error messages: https://vborg.vbsupport.ru/showthread.php?t=64479

:)

Cold Steel 05-27-2004 07:28 PM

I've made a custom error message, but how do I edit arcade.php to call that error message?

Cold Steel 05-27-2004 11:26 PM

Also, the members who do not have enough posts can still play games by going to the direct URL. They just click on the game in postbit.

Zachery 05-28-2004 12:58 AM

Quote:

Originally Posted by Cold Steel
Also, the members who do not have enough posts can still play games by going to the direct URL. They just click on the game in postbit.

Your best off setting up usergroup promotions and restricting access to the registered usergroup.


All times are GMT. The time now is 05:02 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.02866 seconds
  • Memory Usage 1,736KB
  • 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
  • (5)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (13)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