It's 2020 and counting coins is outdated. Subtracting and adding to your card count is tedious and we know that you guys hate it. We've changed the way that we give you currency to make things a little easier, and this is just a quick mod to help you display your currency from a category.

For your mods.php file

function show_currency( $tcg, $category ) {

    $database = new Database;
    $sanitize = new Sanitize;
    $tcg = $sanitize->for_db($tcg);
    $category = $sanitize->for_db($category);
    $altname = strtolower(str_replace(' ','',$tcg));

    $tcginfo = $database->get_assoc("SELECT * FROM `tcgs` WHERE `name`='$tcg' LIMIT 1");
    $tcgid = $tcginfo['id'];
    $cardsurl = $tcginfo['cardsurl'];
    $format = $tcginfo['format'];

    $cards = $database->get_assoc("SELECT `cards`, `format` FROM `cards` WHERE `tcg`='$tcgid' AND `category`='$category' LIMIT 1");

    if ( $cards['cards'] === '' ) { $cards['cards'] = []; }

    $cards = explode(',',$cards['cards']);
    $cards = array_map(trim, $cards);

    $gold_count = 0;
    $gem_count = 0;

    foreach($cards as $currency){
        if($currency == 'gold'){
        elseif($currency == 'gem'){

    echo '<img src="<>"> x '.$gold_count.'<br>';
    echo '<img src="<>"> x '.$gem_count.'<br>';


Create an eTCG category

For the purpose of this, I've created a category called 'currency' (but you can call it anything you'd like), and I've put a couple of currency into it.

Display it on your page

<?php show_currency('idolise', 'currency'); ?>