vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   vBookie for vBulletin 3.5 (https://vborg.vbsupport.ru/showthread.php?t=94128)

Steve The Plank 03-05-2006 10:49 AM

Quote:

Originally Posted by Zowners
i have a small problem :(. I just installed it, BUT when i got to USERGROUP --> USERGROUP MANAGER, and i try to change the vBookie permissions, it always resets itself to everything "no." so even if i check something as yes, when i click "ok" and then return again to that page, it will still be no

ANYONE KNOW WHATS HAPPENING?

That happened to me until I uploaded the XML stuff again.

Can someone help with my problem, two posts up?

Oddjob 03-05-2006 03:20 PM

Quote:

Originally Posted by Oddjob
I have a problem.

My bookie is not allowing people to bet, one a staff member and the other a regular member with no permissions and no other usergroup.

I made a test account and it allowed me to bet.

I dont know whats wrong, all of my settings appear correct.


still looking for help on this........

bamaster 03-05-2006 05:35 PM

For some reason... and I'm sorry for asking a simple question... but I am unable to locate where to PAY OUT the event.

Please advise.

ON EDIT:
Nevermind. I had the "Accept Bets Until" time set in the future. Once I changed it to a time in the past, it shows up.

:goober:

Hornstar 03-05-2006 05:43 PM

Do most people allow members to post events or would you keep that more for the staff to do?

And what are the most common things to bet on apart from sport?

Gunshot 03-05-2006 08:30 PM

Quote:

Originally Posted by sickstrings
I think I got it, but try at your own risk.

Part 1
AdminCP --> Languages & Phrases --> Phrase Manager --> Add New Phrase

Product: vBookie
Varname: vbookie_max_bet_exceeded
Text: Whoops! Looks like you bet more than 100 bucks. Try again but make sure you bet no more than 100 bucks.

Part 2
In vbookie.php

Find this
PHP Code:

    if ($total_stake vbookie_get_user_cash())
    {
        eval(
standard_error(fetch_error('vbookie_not_enough_cash')));
    } 

After the above, add the following
PHP Code:

    if ($total_stake 100)
    {
        eval(
standard_error(fetch_error('vbookie_max_bet_exceeded')));
    } 

Save vbookie.php

That should do it!


this works really well

just make sure you add it to "Front-end error messages"

VBUsers 03-06-2006 12:19 AM

i have a vbookie event that is no longer going but shows open

Wild Card
Thread | Info FOOTBALL OPEN 01-01-2006 01-07-2006 01-07-2006

i cant click the thread or info. how do i delete it?

Oddjob 03-06-2006 02:33 AM

still seeking help.........

NoRespect 03-06-2006 07:39 AM

Quote:

Originally Posted by Acido
contribution:

for those who wish to limit the maxi bet amount per item:

in vbookie.php search for:

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");
}


And change it for this code:

PHP Code:

 foreach ($vbulletin->GPC['option'] AS $option_id => $stake)
{
if (
$stake 0)
{
if (
$stake 10000)
{
$stake 10000;
}
$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");
}


Where you can change 10000 for desired value for max bet amount :)

That doesn't work right. Because if someone bets 10000 it changes their bet to 5000, and takes the rest of their money. :(

Oddjob 03-06-2006 03:15 PM

Quote:

Originally Posted by Oddjob
I have a problem.

My bookie is not allowing people to bet, one a staff member and the other a regular member with no permissions and no other usergroup.

I made a test account and it allowed me to bet.

I dont know whats wrong, all of my settings appear correct.


need some help dealing with this.....

DS MrSinister 03-06-2006 03:42 PM

Ok oddjob i just figure it out..

what you need to do is goto

Admincp --> Forums & Moderators --> Forum Permissions --> check each forum & usergroup which you aloud to hve betting in..

Oddjob 03-06-2006 04:38 PM

Quote:

Originally Posted by DS MrSinister
Ok oddjob i just figure it out..

what you need to do is goto

Admincp --> Forums & Moderators --> Forum Permissions --> check each forum & usergroup which you aloud to hve betting in..


I have all that setup correctly.

Its just letting some people bet and some not bet.

DS MrSinister 03-06-2006 04:51 PM

is it from the same usergroup that people are not aloud to bet or its a random?

if its a random thing maybe tell them to delete the cookie from your site..

Oddjob 03-06-2006 04:52 PM

Quote:

Originally Posted by DS MrSinister
is it from the same usergroup that people are not aloud to bet or its a random?

if its a random thing maybe tell them to delete the cookie from your site..


I know of 6 members that cannot place bets, all from different usergroups. Admin, a usergroup named 'site staff' and the registered member group.

DS MrSinister 03-06-2006 05:04 PM

I just register on your site.. And i cant.. try this should do the trick.

Login your admincp..

Admincp --> Forums & Moderators --> Forum Permissions --> Betting Forum

I see you have 2 sub forums..

Check each group Permissions.. vBookie Event Permissions and see if rthe right options are check.

this is what i had to do to fix my problem...

Oddjob 03-06-2006 05:49 PM

Quote:

Originally Posted by DS MrSinister
I just register on your site.. And i cant.. try this should do the trick.

Login your admincp..

Admincp --> Forums & Moderators --> Forum Permissions --> Betting Forum

I see you have 2 sub forums..

Check each group Permissions.. vBookie Event Permissions and see if rthe right options are check.

this is what i had to do to fix my problem...

Nope...all my forum permissions are set correctly for every forum.....

DraculaVN 03-07-2006 03:01 AM

How point of ucash 2.0 use in vbookies ?

Oddjob 03-07-2006 03:14 AM

ok i uninstalled then re-installed.....it now appears to be working, new problem though....

i have it set to use ebux but its not showing up my point totals when i try to bet, it only started me out with 500. :ermm:

Oddjob 03-07-2006 03:38 PM

Quote:

Originally Posted by Oddjob
ok i uninstalled then re-installed.....it now appears to be working, new problem though....

i have it set to use ebux but its not showing up my point totals when i try to bet, it only started me out with 500. :ermm:


any help??????????

Krali 03-08-2006 10:18 AM

Is it able to use this at first without any cash oder ebux and so on?

Only for users to vote for events, like winners oder 1,2,3 of a formula 1 event?

Nice greetings,

Klaus

Tracer Gun Kata 03-08-2006 12:47 PM

Anyone managed to create a CMPS Module for vBookie which outputs the latest statistics?

VBUsers 03-10-2006 01:51 AM

Quote:

Originally Posted by lowandloudinc
i have a vbookie event that is no longer going but shows open

Wild Card
Thread | Info FOOTBALL OPEN 01-01-2006 01-07-2006 01-07-2006

i cant click the thread or info. how do i delete it?

any one know how i can remove this?

xjussix 03-10-2006 01:54 PM

I'm having the same problem as Oddjob's having. I upgraded to 1.0.7 because I needed the eBux support but now I can't bet on any events. I uninstalled, reinstalled, rebuilt bitflags but it still says "You may not bet on this event".

Edit: When I choose vCash from the vBookie settings, I can bet on events but as soon as I change it to eBux, I can't.

psybernaut 03-10-2006 07:42 PM

Quote:

Originally Posted by xjussix
I'm having the same problem as Oddjob's having. I upgraded to 1.0.7 because I needed the eBux support but now I can't bet on any events. I uninstalled, reinstalled, rebuilt bitflags but it still says "You may not bet on this event".

Edit: When I choose vCash from the vBookie settings, I can bet on events but as soon as I change it to eBux, I can't.

If you're running the latest eBux mod (now called vbbux/vbplaza) you need to install the vbookie hooks that come with it, and change your vbookie setting to use the custom cash type.

Oddjob 03-10-2006 08:15 PM

Quote:

Originally Posted by xjussix
I'm having the same problem as Oddjob's having. I upgraded to 1.0.7 because I needed the eBux support but now I can't bet on any events. I uninstalled, reinstalled, rebuilt bitflags but it still says "You may not bet on this event".

Edit: When I choose vCash from the vBookie settings, I can bet on events but as soon as I change it to eBux, I can't.

My problem was solved by uninstalling then reinstalling............

Stone Cold 3:16 03-11-2006 01:23 AM

I edited the tempeleatses, but i still dont have a option to post a vbookie? Im on 3.5.4

VerkroostJ 03-12-2006 08:07 AM

Hello,

Is there a way to reset everyones vcash balance to 500, without having to reinstall the whole mod?

Cheers.

MorrisMcD 03-12-2006 01:32 PM

My vbookie events are defaulting to western time zone when I need them to default to something else... eastern....

My board is set to eastern.. Is there something in vbookie hardcoding it to default to western???

Bluestrike2 03-13-2006 11:18 PM

Andreas,

On my board for some awful reason whenever I check all three boxes for my admins, it resets it when I update the settings.

Thus I am unable to post. I've searched the thread, and haven't noticed anything similar. Do you have any ideas?

Railen 03-14-2006 02:32 PM

Quote:

Originally Posted by Bluestrike2
Andreas,

On my board for some awful reason whenever I check all three boxes for my admins, it resets it when I update the settings.

Thus I am unable to post. I've searched the thread, and haven't noticed anything similar. Do you have any ideas?

https://vborg.vbsupport.ru/showthread.php?t=109293

Found using a search for:
vbookie permissions

BeaLzeBuB 03-14-2006 03:35 PM

i did the installation as written in readme, but i can't find the settings shown in the screenshots. when i change vBookie settings to "yes" under the usergroup permissions, i cant save these. when i rechechk, they're shown as "no".

also is there a tutorial about how to use vbookie?

Railen 03-14-2006 04:44 PM

Quote:

Originally Posted by BeaLzeBuB
when i change vBookie settings to "yes" under the usergroup permissions, i cant save these. when i rechechk, they're shown as "no".

I can't believe this question. I answered it in the post IMMEDIATELY before yours.

Adam21 03-16-2006 01:12 AM

It would be great if someone could figure this out...

Can the winnings or losses from each event posted be deducted or added acordingly to the event outome,from the member's vCash who posted that event.anyone???;)

psybernaut 03-16-2006 02:19 AM

Quote:

Originally Posted by geo1
It would be great if someone could figure this out...

Can the winnings or losses from each event posted be deducted or added acordingly to the event outome,from the member's vCash who posted that event.anyone???;)

I modified vbookie to do this with vbBux, it should be fairly easy to do the same thing for vCash. I haven't posted the code because it's a bit of a hack and I was hoping Andreas would add it as a feature for the next update. But he hasn't posted here for ages... does anyone know if he's still supporting this mod?

Anyway, if you're happy to modify php files I can post the code for you.

Adam21 03-16-2006 03:22 AM

Quote:

Originally Posted by psybernaut
I modified vbookie to do this with vbBux, it should be fairly easy to do the same thing for vCash. I haven't posted the code because it's a bit of a hack and I was hoping Andreas would add it as a feature for the next update. But he hasn't posted here for ages... does anyone know if he's still supporting this mod?

Anyway, if you're happy to modify php files I can post the code for you.


great!please do share that piece of of code.thanks alot!:banana:

EasyTarget 03-16-2006 03:29 AM

Quote:

Originally Posted by psybernaut
does anyone know if he's still supporting this mod?

according the the information at the top of the page this hack isn't supported, so I'd guess that's a no.

psybernaut 03-16-2006 07:09 AM

Here's the mod to make money bet on vbookie events go to the bookie, and to have any winnings paid out from the bookies money. If the bookie can't afford to pay the winnings, their cash is set to zero. If you're using vbbux, money will be taken from the bank if possible.

Backup your files before making these changes! I've only tested this on my own site (3.5.4), so proceed with caution!

First, open includes/functions_vbookie.php and find:
Code:

?>
Above, add:
Code:

// psybernaut mod
function vbookie_take_bookie_cash($userid, $amount)
{
        global $vbulletin;

        $bookie = $vbulletin->db->query_first("SELECT * FROM " . TABLE_PREFIX . "user WHERE userid=$userid");

        switch ($vbulletin->options['vbookiecash'])
        {
                case 'vcash':
                        if($amount > $bookie['vbookie_cash'])
                        {
                                $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET vbookie_cash=0 WHERE userid=$userid");
                        }
                        else
                        {
                                $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET vbookie_cash=vbookie_cash-$amount WHERE userid=$userid");
                        }
                        break;
                case 'ucash':
                        if($amount > $bookie['ucash'])
                        {
                                $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET ucash=0 WHERE userid=$userid");
                        }
                        else
                        {
                                $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET ucash=ucash-$amount WHERE userid=$userid");
                        }
                        break;
                case 'ebux':
                        if($amount > $bookie['ebux'])
                        {
                                $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET ebux=0 WHERE userid=$userid");
                        }
                        else
                        {
                                $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET ebux=ebux-$amount WHERE userid=$userid");
                        }
                        break;
                case 'custom':
                        ($hook = vBulletinHook::fetch_hook('vbookie_take_bookie_cash')) ? eval($hook) : false;
        }
}

Next, open vbookie.php and find:
Code:

                                // actually pay the money ;)
                                vbookie_give_user_cash($bet['userid'], $amount_to_pay);

Below, add:
Code:

                                // psybernaut's mod
                                vbookie_take_bookie_cash($threadinfo['postuserid'], $amount_to_pay);

Then find:
Code:

        vbookie_take_user_cash($total_stake);
Below, add:
Code:

        // psybernaut's mod
        vbookie_give_user_cash($threadinfo['postuserid'], $total_stake);

That's it! ...unless you're using vbBux (by setting vbookie to a custom point system and using CMX's hooks), then you need a couple more mods...

Open includes/xml/hooks_bookiehack.xml and find:
Code:

                <hook>vbookie_take_user_cash</hook>
Below, add:
Code:

                <hook>vbookie_take_bookie_cash</hook>
Last of all, you need to add a new plugin to hook into vbBux... Go to Plugin System->Add New Plugin and add a plugin with the following details:

Product: vBulletin
Hook Location: vbookie_take_bookie_cash
Title: vBookie With vbPlaza - Take Bookie Cash
Plugin PHP Code:
Code:

// take the bookies money
$bookie = $vbulletin->db->query_first("SELECT * FROM " . TABLE_PREFIX . "user WHERE userid=$userid");
if($amount > $bookie['vbbux'])
{
        $amount = $amount - $bookie['vbbux'];
        $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET vbbux=0 WHERE userid=$userid");
        if($amount > $bookie['vbbank'])
        {
                $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET vbbank=0 WHERE userid=$userid");
        }
        else
        {
                $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET vbbank=vbbank-$amount WHERE userid=$userid");

        }
}
else
{
        $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET vbbux=vbbux-$amount WHERE userid=$userid");
}

That should do the trick! Well, it works for me at least... YMMV ;)

I've made another fix for timezones that are not a round integer (we live in a +9.5 timezone and it caused some issues that needed fixing). I'd be interested in putting out a new release with this fixe in it and the above mod included in a tidier form (eg. admin option to turn it on/off etc). Can anyone point me to some info on how to go about taking over responsibility for this mod, that's assuming Andreas is willing to hand it over of course... I'm not looking to step on toes :)

EDIT: Updated the vbbux hook to deduct money from the bookie's bank account if they don't have enough cash on hand.

chairman miaow 03-16-2006 10:32 AM

Excellent....thanks for this.....when (if) you take this over from Andreas , could you add in a maximum bet feature ?

Catsgot9 03-16-2006 12:07 PM

will that bookie thing work with vcash too, psybernaut?
I do not know how to install vbux/ucash.. but my vbookie seems to be working with vcash.
I would like to have a promotion, see which bookie can make the most virtual dollars

CatsGot9

Adam21 03-16-2006 12:10 PM

*edited

Catsgot9 03-16-2006 12:33 PM

I deleted a thread that had a bet in it.. now the bet stays there inactive. How can I remove this from vbookie?

CatsGot9


All times are GMT. The time now is 06:00 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.03508 seconds
  • Memory Usage 1,884KB
  • 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
  • (9)bbcode_code_printable
  • (4)bbcode_php_printable
  • (17)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
  • (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