Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)

Reply
 
Thread Tools Display Modes
  #1  
Old 04-29-2004, 12:38 PM
contramontanum contramontanum is offline
 
Join Date: Feb 2004
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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.
Reply With Quote
  #2  
Old 04-29-2004, 02:54 PM
Giveit2u43 Giveit2u43 is offline
 
Join Date: Jun 2003
Location: Liverpool
Posts: 145
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #3  
Old 04-29-2004, 03:12 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 04-29-2004, 03:15 PM
dstruct2k's Avatar
dstruct2k dstruct2k is offline
 
Join Date: Dec 2002
Location: Winnipeg
Posts: 318
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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;
Reply With Quote
  #5  
Old 04-29-2004, 03:36 PM
Giveit2u43 Giveit2u43 is offline
 
Join Date: Jun 2003
Location: Liverpool
Posts: 145
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #6  
Old 04-29-2004, 04:10 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #7  
Old 04-29-2004, 04:31 PM
Giveit2u43 Giveit2u43 is offline
 
Join Date: Jun 2003
Location: Liverpool
Posts: 145
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #8  
Old 04-29-2004, 10:55 PM
007's Avatar
007 007 is offline
 
Join Date: Jan 2003
Location: United States
Posts: 872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #9  
Old 05-06-2004, 04:53 PM
Giveit2u43 Giveit2u43 is offline
 
Join Date: Jun 2003
Location: Liverpool
Posts: 145
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sadly 006.. nor do I

Hopefully one of the vb3 expert hackers might be able to answer this question.
Reply With Quote
  #10  
Old 05-06-2004, 07:16 PM
007's Avatar
007 007 is offline
 
Join Date: Jan 2003
Location: United States
Posts: 872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:34 PM.


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.06314 seconds
  • Memory Usage 2,251KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (5)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete