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)

Taco John 09-09-2004 03:38 AM

Also, I've got an idea that would be cool as just a side feature...

Real books take 9.1 percent of the winnings at pay-out. It's commonly called "juice" or "vigorous." It's more or less a commission for making the bet. It would be cool if the control panel included an option to turn 'vig' on or off... and have the statistics portion track how much vig the book is making each week and each "season."

It's not as important as the push option, but it would be a cool enhancement that would actually be pretty educational.

Warlord 09-11-2004 05:52 PM

Instant hit on my forums! Thanks for the great hack!

*Clicks install!

boxingscene 09-12-2004 04:50 PM

Quote:

Originally Posted by tjdrico
vBookie

Introduction

vBookie is a 'bookmakers' or betting extension to vBulletin. It enables authorised members to post Events and Outcomes that forum members can bet on. Each Outcome has its own set of odds, and odds can be modified through the life of an Event (bets that are placed are stored with the prevailing odds, so even if the odds change, your users are paid at the correct rate).

Once the results are known, Events can be settled and forums members awarded their winnings.

vBookie uses its own vCash by default, but this has no more use than as 'bragging rights'. However, vBookie also comes with a built-in switch to allow it to use either uCash or Petz money instead. That means that all bets are paid for and settled using uCash or Petz money, making betting even more attractive than just for fun on forums with uShop/Petz installed. Although vBookie does not have any built-in facility to integrate with any other store hacks, it's a very simple job to hack vBookie itself to integrate it with any store/points system you care to use.

Features
  • master switch to turn vBookie off
  • option to use uCash
  • option to use Petz money
  • settings to restrict the creation of Events to specific user groups
  • settings to restrict which user groups can bet on Events
  • settings to restrict which user groups can edit or settle other people's Events
  • per-Event, specify whether punters may bet on more than one outcome
  • optional 'charity mode' so that the poorest members of the forum always have something to play with
  • supplied with a module for vBadvanced

Please click https://vborg.vbsupport.ru/ if you install this hack, thanks. Please also let me know - send me an email or a PM. If you'd let me know the forum URL too that'd be cool!

vBookie is free, and will remain free. However, if you would like to donate a small amount, feel free. =)

https://vborg.vbsupport.ru/external/2010/02/12.gif

Updates

1.0.0 -> 1.0.1

- adds the ability to delete Events. See this post for upgrade instructions if you already have 1.0.0

1.0.1 -> 1.0.2

Corrected a minor bug with the charity mode when using uCash. See this post for manual upgrade instructions from 1.0.1.

1.0.2 -> 1.0.3

Corrected a minor bug with the richest people display when using uCash. Just overwrite includes/functions_vbookie.php with the one from the new Zip file.

1.0.3 -> 1.0.4

Corrected some date display problems when using "Detailed" dates. For manual update instructions, see this post.

Corrected Petz bug whereby all winnings were paid to the bet's owner rather than individual winners. To upgrade from 1.03 or earlier, see this post or overwrite includes/functions.vbookie.php with the 1.0.4 version.

Problems?

-> Petz - If you are using Petz there is a bug in all versions up to and inclusing 1.0.3. Your players won't get paid their winning, and all payouts will end up in the account of the person that posted the Event. To correct this, please see this post. This fix will be incororated into 1.0.4 onwards.

-> If you can't post Events, or can't bet on them make sure you have set your user permissions

-> If you have an SQL error Invalid SQL: UPDATE SET =25 WHERE <25 make sure you are using version 1.0.3 or later.

-> If you have any other general problems, please check the installation/hack instructions and make sure you have carried out all the steps and also check that you made the changes correctly

Anything else, ask in this thread.

Other Stuff

-> If you are using Detailed Date & Time display and have a problem with Event dates appearing as '1 Minute Ago', see this post.

-> If you want to use poster 'Reputation' as the currency for vBookie, see this post.

About Odds

Odds of "5/1" are "amount won per amount placed". This means that I would win 5 for every 1 placed. Of course, if I win, I get my stake back as well. Odds of "1/5" means that I win 1 for every 5 placed. I'd have to place 25 to win just 5.

Decimal Odds

Decimal odds are just another way of displaying the same information. 2.0 is the same as 2/1. 0.2 is the same as 1/5. vBookie only lets you specify odds in terms of x/y, but if you think in terms of decimal you can still work out what odds to provide. Simply think of your decimal odds as "2.0 / 1.0" or "0.5 / 1.0" and then multiply each side through by 10 or 100 until there are only zeros to the right of the decimal point, then just take the whole number part.

2.0 / 1.0 has no decimals, so this is the same as 2/1

0.5 / 1.0 has a 0.5, so multiply both parts by 10 to get 5.0 / 10.0. Then you can specify your odds as 5 / 10. You might also realise that this is the same as 1/2. The technique is a simple way to work out any odds you may need to specify.

Odds of 0.65 -> 0.65 / 1.0 -> 65.0 / 100.0 or 65/100. Then you can divide through by 5 to get to 13 / 20, although this step isn't necessary.


_______________________________________

I installed this hack on a fresh 3.03 board, I dont have any errors BUT, I dont see anything in the template as far as givimg me an option to create a bet, nothing at all, as if the mod was never installed.

boxingscene 09-12-2004 05:33 PM

fixed

Acido 09-12-2004 06:54 PM

Quote:

Originally Posted by apokphp
Installed. Great hack. Works well on vb 3.0.3 (just took some time finding some of the code that had changed since the code has changed since 3.0.0).

However, it isn't sending pm's or emails to those who have placed bets, to notify them of the bet being settled.

The vbookie_email_betsettledbody template says:

But there are no vBookie settings for members that enable/disable email alerts. Wuttup?

I think that email feature is not working in this version :(

Curll 09-15-2004 08:55 PM

Uhm, when I try to view a forum...

Quote:

Database error in vBulletin 3.0.3:

Invalid SQL:
SELECT
IF(votenum >= 1, votenum, 0) AS votenum,
IF(votenum >= 1 AND votenum > 0, votetotal / votenum, 0) AS voteavg,
post.pagetext AS preview,
//vbookie
thread.threadid, thread.title AS threadtitle, lastpost, thread.forumid, pollid, vbookie_item_id, open, replycount, postusername, postuserid, thread.iconid AS threadiconid,
lastposter, thread.dateline, IF(views<=replycount, replycount+1, views) AS views, notes, thread.visible, sticky, votetotal, thread.attach
, NOT ISNULL(subscribethread.subscribethreadid) AS issubscribed
, NOT ISNULL(deletionlog.primaryid) AS isdeleted, deletionlog.userid AS del_userid,
deletionlog.username AS del_username, deletionlog.reason AS del_reason
FROM thread AS thread
LEFT JOIN deletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND type = 'thread')
LEFT JOIN subscribethread AS subscribethread ON(subscribethread.threadid = thread.threadid AND subscribethread.userid = 1)
LEFT JOIN post AS post ON(post.postid = thread.firstpostid)
WHERE thread.threadid IN (0)
ORDER BY sticky DESC, lastpost DESC

mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '//vbookie
thread.threadid, thread.title AS threadtitle, last

mysql error number: 1064

Date: Wednesday 15th of September 2004 04:54:50 PM
Script: http://www.xblgamers.com/vb3testing/...isplay.php?f=2
Referer: http://www.xblgamers.com/vb3testing/index.php?
Username: Curll
IP Address:
It was a fresh install of vB3.

Okiewan 09-16-2004 11:30 AM

Quote:

Originally Posted by Okiewan
searched, but can't find anything...
users needing charity aren't getting it (yes, it's on in options).
Any ideas?

Hello? Anyone?

Warlord 09-18-2004 04:32 PM

Any way to record who bet on what, and create a tally board? (Useful for football pics)

KevinSHOCK 09-23-2004 01:04 AM

ok i've searched this whole thread, and no one has had the problem i had...and ive waited many days for an answer...please can someone help me out?

problem:
Quote:

ok i dont know if this has been covered cause this thread is huge, but i use ucash, and the vbookie works and all but its using its own money system and not the ucash like i selected it to use in the vbookie control panel, help is GREATLY appreciated.
thanks to whoever helps me, i need this fixed asap.

djohn 09-23-2004 12:35 PM

How can i make it so that vBookie link in navbar is only displayed when "Is the vBookie active?" is set to yes?

Wential 09-24-2004 02:45 PM

Can this hack be set to use PayPal donations as a way of adding to their balance?

bi11i 09-24-2004 04:36 PM

Quote:

Originally Posted by Kru
The fact that nothing is being shown on vBookie.php might suggest that a required template isn't present in the database. The installer only add templates and phrases to the default style (he should if you have another style with the same id then it doesn't work for the default, too), and if you are using a style that's not based on the default you might find that the templates aren't picked up.

Try editing vbookie_install.php and changing "$styleid=$vboptions['styleid'];" (appears twice) to "$styleid=N;" where N is the styleid of your style.

(thanks to Rico for this hint)

hey thanks that was much easier than i thought it was going to be (plus it worked beautifully.)

bi11i 09-24-2004 04:37 PM

Quote:

Originally Posted by Wential
Can this hack be set to use PayPal donations as a way of adding to their balance?

wouldn't that be, uh, illegal? (lemme know if you find a way to do it:))

Wential 09-24-2004 04:42 PM

Quote:

Originally Posted by bi11i
wouldn't that be, uh, illegal? (lemme know if you find a way to do it:))

It was actually an idea as a way to only give my donating members access to this feature. Since they never get any real money back, it's not illegal. I checked :).

bi11i 09-24-2004 05:39 PM

I deleted a thread containing an event (which was created by another user.) I'm not unable to delete the event - i only have the 'Thread' and 'Info' options available to me.

Is this a defect or am I doing something wrong?

Lionel 09-26-2004 02:59 AM

I installed vbookie, but it seems that it is interfering with the private thread hack. After I setup the groups permissions, whenever I run vbookie.php the settings for the other hack switches to "no" and Vbookie settings are not updating for the groups.

Now this is a rather long install. Can someone please give me a pointer which php to look for the settings?

Lionel 09-26-2004 03:59 AM

Here is my problem. The permissions in usergroup are behaving erratic: the radio buttons do not accept updates or update the wrong ones.

ALLOW GROUP TO READ TITLES/ NOT CONTENT is the other hack name

When I remove the vbookie hack from usergroup, they are fine. Maybe it is a matter of switching lines?


// set default yes permissions (bitfields)
$ug_bitfield = array(
'showgroup' => 1, 'canview' => 1, 'canviewmembers' => 1,
'canviewothers' => 1, 'cagetattachment' => 1, 'cansearch' => 1,
'canmodifyprofile' => 1, 'canthreadrate' => 1, 'canpostattachment' => 1,
'canpostpoll' => 1, 'canvote' => 1, 'canwhosonline' => 1,

// +++ vBookie
'canpostvbookieevent' => 1, 'caneditothersvbookieevents' => 1, 'canbet' => 1,
// --- vBookie

'allowhidden' => 1, 'showeditedby' => 1, 'canseeprofilepic' => 1,
'canusesignature' => 1,
// ================================================= \\
// == [ ALLOW GROUP TO READ TITLE / NOT CONTENT - GTP BEGIN ]
'gtpcanreadcontent' => 1
// == [ 00-00-2004 - GTP END ]
// ================================================= \\

);






print_yes_no_row($vbphrase['can_rate_threads'], 'usergroup[canthreadrate]', $ug_bitfield['canthreadrate']);
// ================================================= \\
// == [ ALLOW GROUP TO READ TITLE / NOT CONTENT - GTP BEGIN ]
print_yes_no_row($vbphrase['gtp_can_read_content'], 'usergroup[gtpcanreadcontent]', $ug_bitfield['gtpcanreadcontent']);
// == [ 00-00-2004 - GTP END ]
// ================================================= \\

print_table_break();


if ($usergroupid != 1) // Guests can not post attachments
{
print_table_header($vbphrase['attachment_permissions']);
print_yes_no_row($vbphrase['can_upload_attachments'], 'usergroup[canpostattachment]', $ug_bitfield['canpostattachment']);
print_input_row($vbphrase['space_in_bytes_attachlimit'], 'usergroup[attachlimit]', $usergroup['attachlimit']);
print_table_break();
}

print_table_header($vbphrase['poll_permissions']);
print_yes_no_row($vbphrase['can_post_polls'], 'usergroup[canpostpoll]', $ug_bitfield['canpostpoll']);
print_yes_no_row($vbphrase['can_vote_on_polls'], 'usergroup[canvote]', $ug_bitfield['canvote']);
print_table_break();
// +++ vBookie
print_table_header($vbphrase['vbookie_permissions']);
print_yes_no_row($vbphrase['can_post_vbookieevents'], 'usergroup[canpostvbookieevent]', $ug_bitfield['canpostvbookieevent']);
print_yes_no_row($vbphrase['can_edit_others_vbookieevents'], 'usergroup[caneditothersvbookieevents]', $ug_bitfield['caneditothersvbookieevents']);
print_yes_no_row($vbphrase['can_bet_on_vbookieevents'], 'usergroup[canbet]', $ug_bitfield['canbet']);
print_table_break();
// --- vBookie

Lionel 09-26-2004 02:16 PM

The problem was in the bitfield. They were both using the same bitfield number. I doubled the other hack bitfield, and the permissions are holding and the other hack appears to be fine.

However, I am confused on how Vbookie works. I gave full permission to admin, and when I go to vbookie.php I do not see how to input a bet.

Warlord 09-27-2004 12:30 AM

Did you read the manual?

(Just create a new topic and check the box that reads Yes, post a vBookie Event with this thread, but try the instructions next time ;))

Warlord 09-27-2004 12:31 AM

Quote:

Originally Posted by Warlord
Any way to record who bet on what, and create a tally board? (Useful for football pics)


Anyone wanna tackle this idea?

Lionel 09-27-2004 12:38 AM

Quote:

Originally Posted by Warlord
Did you read the manual?

(Just create a new topic and check the box that reads Yes, post a vBookie Event with this thread, but try the instructions next time ;))

was there a manual? Kindly point it to me. Thanks for answering, but I realized that once I was about to post something.

Warlord 09-29-2004 12:34 AM

Quote:

Originally Posted by Lionel
was there a manual? Kindly point it to me. Thanks for answering, but I realized that once I was about to post something.


Here ya go. :)

(It's also linked to in the installation instructions file.)

The Equivocate 10-01-2004 03:16 AM

For some reason, it's still wanting to use the vBookie points instead of my uShop points. I selected the correct field in the options, but it's still not using uShop points. Any ideas?

The Equivocate 10-01-2004 07:23 PM

Anyone know how to correct this? I think it has something to do with two different databases being used, but I don't know enough about SQL or PHP to fix it. I can't use this hack until I am able to integrate it into uShop - and my site goes live on Monday.

rinkrat 10-01-2004 07:33 PM

Be sure uShop is set for uttpoints too.

The Equivocate 10-02-2004 02:16 AM

Yes, it is set to uttpoints as well...

The Equivocate 10-02-2004 06:16 PM

How can I make sure that vBookie is also set for uttpoints? Would there be any way to change or create a new table to maybe get them to point to the right place?

GamerJunk.net 10-06-2004 04:59 AM

Code:

Parse error: parse error, unexpected ';', expecting ')' in /home/nintenc/public_html/gamestar/f/includes/init.php on line 955
I keep getting that error, and once I fix one line it will screw up another.

GamerJunk.net 10-06-2004 05:03 AM

PHP Code:

// Defined contants used for forum field.
$_FORUMOPTIONS = array(
    
'active'            => 1,
    
'allowposting'      => 2,
    
'cancontainthreads' => 4,
    
'moderatenewpost'   => 8,
    
'moderatenewthread' => 16,
    
'moderateattach'    => 32,
    
'allowbbcode'       => 64,
    
'allowimages'       => 128,
    
'allowhtml'         => 256,
    
'allowsmilies'      => 512,
    
'allowicons'        => 1024,
    
'allowratings'      => 2048,
    
'countposts'        => 4096,
    
'canhavepassword'   => 8192,
    
'indexposts'        => 16384,
    
'styleoverride'     => 32768,
    
'showonforumjump'   => 65536,
    
'warnall'           => 131072,
$_VBOOKIE = array(
    
'active'        => 1,
    
'ucash'            => 2,
    
'cashon'        => 4,
    
'givetopoor'        => 8,
    
'usepetz'        => 16,
$_ARCADE = array(
    
'active'            => 1,
    
'netplay'            => 2,
    
'awardson'            => 4,
    
'quickreg'            => 8,
    
'autoprune'            => 16,
    
'highonly'            => 32,
    
'vbcodeon'            => 64,
    
'imgcodeon'            => 128,
    
'smilieson'            => 256,
    
'allowemail'        => 512,
    
'challengescores'        => 1024,
$_ARCADEUSER = array(
    
'firstvisit'        => 1,
    
'settingschecked'    => 2,
    
'allowchallenges'    => 4,
    
'allowemails'        => 8,
$_GAMESCHECK = array(
    
'active'            => 1,
    
'netplay'            => 2,
    
'playpanel'            => 4,
    
'challenabled'        => 8,
    
'showaward'            => 16,

); 

); is on line 953 so I don't know what to do?

GamerJunk.net 10-06-2004 05:19 AM

[php]// Defined contants used for forum field.
$_FORUMOPTIONS = array(
'active' => 1,
'allowposting' => 2,
'cancontainthreads' => 4,
'moderatenewpost' => 8,
'moderatenewthread' => 16,
'moderateattach' => 32,
'allowbbcode' => 64,
'allowimages' => 128,
'allowhtml' => 256,
'allowsmilies' => 512,
'allowicons' => 1024,
'allowratings' => 2048,
'countposts' => 4096,
'canhavepassword' => 8192,
'indexposts' => 16384,
'styleoverride' => 32768,
'showonforumjump' => 65536,
'warnall' => 131072,
// +++ vBookie
$_VBOOKIE = array(
'active' => 1,
'ucash' => 2,
'cashon' => 4,
'givetopoor' => 8,
'usepetz' => 16
);
// --- vBookie
);
$_ARCADE = array(
'active' => 1,
'netplay' => 2,
'awardson' => 4,
'quickreg' => 8,
'autoprune' => 16,
'highonly' => 32,
'vbcodeon' => 64,
'imgcodeon' => 128,
'smilieson' => 256,
'allowemail' => 512,
'challengescores' => 1024
);

$_ARCADEUSER = array(
'firstvisit' => 1,
'settingschecked' => 2,
'allowchallenges' => 4,
'allowemails' => 8
);

$_GAMESCHECK = array(
'active' => 1,
'netplay' => 2,
'playpanel' => 4,
'challenabled' => 8,
'showaward' => 16
);[/php ok back to the original way it was when I did the hack....before I tried to fix it

GamerJunk.net 10-06-2004 05:23 AM

Nevermind I fixed it.

The Equivocate 10-06-2004 08:45 PM

So no one knows why vBookie is using its own cash even though I have uCash selected?

Neal-UK 10-07-2004 05:24 AM

Installed this hack and it's great. Just one problem, there's a typo in the phrase:

Quote:

vbookie_allow_multiple_bets_desc

Select this box if you want to allow people to vote more than once on this Event. If you leaev this box unselected, people will not be able to bet for more than one Outcome, nor for the same Outcome more than once.


Changed it on mine, just thought i'd mention it although i'm sure it's mentioned here somewhere!

bi11i 10-07-2004 03:34 PM

there's actually quite a few typo's in the mod. (and some grammer, too.) a small price to pay for such a cool mod.

Quote:

So no one knows why vBookie is using its own cash even though I have uCash selected?
uh, because you don't have it installed?

snoman 10-07-2004 08:26 PM

Problem...But It Has Seemed To Be Fixed Before...I Have Everything Uploaded And Installed, But, I Cant Get It To Work, Im Using VBulletin 3.0.3 And VBookie Is The Only Mod Im Using, I Double-Checked Everything In The Instructions, And Everything Seems Fine, I Cant Post A Event, I Click New Thread, But Theres No Option For VBookie, And I Checked The User Permissions And VBookie Is Turned On, Any Suggestions?

bi11i 10-08-2004 12:01 AM

no option at the bottom of the new thread? you sure you made the appropriate edits to your templates? you using the edited templates? you on as an admin to test?

more info... more info....

snoman 10-08-2004 02:12 AM

yeah, im admin...no option...im sure i made all appropriate changes...but will go through again...

bi11i 10-08-2004 04:25 PM

it looks like your templates are messed up (from what little i know.) i would go ahead and revert the view back to normal and then make the changes again (assuming other changed haven't been made to these templates prior to the vbookie hack....)

i'm the champion at installing mods and having to do them over several times to get them to work, because i didn't cut and paste correctly, or i overlooked something....

EvilLS1 10-09-2004 04:31 AM

Very cool hack! Thank you.

The Equivocate 10-10-2004 04:56 PM

Quote:

Originally Posted by bi11i
there's actually quite a few typo's in the mod. (and some grammer, too.) a small price to pay for such a cool mod.

uh, because you don't have it installed?

Why do you assume I don't have it installed? I've already stated the problem -posters earn uCash for posting as normal, but when I tell vBookie to use uCash instead of its own cash, it still uses its own cash for betting - so I have two different currencies going on, when all I want is to use UCash for both.


All times are GMT. The time now is 12:10 AM.

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.01927 seconds
  • Memory Usage 1,888KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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