Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - SneakyWho_am_i

Pages: [1]
1
Requested additions / SMFShop vs. SMFArcade vs. Guests
« on: September 19, 2007, 02:22:26 pm »
I'm too lazy to do a forum search, so sue me.
I have some requests/suggestions. They involve SMFShop and SMFArcade.... But that's not so bad as I bring code with me and therefore it should be easy to implement for someone who can be bothered making SMF Packages.

I sent a copy of this to a user at Ericsworld but got no reply so instead I'll post it publicly somewhere on the other side of the fence.

Please forgive me if these things have already been done/considered/implemented/discussed.

This is only relevant if you're running the shop and the arcade, and if you've tied them in to each other. Please note that the text following this sentence is effectively a quote and some of it may seem a little ... out of context.

Anyway, I'm very new to all of this php and whatnot, but I've been tinkering a bit, roaming in wider and wider circles.
Screw the story. After writing it.. It's too long, just skip down to the code and if you can't see the point, THEN read the story
Looked like C at first. Or some foreign set of glyphs.

But hey, the Arcade proves to be a great way to drive traffic to my forum. Trouble is keeping the participation level up once they get sick of winning/losing the games.

Good medicine for the participation issue is the arcade pass and a tiny fee for each game... But enabling either of these things locks out guests and then I run into high participation with low registration.

Inspired me to look deeper into it and try to track down a way to get the best of both worlds. I did. And I was proud of myself for finding all the answers. This is all as much to do with SMFShop as the Arcade but TrueSatan suggested I bring what I had done over to you.


The idea: Guests can play for free without a pass, but can't save their scores or comments (and can't earn trophies). Registered users have to have the pass AND pay (a little) to compete. If registered users want to play NON-competitively, they need only log out and they can play for free.
The reward for getting a trophy or posting in the forum far outweighs the cost of a game, it's all worthwhile.

at signup, I give them the pass, AND the cost of the pass (and the pass is worth as much as 100 games)

In Subs-Members.php (File 1 of 3)
(Change 1 of 1 - Add 90 day arcade pass to 'member profile on registration' array)

Find:
Code: [Select]
// Begin SMFShop 2.3 (Build 11) code
'money' => $modSettings['shopRegAmount'],
// End SMFShop code
Replace:         
Code: [Select]
// Begin SMFShop 2.3 (Build 11) code
'money' => $modSettings['shopRegAmount'],
// End SMFShop code
// Begin SneakyWho_am_i
'arcadePass' => time() + 90 * 86400,
// End SneakyWho_am_i
      
            
In Arcade.php (File 2 of 3)
(Change 1 of 1 - Guests can play without arcade pass)

Find:
Code: [Select]
//Added for shop mod
if (isset($modSettings['shopEnableArcadePass']) && $modSettings['shopEnableArcadePass'] > 0)
Replace:
Code: [Select]
//Added for shop mod SneakyWho_am_i disables pass check for guests
if (isset($modSettings['shopEnableArcadePass']) && (!$user_info['is_guest']) && $modSettings['shopEnableArcadePass'] > 0)


In ArcadePlay.php (File 3 of 3)
(Change 1 of 1 - Guests can play without $money)

Find:
Code: [Select]
//Added for shop mod
if(isset($modSettings['shopCostPerPlay']) && $modSettings['shopCostPerPlay'] > 0)
Replace:
Code: [Select]
//Added for shop mod SneakyWho_am_i's guests play for nothing
if(isset($modSettings['shopCostPerPlay']) && (!$user_info['is_guest']) && $modSettings['shopCostPerPlay'] > 0)

Pages: [1]