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)

psybernaut 03-30-2006 09:15 PM

Since eBux changed name to vbBux/vbPlaza you need to use the vbookie hooks provided by CMX in the vbBux/vbPlaza download (because the names of the database tables changed).

Look in the vbBux/vbPlaza archive, there's a directory named 'vbookie_integration'. The readme explains it all... just install the hooks provided by CMX and change the vbookie config to use the custom cash type.

silky-smooth 03-31-2006 05:37 AM

On the odd occasion, our admins go to edit an event and the options switch around.

For example, they'd be like this:

Team A: 12/99 F 0.12
Team B: 10/1 10.00

Just say I wanted to alter the odds a bit (make Team A 14/99), sometimes it will switch the order after you've edited it, so in this case, Team B would then list first (for example) and Team A is second - yet whatever bets laid don't move (so if you placed $50 on Team A, then they switched after an odds edit, it would have you down as $50 for Team B).

Hope this makes sense, and if it's a common problem that's been asked hundreds of times and resolved - this thread is 770-odd posts long, so forgive me for overseeing it.

Thanks

Maxman1544 04-01-2006 04:32 AM

Great mod. Thank you, this is really awesome.

Quick question and I didn't see this listed anywhere in this thread. Everything is working. When I add an event as an Admin it works fine. When I do it as a user (I checked the usergroup and forum rights) it doesn't work.

When you go to add the thread it says you don't have rights to access this page. Then the thread goes into the moderation queue.

What am I doing wrong?

Maxman1544 04-01-2006 04:45 AM

Thread moderation was on (by default) for the group I added.

I am dumb. But this is fixed and I am happy!!!

Neal-UK 04-03-2006 04:39 PM

I'm getting this error when set to use vbPlaza points:

Database error in vBulletin 3.5.4:

Invalid SQL:
UPDATE user SET ebux=25 WHERE ebux < 25;

MySQL Error : Unknown column 'ebux' in 'where clause'
Error Number : 1054
Date : Monday, April 3rd 2006 @ 01:32:28 PM
Script : http://www.**************.eu/forum/vbookie.php
Referrer : http://www.*************.eu/forum/vbookie.php
IP Address : ***.***.**.*
Username : wayneyboy1942
Classname : vb_database

Gizmo5h1t3 04-03-2006 04:41 PM

Quote:

Originally Posted by nealparry
I'm getting this error when set to use vbPlaza points:

Database error in vBulletin 3.5.4:

Invalid SQL:
UPDATE user SET ebux=25 WHERE ebux < 25;

MySQL Error : Unknown column 'ebux' in 'where clause'
Error Number : 1054
Date : Monday, April 3rd 2006 @ 01:32:28 PM
Script : http://www.**************.eu/forum/vbookie.php
Referrer : http://www.*************.eu/forum/vbookie.php
IP Address : ***.***.**.*
Username : wayneyboy1942
Classname : vb_database

have u uninstalled estore??
think it might be a problem with left over stuff from ebux, or estore, after the change to vbplaza.....

id go thru your plugins and products mate...and checxk em

Neal-UK 04-03-2006 04:43 PM

not used estore or anything like that, fresh forum with a fresh install of vbplaza.

Also noticed that the points systems I can choose are:

vCash
uCash
uBux
Custom

I selected uBux but not that one.

Neal-UK 04-03-2006 04:57 PM

tried using Custom and it's working, just no one can bet on an event even though all permissions as set as letting them able to do so.

rclark666 04-03-2006 05:39 PM

When i try and enable posting vbookie events in the usergroup manager.......................it resets all my changes to the permissions to no when i update changes :surprised:

It might be me being stupid as normal but i can't see why it is doing this.........


Help Please????????

http://www.footiebanter.com/forum/vbookie.php

innersanctum 04-03-2006 06:45 PM

I have the same problem. After I enable it so that a usergroup can use vBookie, it resets them all to no. I am using the eBux setting, though I just upgraded to vbPlaza. Any ideas?

innersanctum 04-03-2006 07:12 PM

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*

gwhooooey 04-03-2006 09:30 PM

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:

ForeverForums 04-05-2006 09:21 AM

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

Devadam 04-05-2006 01:28 PM

how can we limit the stakes on the betting ?

Railen 04-05-2006 03:59 PM

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.

Railen 04-05-2006 04:25 PM

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.

mclark2112 04-06-2006 02:15 AM

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

Railen 04-07-2006 02:48 PM

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.

Railen 04-07-2006 03:01 PM

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?)

psybernaut 04-07-2006 10:04 PM

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?

columbonet 04-08-2006 12:05 AM

Quote:

Originally Posted by innersanctum
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*

Can you clarify that last part ? I don't see anything about vbookie on the forum permissions page.

Baudman 04-08-2006 12:28 AM

Quote:

Originally Posted by psybernaut
natralis, please try searching the thread or reading through previous posts. This question has been answered countless times already.

Maybe the author could let people know about this and how to deal with it in the main post. That way people don't have to ask it so many times or search a thread with numerous pages to read.

psybernaut 04-08-2006 01:49 AM

Quote:

Originally Posted by Baudman
Maybe the author could let people know about this and how to deal with it in the main post. That way people don't have to ask it so many times or search a thread with numerous pages to read.

I agree.. if the author isn't going to fix the problems, then an FAQ in the main post would help many people.

Devadam 04-08-2006 03:18 PM

there is a problem in my bookie...

when a bet closed and if it won then system making wrong calculation..
for instance odd 1.6 and i bet 20 on it..when it closed it must add 20+12=32 to the account......
but system add to account 20+32 instead of 32....system wrong over the bet amount...when bet won it add the bet amount 2 times...

what can i do? how can stop this wrong calculation...? i hope you know it...

columbonet 04-08-2006 08:50 PM

Quote:

Originally Posted by Devadam
there is a problem in my bookie...

when a bet closed and if it won then system making wrong calculation..
for instance odd 1.6 and i bet 20 on it..when it closed it must add 20+12=32 to the account......
but system add to account 20+32 instead of 32....system wrong over the bet amount...when bet won it add the bet amount 2 times...

what can i do? how can stop this wrong calculation...? i hope you know it...

This is correct. When you place a bet the program takes the wager immediately. So if you win the above bet you get your original 20 back plus the 1.6 which is 32. total payback is 52.

OldVBuser90210 04-10-2006 12:20 PM

i seem to be having a problem...and as i look through the different pages in this thread, I dont see anyone who's had the same.

I installed vbookie yesterday, everythign seemed to go well. I created a usergroup so only some of my mods could post events, edit, bet, etc

I also did this for admin, the problem is, no one is able to post events, the option simply isnt there, and when I go back to my usergroup permissions, all the vbookie options are set back to no, even tho I've clicked yes and saved. any ideas why this is happening? I am just using vcash btw.

edit i finally did find out how to fix this....i'll remember next time to search through threads from teh last post 1st :)

jmarellano 04-10-2006 09:23 PM

how can each user see how much money they have? it's probably listed in here somewhere, but there are way too many pages to go through.

i know as the admin i can check money by editting a user's options... but how can each member check their own?

Wonko-The-Sane 04-14-2006 08:22 AM

Quote:

Originally Posted by psybernaut
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.

<Snip>

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


brilliant, thank you very very much, that is exactly what I was looking for.

manutdvn 04-15-2006 04:15 AM

Hello,

I am using vbplaza v1.5.5. How to change my vCash? It is just only 500 in default. Even I post a new topic or reply, my vCash doesnot change. I mean, my money uses to bet just 500. How to fix this?

Thanks in advance.

manutdvn 04-15-2006 03:45 PM

I fixed the problem.

slim cutty 04-15-2006 07:58 PM

Quote:

Originally Posted by Andreas
> Has anyone else had this proble?
Everyone has because the install code is "broken".
Just import the XML again and select override

just a reminder for those who do not want to read through 50 pages to get to the source of the usergroup yes/no problem...

Peace

10ECGator 04-17-2006 08:09 PM

Quote:

Originally Posted by slim cutty
just a reminder for those who do not want to read through 50 pages to get to the source of the usergroup yes/no problem...

Peace

;) Appreciate that post SO much! I ahd the same problem and was getting ready to pour through the posts from the back and voila! There it was.

Kmaster 04-19-2006 05:04 AM

Time Zone problem, I have created a event on selected Alaska(GMT-9:00),
but after 2 days I come back to the thread, it has changed (GMT)Western Europe Time, London, Lisbon, Casablanca.
someone has same problem like this?

psybernaut 04-19-2006 05:08 AM

Quote:

Originally Posted by Kmaster
Time Zone problem, I have created a event on selected Alaska(GMT-9:00),
but after 2 days I come back to the thread, it has changed (GMT)Western Europe Time, London, Lisbon, Casablanca.
someone has same problem like this?

I *think* (not 100% sure) the event start and end times also change, so even though it shows the wrong time zone you end up with event actually running at the same time you originally configured it for.

Kmaster 04-19-2006 10:00 AM

Quote:

Originally Posted by psybernaut
I *think* (not 100% sure) the event start and end times also change, so even though it shows the wrong time zone you end up with event actually running at the same time you originally configured it for.


Yes, end time for event is changed.:tired:
someone can fix this?

MorrisMcD 04-20-2006 01:26 PM

Quote:

Originally Posted by Kmaster
Time Zone problem, I have created a event on selected Alaska(GMT-9:00),
but after 2 days I come back to the thread, it has changed (GMT)Western Europe Time, London, Lisbon, Casablanca.
someone has same problem like this?


That happens to me sometimes when I go to edit it.. NO idea why.. Sometimes it happens and sometimes not.. However, when it happens, it also changes the time so it isnt WRONG.. For example... I may have an event closing 10pm eastern.. But when I go to edit it, it says 7pm Pacific.. Or whatever.. Its a little annoying because one of my mods didnt notice the time zone once and just changed the time while editing something.. It allowed the users to bet for a few hours after the event ended :D

Kmaster 04-20-2006 02:09 PM

wish Andreas will find time fix the problem above mentioned.

majoreyeswater 04-20-2006 10:17 PM

Quote:

Originally Posted by majoreyeswater
Sorry to be a pain, but if someone could tell me how to delete an entry in vbookie that is no longer eidtable or no longer has a thread attached to it I would appreciate it.

I know we created the problem ourselves, but will take all the help I can get....


OK, I'll keep asking in the hope that someone might be able to help. A good hoof to the top to draw attention to it never does any harm...

Trying to delete vbookie event that has had its thread deleted and now is stuck in the vbookie listing.

psybernaut 04-21-2006 01:52 AM

Quote:

Originally Posted by majoreyeswater
OK, I'll keep asking in the hope that someone might be able to help. A good hoof to the top to draw attention to it never does any harm...

Trying to delete vbookie event that has had its thread deleted and now is stuck in the vbookie listing.

I'm not sure it can be done.. well, not easily anyway. I've got similar orphaned events hanging around on my site. I think someone may have posted an SQL query to clean them up, but I've never tried it myself.

If you've got PHPMyAdmin, or something similar installed, you could remove them from the database manually.

tappedout 04-23-2006 02:02 AM

Hmmm. when i change permisions in forum permisions or user group permisions, it sets it right back to no after i click yes then save it. any ideas?


All times are GMT. The time now is 07:46 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.02911 seconds
  • Memory Usage 1,883KB
  • 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
  • (16)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