Ok, fixed it.
In vbookie.php find:
PHP Code:
while ($bit = $db->fetch_array($result))
{
// ATTN: Hardcoded HTML
$system_totals_bits .= "<b>$vbphrase[total_bets]:</b> $bit[bets]<br /><b>$vbphrase[vbookie_total_staked]:</b> $bit[stake]<br /><b>$vbphrase[total_won]:</b> $bit[won]<br />";
//exec_switch_bg();
//eval('$bits .= "' . fetch_template('vbookie_view_my_bet') . '";');
}
Replace with:
PHP Code:
while ($bit = $db->fetch_array($result))
{
// ATTN: Hardcoded HTML
$amtWon = $bit[won];
$system_totals_bits .= "<b>$vbphrase[total_bets]:</b> $bit[bets]<br /><b>$vbphrase[vbookie_total_staked]:</b> $bit[stake]<br /><b>$vbphrase[total_won]:</b> $amtWon<br />";
//exec_switch_bg();
//eval('$bits .= "' . fetch_template('vbookie_view_my_bet') . '";');
}
$result = $db->query_read("SELECT SUM(item.bet_amount_placed) returnedStakes FROM " . TABLE_PREFIX . "vbookie_bets_placed AS item WHERE bet_amount_won != 0");
$newbit = $db->fetch_array($result);
// ATTN: Hardcoded HTML
$bookieProfitLoss = $amtWon - $newbit[returnedStakes];
$system_totals_bits .= "<b>Stakes returned:</b> $newbit[returnedStakes]<br /><b>Bookie profit/loss:</b> $bookieProfitLoss";
It uses hardcoded phrases, but whatever. I never understood why vBulletin puts all its phrases in a database anyway. (Anyone care to explain?)