vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   v3 Arcade/Arcade Pass Hack - Usergroup Option - Can Free Arcade (https://vborg.vbsupport.ru/showthread.php?t=65948)

kall 06-07-2004 10:00 PM

v3 Arcade/Arcade Pass Hack - Usergroup Option - Can Free Arcade
 
This gives you the ability to define which Usergroups have to use the Arcade Pass.

If a Usergroup has Can Free Arcade enabled, they will not have to purchase an Arcade Pass or pay points to play games, nor be eligible for jackpots...as they are completely skipping the Arcade pass Hack.

Limitations: If the member wins a game (or places in whatever place you have defined in order to win a portion of the Jackpot), they will still receive the Points.

Members will not be able to see what the Jackpot for a game is, as vB assumes that the Arcade Pass hack is turned off, template-wise.

We use it for paid members. :)

**UPDATE**

If you wish to disable the Group's ability to win prize points for top scoring (or whatever you have set as the position required to win points), do the following:

Find n arcade.php:
PHP Code:

if ($vboptions['arcadepass_enablejackpot'] == 1) { 

Replace with:
PHP Code:

if ($vboptions['arcadepass_enablejackpot'] == AND $arcadepermissions['canfreearcade']==0) { 


kall 06-08-2004 12:33 AM

Hmm. Attachment didn't attach.

Oh well, this way is much easier to follow anyway.

Phrases.

Add New Phrase

Phrase Type: Permissions
Varname: can_free_arcade
Text: Can play free in Arcade without a Pass


Admin Help.

To access the Admin Help Manager, your board must be running in debug mode.
It is recommended that you close your board while debug is enabled as it is a potential security risk.

In includes/config.php

Add line

PHP Code:

$debug=1

ACP --> vBulletin Options --> Admin Help Manager

[Add New Topic]

Script: usergroup
Action: add,edit
Option: canfreearcade
Display Order: 321
Title: Can Play Free in Arcade
Text: This permission allows members of this group to play free without an Arcade Pass in the <a href="arcade.php" target="_blank">Arcade</a>.
vBulletin Default: No

When you are done, remove the line $debug=1; from includes/config.php


Bitfield Permissions

Add new usergroup forumpermission

In includes/init.php

Find:
PHP Code:

$_BITFIELD['usergroup']['arcadepermissions'] = array(
    
'canviewarcade'            => 1,
    
'canplayarcade'            => 2,
    
'caneditscores'             => 4,
    
'candelscores'             => 8,
    
'canmakecomments'        => 16
    
); 

Replace with

PHP Code:

$_BITFIELD['usergroup']['arcadepermissions'] = array(
    
'canviewarcade'            => 1,
    
'canplayarcade'            => 2,
    
'caneditscores'             => 4,
    
'candelscores'             => 8,
    
'canmakecomments'        => 16,
    
'canfreearcade'            => 32
); 

Admin CP functionality

Add option to Admin CP Usergroup Manager

In admincp/usergroup.php

Find:

PHP Code:

print_yes_no_row("Can Play Games in the Arcade? <dfn>Allows usergroup to play arcade games</dfn>"'usergroup[canplayarcade]'$ug_bitfield['canplayarcade']); 


Under that add:

PHP Code:

print_yes_no_row("Can Play Games Free Without a Pass? <dfn>Allows usergroup to play arcade games</dfn>"'usergroup[canfreearcade]'$ug_bitfield['canfreearcade']); 



Integrate into Arcade

In arcade.php

Find (three times):

PHP Code:

if ($vboptions['arcadepass_enable'] == 1) { 


Replace with:

PHP Code:

if ($vboptions['arcadepass_enable'] == AND $arcadepermissions['canfreearcade']==0) { 


And there you have it.

the Sandman 06-08-2004 12:55 AM

I think this is a nice addition to the Arcade Pass. I'm gonna set it so Registered Users "Can Free Arcade". Then, I'll set up a promotion scheme so that after one week they move into a "Registered Plus" group where the Arcade Pass system will kick in. They'll be hooked by then and will be forced to post in order to play... :rolleyes:

gmarik 06-08-2004 06:12 AM

cool one

Zelda-King 06-25-2004 07:51 PM

It seems to be working fine on 3.0.1. Nice one!

the Sandman 07-05-2004 02:24 PM

Quote:

Originally Posted by kall
**UPDATE**

If you wish to disable the Group's ability to win prize points for top scoring (or whatever you have set as the position required to win points), do the following:

Find n arcade.php:
PHP Code:

if ($vboptions['arcadepass_enablejackpot'] == 1) { 

Replace with:
PHP Code:

if ($vboptions['arcadepass_enablejackpot'] == AND $arcadepermissions['canfreearcade']==0) { 


There are two
PHP Code:

if ($vboptions['arcadepass_enablejackpot'] == 1) { 

Do we replace one or both?

kall 07-05-2004 06:32 PM

Quote:

Originally Posted by the Sandman
There are two
PHP Code:

if ($vboptions['arcadepass_enablejackpot'] == 1) { 

Do we replace one or both?

It's the one in the part that defines the new points value after getting a valid position...

After:

PHP Code:

$position $DB_site->query_first("
        SELECT COUNT(*) + 1 AS position
        FROM " 
TABLE_PREFIX "gamesessions AS gamesessions
        WHERE score > 
$game[score] AND valid=1 AND gamesessions.gamename='$game[shortname]'
    "
); 

Change
PHP Code:

if ($vboptions['arcadepass_enablejackpot'] == 1) { 

to

PHP Code:

if ($vboptions['arcadepass_enablejackpot'] == AND $arcadepermissions['canfreearcade']==0) { 


idslamyou 08-23-2004 03:31 AM

I am getting this error when I try to change the a usergroups setting to play the arcade without a pass

Code:

Invalid SQL: UPDATE usergroup SET

### UPDATE QUERY GENERATED BY fetch_query_sql() ###
        title = 'Platinum Member',
        description = '',
        usertitle = 'Platinum Member',
        opentag = '<b>',
        closetag = '</b>',
        passwordexpires = '0',
        passwordhistory = '0',
        ispublicgroup = '0',
        canoverride = '0',
        canfreearcade = '1',

Anybody?

kall 08-26-2004 11:14 PM

Quote:

Originally Posted by idslamyou
I am getting this error when I try to change the a usergroups setting to play the arcade without a pass

Code:

Invalid SQL: UPDATE usergroup SET

### UPDATE QUERY GENERATED BY fetch_query_sql() ###
        title = 'Platinum Member',
        description = '',
        usertitle = 'Platinum Member',
        opentag = '<b>',
        closetag = '</b>',
        passwordexpires = '0',
        passwordhistory = '0',
        ispublicgroup = '0',
        canoverride = '0',
        canfreearcade = '1',

Anybody?

Do you mean that you get that after you hit the Submit button in the AdminCP page usergroup.php?

I haven't ever seen an SQL error in that format, so I'm stumped at the moment.

idslamyou 08-27-2004 08:53 PM

That is correct. I forgot to copy the complete error. Here it is again:

Code:

Database error in vBulletin 3.0.3:

Invalid SQL: UPDATE usergroup SET

### UPDATE QUERY GENERATED BY fetch_query_sql() ###
        title = 'Platinum Member',
        description = '',
        usertitle = 'Platinum Member',
        opentag = '<b>',
        closetag = '</b>',
        passwordexpires = '0',
        passwordhistory = '0',
        ispublicgroup = '0',
        canoverride = '0',
        canfreearcade = '1',
        attachlimit = '50000000',
        avatarmaxwidth = '50',
        avatarmaxheight = '50',
        avatarmaxsize = '40000',
        profilepicmaxwidth = '100',
        profilepicmaxheight = '100',
        profilepicmaxsize = '100000',
        pmquota = '100',
        pmsendmax = '5',
        uttstore_discount = '0',
        forumpermissions = '127487',
        pmpermissions = '3',
        calendarpermissions = '31',
        wolpermissions = '1',
        adminpermissions = '0',
        genericpermissions = '2735839',
        genericoptions = '13',
        arcadepermissions = '19',
        articlepermissions = '0'
WHERE usergroupid=9
mysql error: Unknown column 'canfreearcade' in 'field list'

mysql error number: 1054



All times are GMT. The time now is 04:39 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.01706 seconds
  • Memory Usage 1,790KB
  • 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
  • (3)bbcode_code_printable
  • (16)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete