
02-25-2008, 10:55 PM
|
|
|
Join Date: Feb 2008
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
I have vbookie up working fine with vbbux and wanted to set a max bet, I searched this
entire thread and found this thread, I have done the editing in the vbookie.php as described
and I dont know where to add the rest at and in which fromat to add it.
It works now but if you go over the limit which is 10,000 then it gives an error
Could not find phrase 'vbookie_exceeded_max_bet'.
I know that because the bottom part isnt added but I would like to know where to put that
and the format to put it in, thank you in advance
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.
|
|