Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
vBookie for vBulletin 3.5 Details »»
vBookie for vBulletin 3.5
Version: 1.0.7, by Andreas Andreas is offline
Developer Last Online: Jan 2023 Show Printable Version Email this Page

Version: 3.5.3 Rating:
Released: 08-11-2005 Last Update: 02-17-2006 Installs: 633
DB Changes Uses Plugins Template Edits
Additional Files Is in Beta Stage  
No support by the author.

vBookie

Introduction

This is a Port of the original vBookie Hack created by tdjrico; full credits to him for the idea and the kind permission to port his work

A t t e n t i o n
This Hack is unsopported and incompatible with vBulletin 3.6+
You are hereby advised to not use it.
Please do not ask me about support and/or updates - there will be none.

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #772  
Old 04-03-2006, 07:12 PM
innersanctum innersanctum is offline
 
Join Date: Jul 2004
Location: Tiskilwa, IL
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I figured it out. I had to import the vBookie integratration plugin that was included with vBux/vbPlaza.

EDIT: I spoke too soon. Even after I get everthing enabled, the newthread template still doesn't display the vBookie event option.

EDIT PART 2: Stupid forum permissions. *LOL*
Reply With Quote
  #773  
Old 04-03-2006, 09:30 PM
gwhooooey gwhooooey is offline
 
Join Date: Feb 2003
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by innersanctum
I figured it out. I had to import the vBookie integratration plugin that was included with vBux/vbPlaza.
How do you do that?.. I had a look but.. couldn't figure it out. :cross-eyed:
Reply With Quote
  #774  
Old 04-05-2006, 09:21 AM
ForeverForums ForeverForums is offline
 
Join Date: Aug 2005
Location: Indianapolis, IN
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

To integrate this with vBookie:

1) Goto vBookie Options in the Admin CP. Select Custom for the Cash/Points System.

2) Import the PLUGIN --> plugin-vbookievbplaza.xml
Reply With Quote
  #775  
Old 04-05-2006, 01:28 PM
Devadam Devadam is offline
 
Join Date: Nov 2005
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

how can we limit the stakes on the betting ?
Reply With Quote
  #776  
Old 04-05-2006, 03:59 PM
Railen Railen is offline
 
Join Date: Jan 2006
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Devadam
how can we limit the stakes on the betting ?
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.
Reply With Quote
  #777  
Old 04-05-2006, 04:25 PM
Railen Railen is offline
 
Join Date: Jan 2006
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Something that would be nice...

vBarcade adds a trophy icon next to your name in the postbit if you have a high score in one of the games. It'd be nice to have a dollarsign or something similar to signify the richest person (or 2, 3). Richest person gets 3 dollar signs, 2nd richest gets 2, 3rd richest gets 1.

Now, I'm great with PHP, but you can't just insert PHP into vBulletin and have it work. It refers to $post and $show variables, etc, which are defined in places I'm not completely sure. While it might make great sense, it only succeeds in making people new to making changes to plugins, and the vBulletin system in general, confused. For example, what I did above will be overwritten once an upgrade is done. While it's easy enough to add back in, the obvious way to fix this would be adding to the plugin itself.

While I'm sure I'm not the only person who wants a postbit icon, the rate at which changes are made makes me think they won't get done if I don't do them myself. Does anyone have experience in making a change like this? If so, could you give me a quick rundown of what would be needed to implement this change?

If the author would share what is needed, I'd be fully willing to work on getting this done, and possibly work on a vBa CMPS module as well. I just need a bit of direction here. I can then share my changes with the author, who could wrap it into his plugin. Win/win for everyone....

Thanks.
Reply With Quote
  #778  
Old 04-06-2006, 02:15 AM
mclark2112's Avatar
mclark2112 mclark2112 is offline
 
Join Date: Sep 2002
Location: Eastern USA
Posts: 90
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Something is wrong with this. The odds are very screwed up. I set up an event with 19 outcomes. I had to edit the event a couple of times... Never changing the outcomes or the odds, but the system has re orddered the outcomes, and when looking at the bets placed, some people have different odds for the same outcome, but I never changed the odds...

http://www.champcarfanatics.com/foru...ad.php?t=33178
Reply With Quote
  #779  
Old 04-07-2006, 02:48 PM
Railen Railen is offline
 
Join Date: Jan 2006
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm absolutely certain that the following is misleading:
Total Bets: 282
Total Staked: 19287
Total Won: 9499

This makes it look like the bookie has made nearly 10k off users.

I'm looking at the SQL queries and I'm certain that total bets and total staked are correct. However, the total won does not show RETURNED STAKES.

If there's 1 event with 1 bet, odds 1/1 and I win on a $100 bet, the stats should show:
Total Bets: 1
Total Staked: 100
Total Won: 200

However, they DON'T. They would actually show:
Total Bets: 1
Total Staked: 100
Total Won: 100

This makes it look like the bookie has broken even, when the bookie is really down $100.
I'm working on new SQL query to fix this.
Reply With Quote
  #780  
Old 04-07-2006, 03:01 PM
Railen Railen is offline
 
Join Date: Jan 2006
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?)
Reply With Quote
  #781  
Old 04-07-2006, 10:04 PM
psybernaut psybernaut is offline
 
Join Date: Sep 2005
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Railen
It uses hardcoded phrases, but whatever. I never understood why vBulletin puts all its phrases in a database anyway. (Anyone care to explain?)
Isn't it to make it independent of language, and to make it easier for people to modify phrases if they don't have easy access to the server the site is hosted on?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:29 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08038 seconds
  • Memory Usage 2,350KB
  • Queries Executed 28 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (5)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete