
10-27-2006, 10:58 PM
|
|
|
Join Date: Oct 2003
Location: British Columbia, Canada
Posts: 798
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
Quote:
Originally Posted by Railen
Open vbookie.php.
Find:
PHP Code:
foreach ($vbulletin->GPC['option'] AS $option_id => $stake) { if ($stake > 0) { $db->query_write("INSERT INTO " . TABLE_PREFIX . "vbookie_bets_placed (option_id, item_id, userid, bet_amount_placed, bet_odds_against, bet_odds_for, bet_private) VALUES ($option_id, $item_id, " . $vbulletin->userinfo['userid'] . ", $stake, " . $odds_against["$option_id"] . ", " . $odds_for["$option_id"] . ", '$private')"); $db->query_write("UPDATE " . TABLE_PREFIX . "vbookie_item_options SET option_n_bets_placed=option_n_bets_placed+1, option_amount_staked=option_amount_staked+$stake WHERE option_id=$option_id"); } }
Replace with:
PHP Code:
foreach ($vbulletin->GPC['option'] AS $option_id => $stake) { if ($stake > 0) { if ($stake > 100){ eval(standard_error(fetch_error('vbookie_exceeded_max_bet'))); } $db->query_write("INSERT INTO " . TABLE_PREFIX . "vbookie_bets_placed (option_id, item_id, userid, bet_amount_placed, bet_odds_against, bet_odds_for, bet_private) VALUES ($option_id, $item_id, " . $vbulletin->userinfo['userid'] . ", $stake, " . $odds_against["$option_id"] . ", " . $odds_for["$option_id"] . ", '$private')"); $db->query_write("UPDATE " . TABLE_PREFIX . "vbookie_item_options SET option_n_bets_placed=option_n_bets_placed+1, option_amount_staked=option_amount_staked+$stake WHERE option_id=$option_id"); } }
Open your vBulletin database and look at the phrase table.
Find the largest phraseid, then create a new row with a phraseID that's one larger than the largest one so far. The other values are as follows:
languageid : -1
varname : vbookie_exceeded_max_bet
text : You have exceeded the maximum amount of $100 per bet.
phrasetypeid : 1000
product : bookiehack
Obviously, change the $100 max to whatever you want your max to be.
|
Okay trying this as posted but when someone makes a bet larger than $100 we get this showing:
Could not find phrase 'vbookie_exceeded_max_bet'.
|