[2.0.18] Cash Mod

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Post Reply

Rating:

Excellent!
1036
66%
Very Good
239
15%
Good
121
8%
Fair
36
2%
Poor
126
8%
 
Total votes: 1558

AbelaJohnB
Former Team Member
Posts: 5674
Joined: Fri Jul 06, 2001 11:56 pm

[2.0.18] Cash Mod

Post by AbelaJohnB »

MOD Name: Cash Mod
Author: Xore
MOD Description: A highly customizable Rewards System

Includes Cash Mod API

Please scroll down two posts for more information. Click here for a complete list of features


MOD Version: 2.2.3 (Updated 11/26/05)

Download File: CashMod223a.zip
mods overview page: View
File Size: 146149 Bytes

Security Score: 0

Support for this MOD needs to be asked within this topic. The phpBB Teams are not responsible or required to give anyone support for this MOD. By installing this MOD, the phpBB Support Team or phpBB MODifications Team may not be able to provide support.

This MOD has only been tested by the phpBB MOD Team with the phpBB version in the topic title. It may not work in any other versions of phpBB.
Last edited by MHobbit on Mon Apr 30, 2007 12:31 am, edited 7 times in total.
AbelaJohnB
Former Team Member
Posts: 5674
Joined: Fri Jul 06, 2001 11:56 pm

Post by AbelaJohnB »

MOD Validated/Released :mrgreen:
Last edited by AbelaJohnB on Wed Jul 30, 2003 5:02 am, edited 2 times in total.
Xore
Former Team Member
Posts: 2594
Joined: Wed Apr 16, 2003 7:42 pm
Location: the wastelands between insomnia and clairvoyance
Contact:

Post by Xore »

ImageCash Mod Support
The contents of the following posts are "up to date" as of the date specified in the edit notation at the bottom of each post. I do my best to keep Cash Mod Support current.
Last edited by Xore on Wed Jun 09, 2004 4:26 pm, edited 53 times in total.
Camels in the Mist
<noise type="random" source="camel" />
Cash Mod
Xore
Former Team Member
Posts: 2594
Joined: Wed Apr 16, 2003 7:42 pm
Location: the wastelands between insomnia and clairvoyance
Contact:

Troubleshooting

Post by Xore »

Troubleshooting
  • General Problems
    • Blank pages
    • Users aren't earning any cash!
    • Template->make_filename(): Error - file does not exist
  • Problems specific to 2.2.1
    • Missing text
    • Fatal error: Cannot instantiate non-existent class: cash_menucat
    • SQL Error : 1146 Table 'xxx_xxx.cash' doesn't exist and i have jr admin mod installed
    • SQL Error : 1146 Table 'xxx_xxx.phpbb_cash' doesn't exist
    • message_die() was called multiple times. This isn't supposed to happen. Was message_die() used in page_tail.php?
    • Problems with donation/modify/exhange
  • Problems specific to 2.0.2 (this will be phased out soon)
    • "I run MSSQL, and am having problems..."
    • Problems with mysql_install.php
  • General Problems
    • Blank pages

      Problem: This is one of the worst problems you can get. Why? because it means that you're getting an error, and your webhost is surpressing errors, so you have no way of knowing what it is. The best i can really do is take a guess and hope i got it right. Generally, however, this is caused by a mistaken in the install process. You should triple check to make sure you properly did everything that the install file tells you to do.
    • Users aren't earning any cash!

      This can be one of several problems.
      • Make sure the currency is enabled
      • Make sure the earnings per post/reply/char are not set to 0
      • Make sure that you have that currency enabled in Cash Forums Settings, for the forum in question.
      • Make sure you made the proper changes to includes/functions_post.php
    • Template->make_filename(): Error - file does not exist

      Problem: When installing, you either didn't upload all the tpls, or you uploaded them to the wrong directory, or you didn't upload them to all your templates.
      Fix: Make sure you uploaded all of the tpls to their proper location in all of your templates, not just subSilver
  • Problems specific to 2.2.1
    • Missing Text

      Problem: Those words are provided by the language files language/*/lang_cash.php, which is included in functions.php.
      Fix: Check your install instructions, Find the instructions for includes/functions.php and apply the edits properly
    • Fatal error: Cannot instantiate non-existent class: cash_menucat

      Problem: This class is defined in functions_cash.php, which should be included via common.php (which is included into admin panels via pagestart.php, which most likely means functions_cash.php isn't being included in common.php (or properly)
      Fix: Check your install instructions, Find the instructions for common.php and apply the edits properly
    • SQL Error : 1146 Table 'xxx_xxx.cash' doesn't exist and i have jr admin mod installed

      Problem: Jr admin mod includes admin panels via a function, where normally the admin panels are included in the global namespace. Cash Mod requires the $table_prefix variable, which is not provided inside jr admin mod's function.
      Fix: Open includes/functions_jr_admin.php
      around line 183, find

      Code: Select all

      	global $db, $phpbb_root_path, $lang, $phpEx, $board_config, $userdata;
      after it (on the next line), add this:

      Code: Select all

      	global $table_prefix;
    • SQL Error : 1146 Table 'xxx_xxx.phpbb_cash' doesn't exist

      Problem: This table is required for Cash Mod, and it seems to have not been created. You should already know this if you read the readme... which you were supposed to read, yes?
      Fix: Either manually run the sql queries provided, or run the sql installer that comes provided with Cash Mod.
    • message_die() was called multiple times. This isn't supposed to happen. Was message_die() used in page_tail.php?

      Problem: Odds are in your favor that you didn't run the SQL installer
      Fix: Run the SQL installer.
    • Problems with donation/modify/exhange
      Problem: Unsure exactly what causes this problem.
      Fix: Replace cash.php with the version found here
  • Problems specific to 2.0.2
    • "I run MSSQL, and am having problems..."
      For information look here and at the subsequent posts (there's a few on the next page too, it's not too long though)
    • Problems with mysql_install.phpWhen running mysql_install.php, you get the following error...
      Warning: main(./extension.inc): failed to open stream: No such file or directory in ...
      Problem: You are running the file from the wrong directory
      Fix: Make sure you are executing the sql installer from your main phpbb directory.
If your problem is not addressed here, please reply to this thread, letting me know what your problem is
Last edited by Xore on Fri Apr 30, 2004 5:31 am, edited 23 times in total.
Camels in the Mist
<noise type="random" source="camel" />
Cash Mod
Xore
Former Team Member
Posts: 2594
Joined: Wed Apr 16, 2003 7:42 pm
Location: the wastelands between insomnia and clairvoyance
Contact:

Post by Xore »

Upgrading to Cash Mod 2.2.1
  • From Points System
    1. Uninstall Points System
      this is done by reversing the the process you used to install Points System in the first place. Anything you added, remove.
      • If you want to keep the points information (you probably do) then don't remove that column from the table
      • You don't need to uninstall any shop/rpg/lottery/bank (etc) mods that use points, although, if there are parts of the Points System that got edited by these mods, you'll have to make special modifications, or ask for help. Common issues will be posted in here soon.
      • Remove everything else that came with the Points mod
    2. Install Cash Mod v 2.2.1
    3. Go to your Cash Currencies Admin Panel. Create a currency with "user_points" for the database field
  • From Cash Mod 1.1.2
    1. Uninstall Cash Mod 1.1.2
      this is done by reversing the the process you used to install Cash Mod 1.1.2 in the first place. Anything you added, remove.
      If you want to keep the points information (you probably do) then don't remove that column from the table
    2. Install Cash Mod v 2.2.1
    3. Go to your Cash Currencies Admin Panel. Create a currency with "user_cash" for the database field
    4. You should be fine now
  • From Cash Mod 2.0.0 and 2.0.2
    1. Follow the instructions listed in /upgrade_202_221/cm_upgrade_202_221.txt
      (this works for both 2.0.0 and 2.0.2)
  • From Cash Mod 2.2.0
    1. Follow the instructions listed in /upgrade_220_221/cm_upgrade_220_221.txt
Last edited by Xore on Mon May 17, 2004 4:04 pm, edited 9 times in total.
Camels in the Mist
<noise type="random" source="camel" />
Cash Mod
Xore
Former Team Member
Posts: 2594
Joined: Wed Apr 16, 2003 7:42 pm
Location: the wastelands between insomnia and clairvoyance
Contact:

Post by Xore »

Compatibility
Add-Ons
  • Add-ons
    Cash Mod is back compatible with Points System
    This means that any mods that used Points System should be able to run on Cash Mod very easily.

    How do you do this?
    From your Cash Currencies (in your admin control panel)
    Create new Currency
    Currency:
    ->Points
    Database field for currency:
    ->user_points
    Default value for currency:
    ->0


    Note If you're switching from Points System to Cash Mod, there are a few special instructions you'll need to follow, which you can find in the upgrade notes from Cash Mod Support

    Here is a list of Mods that have been successfully used with Cash Mod:
    also, some mods use another rewards system, known as the Allowance System. Similar to making things back compatible with the Poinst System, you need to make a Currency, with the database field user_money
    If you are successful in getting any other mods (that i am not aware of) that run on Points Mod or Allowance System to work with Cash Mod , please let me know, so i can add them to this list :-)

    Also, if you are a Mod author and would like your Mod added and/or removed from this list, let me know your wishes and i will do my best to accomodate you.
Suggested Mods for development (mod authors wanted)

This is a list of suggested mods that could run off of Cash Mod, which people have expressed interest in.
  • Randomize points gain
  • Games
  • Officially phpbb validated releases of shop/lottery/bank/rpg mods :mrgreen:
  • Stock exchange / currency updater, for real currency exchange values / stock exchange.
  • Active users rewards
If you are interested in making any of these, i don't mind giving a little assistance if required. I *might* be making something along the lines of a Cash Mod API to make interfacing with Cash Mod a breeze.
Last edited by Xore on Wed Apr 14, 2004 11:31 pm, edited 14 times in total.
Camels in the Mist
<noise type="random" source="camel" />
Cash Mod
Xore
Former Team Member
Posts: 2594
Joined: Wed Apr 16, 2003 7:42 pm
Location: the wastelands between insomnia and clairvoyance
Contact:

Post by Xore »

Demo Boards

(Current boards removed)
Last edited by Xore on Mon Mar 07, 2005 2:42 am, edited 10 times in total.
Camels in the Mist
<noise type="random" source="camel" />
Cash Mod
Xore
Former Team Member
Posts: 2594
Joined: Wed Apr 16, 2003 7:42 pm
Location: the wastelands between insomnia and clairvoyance
Contact:

Post by Xore »

Translations
  • French Translation, courtesy of Q-Zar (comes packaged with 2.2.0)
  • Dutch Translation, courtesy of carloclaessen (comes packaged with 2.2.0)
Last edited by Xore on Tue Nov 11, 2003 11:51 pm, edited 3 times in total.
Camels in the Mist
<noise type="random" source="camel" />
Cash Mod
Xore
Former Team Member
Posts: 2594
Joined: Wed Apr 16, 2003 7:42 pm
Location: the wastelands between insomnia and clairvoyance
Contact:

Post by Xore »

Current Version (2.2.1)
  1. Multiple Admin-configurable currencies
    • Enable yourself to create, rename, and remove as many currencies as you want
    • No longer necessary to install multiple systems just to have multiple points/cash etc, this is your one-stop solution
    • Images supported!
  2. Points System back-compatibility
    • Allows mods that run off of Points System to run off of Cash Mod with minimal (if any) work
  3. MySQL & MSSQL Installer
    • SQL installer for MySQL & MSSQL users
  4. Admin Control Panel
    • Smooth, sleek, and slightly sexy ;-)
  5. Custom Forum Options
    • Turn any or all of your currencies off or on for any of your forums on your board.
    • Easy to use Admin Control Panel makes this a snap!
  6. Donate Cash
    • Let your users donate cash to other users.
    • Send PMs with donation!
    • Also (optionally) allow moderators to edit user's cash via the profile page. Admins come with this option automatically
  7. Spam prevention
    • Worried about users spamming your board for cash? not a problem! Use the easy spam tools to determine how many posts a user can make within a given time period and be able to gain cash for them
  8. Custom Cash Settings
    • Set how many cash points a user makes per post
    • Set how many cash points a user makes per reply,
    • Set how many cash points a user makes per character
    • Bonus for each reply (Rewards for popular thread starters!)
    • Set maximum amount per post
      (or any combination thereof)
  9. Cash Groups
    • Set bonus amounts for user in different groups, ranks, and levels
  10. Quote Include/Uninclude
    • Capability to disable users from gaining points for quoted sections
  11. Enable/Disable User Debt
    • Feeling mean and want to put your users in debt? :twisted:
  12. Set all users Cash
    • With a click of a button, you can set/reset the cash amounts of all users!
  13. Currency Exchange
    • Allow users to exchange one form of currency for another, at rates that you set!
  14. Log Actions
    • Log cash-related actions that go on over your board
  15. Decimal Cash
    • Cash now comes in decimals!
  16. Plug-in Events
    • Cash Amounts for events, generated by board actions, or other mods!
  17. Cash Mod API
    • Application Program Interface, allows for much simpler dealing with Cash Mod by other mods needing or using a rewards systems
  18. Cash on PM
    • If you feel the need to encourage your users to spam... (by default, this is turned off)
  19. EasyMOD Compatible
    • Install in seconds with EasyMOD!
Allowances has been dropped from 2.2.0 feature list in favor of releasing it as a separate mod that will require PseudoCron (also in development)
The reason behind this is that i don't want to get the issues of Cash Mod and Pseudocron confused. Most of the allowances functionality will be built into 2.2.0, but will require the Allowances plug-in (running on top of PseudoCron) to work.
Last edited by Xore on Wed Nov 12, 2003 12:24 pm, edited 8 times in total.
Camels in the Mist
<noise type="random" source="camel" />
Cash Mod
Xore
Former Team Member
Posts: 2594
Joined: Wed Apr 16, 2003 7:42 pm
Location: the wastelands between insomnia and clairvoyance
Contact:

Post by Xore »

Cash Mod API
Your #1 source (unless someone beats me to it :P ) for Cash Mod API documentation!

So, Cash Mod has a couple new and big things this time around, mainly, the API, to help other programmers who want to use Cash, to interface with the Cash Mod more easily.

We'll split this up into x sections, where x is an unknown number i have yet to determine.
  1. IN_CASHMOD
  2. $cash object
  3. Bitmasks
  4. Currency Objects
  5. cash_user objects (forthcoming)
  6. CM_EVENT (forthcoming)
  7. more!
  1. IN_CASHMOD
    so, the first thing that's important, is that at the top of the file where you want to use Cash Mod API, is that you include the entry

    Code: Select all

    define('IN_CASHMOD', true);
    right below

    Code: Select all

    define('IN_PHPBB', true);
    in all the user-facing files that you wish to access the API from.
    this ensures that functions_cash.php will get loaded when your file includes common.php

    Without this, you won't have access to the Cash Mod API
  2. $cash object
    the $cash object is in the global scope, similar to the $db and $template object. Similar to those objects, it can be very powerful. What $cash does is hold the data for all the currencies currently in your database.

    There are four main functions that it has that you may find useful.
    • currency_exists(...);
    • currency(...);
    • currency_count(...);
    • currency_next(...);
    • currency_exists($cash_id)
      eg: if ( $cash->currency_exists(1) )
      returns true if there is a currency with that key defined, false otherwise
    • currency($cash_id)
      eg: $c_cur = $cash->currency(1)
      returns the currency object for the currency associated with that key
    • currency_count($mask = false, $forum_id = false)
      eg: $num_currencies = $cash->currency_count(CURRENCY_ENABLED)
      returns a count of currencies, depending on the bitmasks used. if no bitmasks are used, a count of all currencies are returned. if $forum_id is set, then only currencies that are enabled in the forum specified are counted.
    • currency_next($iterator,$mask = false, $forum_id = false)
      eg: while ( $c_cur = &$cash->currency_next($cm_i,CURRENCY_ENABLED) )
      retrieves the next currency. $mask and $forum_id are identical in usage as currency_count
  3. Bitmasks
    Cash Mod has several bitmasks defined:
    • CURRENCY_ENABLED - currency is enabled
    • CURRENCY_IMAGE - currency has an image icon
    • CURRENCY_VIEWPROFILE - currency is displayed in the profile
    • CURRENCY_VIEWTOPIC - currenct is displayed in the topic
    • CURRENCY_VIEWMEMBERLIST - currency is displayed in the memberlist
    • CURRENCY_DONATE - currency is donateable
    • CURRENCY_MODEDIT - moderators can edit this currency
    • CURRENCY_EXCHANGEABLE - currency is exchangeable
    So, to get a count of all currencies that are enabled, and exchangeable, use

    Code: Select all

    $cash->currency_count(CURRENCY_ENABLED | CURRENCY_EXCHANGEABLE);
  4. Currency Objects
    you may recall the line

    Code: Select all

    $c_cur = $cash->currency(1);
    or

    Code: Select all

    while ( $c_cur = &$cash->currency_next($cm_i,CURRENCY_ENABLED) )
    $c_cur is my standard way of referring to the 'current' currency.
    it has several useful functions.
    • id();
    • name(...);
    • db();
    • display(...);
    • mask(...);
    • forum_active();
    • id()
      eg: $cash_id = $c_cur->id();
      retreives the currency's id
    • name($supress_image = false, $quotes = false)
      eg: $display = $c_cur->name();
      gives a string output of the currency's symbol. It defaults to the currency's image (with the alt text equal to the currency's name) if it exists, otherwise it displays the currency's name. If the currency does not have an image, then it displays the name regardless.
    • db()
      eg: $db_field = $c_cur->db();
      returns the text value of the database field in the user table that the currency is associated with.
    • display($amount,$surpress_image = false, $quotes = false)
      eg: $amount = $c_cur->display($userdata['user_points']);
      formats a number to be displayed with the currency's symbol (prefix and postfix stuff is handled with this, you don't need to worry about it)
    • mask($bitmask = false, $forum_id = false)
      (eg: if ( $c_cur->mask(CURRENCY_DONATE) )
      returns true if that bit is set for the currency
    • forum_active($forum_id)
      (eg, $main_forum_on = $c_cur->forum_active(1);
      returns true if the currency is not disabled for the forum in question. Note, this can still return true if the currency itself is (as a whole) disabled.
Last edited by Xore on Thu Nov 20, 2003 4:35 am, edited 2 times in total.
Camels in the Mist
<noise type="random" source="camel" />
Cash Mod
Xore
Former Team Member
Posts: 2594
Joined: Wed Apr 16, 2003 7:42 pm
Location: the wastelands between insomnia and clairvoyance
Contact:

Post by Xore »

[nothing past this post is worth reading unless it's been posted in the past few days
- Xore (April 12, 2004) ]
Last edited by Xore on Mon Apr 12, 2004 9:45 pm, edited 2 times in total.
Camels in the Mist
<noise type="random" source="camel" />
Cash Mod
Xore
Former Team Member
Posts: 2594
Joined: Wed Apr 16, 2003 7:42 pm
Location: the wastelands between insomnia and clairvoyance
Contact:

Post by Xore »

[ content removed - Xore ]
Last edited by Xore on Mon Apr 12, 2004 9:46 pm, edited 1 time in total.
Camels in the Mist
<noise type="random" source="camel" />
Cash Mod
Xore
Former Team Member
Posts: 2594
Joined: Wed Apr 16, 2003 7:42 pm
Location: the wastelands between insomnia and clairvoyance
Contact:

Post by Xore »

[ content removed - Xore ]
Last edited by Xore on Mon Apr 12, 2004 9:46 pm, edited 1 time in total.
Camels in the Mist
<noise type="random" source="camel" />
Cash Mod
Xore
Former Team Member
Posts: 2594
Joined: Wed Apr 16, 2003 7:42 pm
Location: the wastelands between insomnia and clairvoyance
Contact:

Post by Xore »

[ content removed - Xore ]
Last edited by Xore on Mon Apr 12, 2004 9:48 pm, edited 1 time in total.
Camels in the Mist
<noise type="random" source="camel" />
Cash Mod
Xore
Former Team Member
Posts: 2594
Joined: Wed Apr 16, 2003 7:42 pm
Location: the wastelands between insomnia and clairvoyance
Contact:

Post by Xore »

[ content removed - Xore ]
Last edited by Xore on Mon Apr 12, 2004 9:49 pm, edited 1 time in total.
Camels in the Mist
<noise type="random" source="camel" />
Cash Mod
Post Reply

Return to “[2.0.x] MOD Database Releases”