I have a question about using Cash Mod with a php site that has been intetegrated with phpBB (the php site uses the phpBB session for log in, etc.)
As the Cash Mod author instructed at the beginning of the thread, you can add this to your php site to allow your php site to use Cash Mod:
I did that, so now the code that my php site uses to integrate with phpBB and the Cash Mod looks like this:
Code: Select all
$site_root_path = './';
$phpbb_root_path2 = '/forum/';
$phpbb_root_path = $site_root_path . $phpbb_root_path2;
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.php');
$userdata = session_pagestart($user_ip, PAGE_INDEX);
That appears to be working fine. In my php site, I am able to get the user's currency amount and display it like this:
the user's currency value is no trouble. However, at times I will want to increase or decrease the user's currency based on events that occur on my php site (not on my forum).
In other words, my php page sees that you have $50.00 when you arrive. You do something on my php page that should earn you $20.00. From my php page, I need to update your currency amount to show that you have $70.00 instead of $50.00.
What is the best or easiest way for the php page to update the new amount to the phpBB database? Does the Cash Mod API provide a quick way of doing that? I checked the post in this thread about the API, and it leads one to believe that there are undocumented features. So I'm assuming (hoping) there are features that some of you are using that I might not be aware of.
Any advice that you have to offer will be much appreciated.