Page 1 of 1

The Vault Mod

PostPosted: Mon Jan 21, 2008 10:49 pm
Author: MWE_001
Tried and tested on a fresh install of 1.4.1 and it works great if you use the download from this website.

When you do the pcp adjustments per the instructions, there are no errors from Cracker tracker.

You will get cracker tracker erros trying to adjust Stocks in your new Stock Exchange.

Here is the debug info. Tried and it works. I now have no issues.

Code: Select all
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Script-Filename]------------------------------------------#/test/admin/admin_qbar.php  ##-----[ FIND ]------------------------------------------#define('IN_PHPBB', 1);  ##-----[ AFTER, ADD ]------------------------------------------#define('CT_SECLEVEL', 'MEDIUM');$ct_ignorepvar = array('explain');  ##-----[ SAVE/CLOSE ALL FILES ]------------------------------------------## EoM  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Script-Filename: /test/admin/admin_vault_exchange.php----------------  Request-Method: POST  Matching rule: 'In variable:   stock_desc  Possible solution:------------------  ##-----[ OPEN ]------------------------------------------#/test/admin/admin_vault_exchange.php  ##-----[ FIND ]------------------------------------------#define('IN_PHPBB', 1);  ##-----[ AFTER, ADD ]------------------------------------------#define('CT_SECLEVEL', 'MEDIUM');$ct_ignorepvar = array('stock_desc');  ##-----[ SAVE/CLOSE ALL FILES ]------------------------------------------## EoM  


**Correction**
I get a sql error when trying to view the profile now.

[code]Could not obtain accounts information  DEBUG MODE  SQL Error ]

I guess once I get that mysql compatible for my version, it might work. Ill report back, But other then that, no other errors

Re: The Vault Mod

PostPosted: Mon Jan 21, 2008 11:23 pm
Author: MWE_001
Fixed. You can now use this with Integramod 1.4.1 with mysql 5

Here is the fix.

Open profilcp/def/def_userfuncs_vault.php

Find

Code: Select all
$sql = " SELECT e.* , eu .* , u.* FROM " . VAULT_EXCHANGE_TABLE . " e , " . VAULT_USERS_TABLE . " u)         LEFT JOIN " . VAULT_EXCHANGE_USERS_TABLE . " eu ON ( e.stock_id = eu.stock_id )         WHERE e.stock_id = eu.stock_id         AND u.owner_id = eu.user_id         AND eu.user_id =  " . $view_userdata['user_id'];


Replace with

Code: Select all
$sql = " SELECT e.* , eu .* , u.* FROM (" . VAULT_EXCHANGE_TABLE . " e , " . VAULT_USERS_TABLE . " u)         LEFT JOIN " . VAULT_EXCHANGE_USERS_TABLE . " eu ON ( e.stock_id = eu.stock_id )         WHERE e.stock_id = eu.stock_id         AND u.owner_id = eu.user_id         AND eu.user_id =  " . $view_userdata['user_id'];


Everything now works.

Enjoy, Ray

PostPosted: Tue Jan 22, 2008 5:54 am
Author: richiebgood
what does this mod do?

Re: The Vault Mod

PostPosted: Tue Jan 22, 2008 9:53 am
Author: MWE_001
It's a little bit fancier version of the bank mod. Where users can open an bank account, gain intererst, take out a loan (if not paid back in x- days it locks their bank account), and it has a virtual stock exchange.

I am going to create a test account on my test site. I'll be right back and post.

And the mod may be fine without my fix it one is still using an old version of mysql. Please use the default method first unless you (the installer) have mysql5 on your server.