vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   vBookie - vBulletin Betting Hack (https://vborg.vbsupport.ru/showthread.php?t=65844)

Pro 06-09-2004 11:22 PM

nvm... my bad - i found it on your website.

GREAT SYSTEM! THANKS! I'LL TRY TO DONATE SOON! :)

limey 06-10-2004 04:44 AM

Cool hack tjdrico! One of the best. Will install when I can.

nydk 06-10-2004 06:24 AM

Quote:

Originally Posted by limey
Cool hack tjdrico! One of the best. Will install when I can.

I had some problems, but I worked through it... but now I was wondering this:

- Richest Members in vBookie Stats only shows my richest uShop/uCash members, except the 2 richest. The two richest have like $13.xx and $17.xx, and 3rd richest has $7.xx ... the list in vBookie starts at the $7.xx person. (If that made any sense)

- Also, when I click the option to add an event with the thread, I don't get taken to a "Post a vBookie Event" page... any ideas... ? I did set my usergroup to be able to add events

tjdrico 06-10-2004 06:34 AM

Quote:

Originally Posted by nydk
I had some problems, but I worked through it... but now I was wondering this:

- Richest Members in vBookie Stats only shows my richest uShop/uCash members, except the 2 richest. The two richest have like $13.xx and $17.xx, and 3rd richest has $7.xx ... the list in vBookie starts at the $7.xx person. (If that made any sense)

- Also, when I click the option to add an event with the thread, I don't get taken to a "Post a vBookie Event" page... any ideas... ? I did set my usergroup to be able to add events

Regarding the first, which version of the installation file did you have? Is it version 1.0.3? Check the 'includes/functions_vbookie.php' file, and the 'function vbookie_get_richest()' function. You should see this code:

PHP Code:

    if ($vbookiesettings['ucash'] == 1)
    {
        
$q "SELECT u.username, (p.".$vboptions['uttpoints_pointsfield']."+0) AS cash FROM " TABLE_PREFIX $vboptions['uttpoints_pointtable']." AS p LEFT JOIN " TABLE_PREFIX "user AS u ON u.userid=p.userid ORDER BY cash DESC LIMIT 5";    
    } 

The main point here is that there is a "+0" on the uttpoints_pointsfield column, as this forces it to be an integer rather than a string.

The second suggests that you didn't make all the changes correctly, or missed one all together. One suspect would be this one in 'newthread.php':

FIND
PHP Code:

if ($newpost['postpoll']) 
        { 
            
$url "poll.php?$session[sessionurl]t=$newpost[threadid]&polloptions=$newpost[polloptions]"
        } 

AFTER, ADD
PHP Code:

// +++ vBookie 
        
else if ($newpost['postvbookieevent']) 
        { 
            
$url "vbookie.php?$session[sessionurl]t=$newpost[threadid]&vbookieeventoptions=$newpost[vbookieeventoptions]&do=newevent"
        } 
        
// --- vBookie 

The change above is what specifies the page you are directed to after submitting a new thread. Double check all the changes prescribed in the installation instructions.

nydk 06-10-2004 06:43 AM

Thanks for the quick reply...

- Regarding the first issue(how my Store uses decimals), is there a way to fix this? Or do you suggest changing my point system over to integers?? I liked the idea of dollars and cents

- New Event... well everything seems correct... I'm gonna try to double check...

ahhhh... found it :nervous:

PHP Code:

FIND
$newpost
['polloptions'] = intval($_POST['polloptions']); 

AFTERADD
// +++ vBookie 
    
$newpost['postvbookieevent'] = $_POST['postvbookieevent']; 
    
$newpost['vbookieeventoptions'] = intval($_POST['vbookieeventoptions']); 
// --- vBookie 

That's what I forgot ... thanks again for your help

*clicked install*

tjdrico 06-10-2004 07:24 AM

Quote:

Originally Posted by nydk
Thanks for the quick reply...

- Regarding the first issue(how my Store uses decimals), is there a way to fix this? Or do you suggest changing my point system over to integers?? I liked the idea of dollars and cents

Well, actually, the "+0" should just convert it to a number, not strictly an integer. The problem with the ordering was that the uttpoints field is a VARCHAR, so "ORDER BY" uses dictionary ordering. In dictionary ordering "8.5" comes after "700", so the numbers come out wrong. The "+0" forces them to be viewed as numbers, so "8.5" comes before "700".

I don't know why it uses a char field rather than a decimal or int for a numeric amount, but it seems to work OK and the +0 on my SELECT should fix it if it's not present in your copy of the file.

deathemperor 06-10-2004 09:58 AM

tjdrico, this is a great hack and how about: don't the money the users lost goes thrash, there should be an account like 'bet master' to keep all of the money users have lost and pay how much they won. and you should make it like: in ACP admin can have the option that if he wants the money goes to someone and if yes enter the user id of that person.
hope it gives more fun ^^

Okiewan 06-10-2004 12:46 PM

Silly question I'm sure, but how would one settle an event?
Is there not an option shown to do so until the end date/time has passed?

tjdrico 06-10-2004 12:53 PM

No, the "Settle" option is only shown once the "This event will pay out after" date has been reached. If you want to settle a bet before that time, edit it and change the date. Presumably, however, one wouldn't settle an event until the result is known, so it makes sense to set the "This event will pay out after " to that time in the first place. It defaults to being the same as the "accept bets until" date/time, which should be before the result is known. ;)

Okiewan 06-10-2004 01:22 PM

Excellent hack. HOTM level stuff!


All times are GMT. The time now is 10:18 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01564 seconds
  • Memory Usage 1,759KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete