Mint
A MyBB extension that establishes a platform for virtual currency and inventory items held by users.
Dependencies
- MyBB 1.8.x
- https://github.com/frostschutz/MyBB-PluginLibrary
- PHP >= 7.1
Currency
The Currency platform allows units to enter and exit the circulation by applying user-specific Balance Operations with delta values assigned to traceable Termination Points designating functional origin or destination of currency units.
Manual Balance Transfers allow users to transfer currency units — using public and private transfers — between accounts with attached messages.
Transfer form fields can be pre-filled using GET parameters:
misc.php?action=economy_balance_transfer&user_name=aloeblacc&amount=1¬e=for+your+story
The plugin's Content Entity Rewards handling allows modules to grant, void, and trace rewards for Entities of specified Content Types.
Selected user groups are able to mint and burn amounts assigned to individual accounts, inserting and removing currency from circulation, respectively.
Items
The Items platform handles Item Types assigned to Categories, providing blueprints for invididual user-owned Items. Inventory Types and size bonuses allow to specify how many slots are available to hold Items.
Selected user groups are able to forge amounts of an Item Type to be assigned to individual accounts, inserting it into the economy.
Item Actions allow developers to create custom scripts to be executed upon request by item owners.
Manual Item Transactions allow users to exchange currency units and items. Individual Transactions can be represented in MyCode-enabled content using [item_transaction=ID] tags.
Widgets & Variables
Global
{$mintBalance}- formatted balance of the currently logged in user; empty if guest (global_starthook){$mintInventoryStatus}- number of occupied slots in inventory of the currently logged in user; empty if guest (global_starthook)
User Profiles
{$mintContextUserBalance}- formatted balance of the user (member_profile_endhook){$mintContextUserInventoryStatus}- number of occupied slots in inventory of the user (member_profile_endhook){$mintRecentBalanceOperations}- recent Balance Operations widget on user profiles (member_profile_endhook){$mintInventoryPreview}- Inventory preview widget on user profiles (member_profile_endhook)
Postbit
{$post['mintBalance']}- formatted balance of the author (postbit,postbit_prev,postbit_pm,postbit_announcementhooks){$post['mintInventoryStatus']}- number of occupied slots in inventory of the author (postbit,postbit_prev,postbit_pm,postbit_announcementhooks)
Hooks
mint_activatemint_deactivatemint_admin_config_mint_tabsmint_admin_config_mint_beginmint_admin_tools_mint_logs_tabsmint_admin_tools_mint_logs_beginmint_misc_pagesmint_economy_hub_balance_service_linksmint_economy_hub_items_service_linksmint_get_user_reward_multiplier
Plugin Management Events
- Install:
- Database structure created/altered
- Cache entries created
- Tasks registered
- Uninstall:
- Database structure & data deleted/restored
- Settings deleted
- Cache entries removed
- Tasks removed
- Activate:
- Modules detected
- Settings populated/updated
- Templates & stylesheets inserted/altered
- Deactivate:
- Templates & stylesheets removed/restored
Development Mode
The plugin can operate in development mode, where plugin templates are being fetched directly from the templates/ directory - set mint\DEVELOPMENT_MODE to true in inc/plugins/mint.php.