I wanted to have one balance-ometer to every active currency, since I have more than one. If the player doesn't have any transaction with a currency, it displays nothing.

I just had to add these lines to mc_display.module lines 58 and 258. Perhaps this is also useful for anyone else.

// this foreach displays balance-o-meter for every active currency that the user has more or less than 0
	  $currencies = currencies_load();
		 foreach ($currencies as $cid){
			$balances = mc_balances($account, $cid->nid);
			if ($balances['cleared_balance'] != 0){
				$balance_currencies .= show_balance_ometer($account, $cid->nid);
			}
		 }
      return array(
        'subject' => t("@user's credit", array('@user' => strip_tags(theme('username', $account)))),
        //'content' => show_balance_ometer($account, array_pop($edit['cids']))
						
		'content' => $balance_currencies

Comments

matslats’s picture

Status: Active » Closed (fixed)

thanks, yes multiple currencies isn't very well supported in 6
You are advised to upgrade to d7 now!