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)

mykes 05-11-2005 06:20 PM

Code:

# Query_time: 977  Lock_time: 455  Rows_sent: 20  Rows_examined: 125192586
SELECT item.item_id, item.item_title, item.threadid, grp.group_title, item.item_
status, item.item_created, item.item_open_until, item.item_pay_after, thread.thr
eadid, thread.forumid, thread.postuserid FROM vbookie_items AS item
                LEFT JOIN vbookie_groups AS grp ON grp.group_id = item.group_id
                LEFT JOIN thread AS thread ON thread.vbookie_item_id = item.item
_id
                WHERE item.item_status='SETTLED'
                ORDER BY  item.item_id DESC
                LIMIT 0, 20;

vBookie locking the thread table for 455 seconds! The whole site stops for that long. Look at how many rows examined! Dang these LEFT JOINs.

Did some digging:

mysql> select count(*) from thread;
+----------+
| count(*) |
+----------+
| 159281 |
+----------+

mysql> select count(*) from vbookie_items;
+----------+
| count(*) |
+----------+
| 844 |
+----------+

I think it scanned the entire thread table about 844 times to do the query, and it created temporary tables to boot.


My fix was to enter the following query:

create index thread_vbookie on thread (vbookie_item_id);

This costs sizeof(MEDIUM_INT)*159281 bytes of RAM to keep the needed field in RAM all the time.

At MEDIUM_INT = 2 bytes, it's 320K. At 4 bytes, it's 640K. Puny amount of memory to save all those table scans.

I'm pretty sure it worked, as I went to the vbookie.php page and did all kinds of sorts and they were instant.

carolmyt 05-11-2005 09:15 PM

Ok, I installed it, with no problems, I hadn't added any events yet, but the page was working. Now, when I click on the link, all I get is a blank white page. the php file is definitely still uploaded, and the link in the navbar is going to the right place, so, what's up?

carolmyt 05-11-2005 09:17 PM

Oh, and this is only when the hack is turned on. When its off, there's a standard 'you can't access this page' message.

djwins 05-12-2005 03:06 PM

Quote:

Originally Posted by hitmanuk2k
Where does one define the start off amount each user gets? I want 100 not 500.

Set the default to 100 in vbookie_cash in the user table in your mySQL db.

Flow Fusion 05-12-2005 07:48 PM

Quote:

Originally Posted by Flow Fusion
OK I got everything to work till I hit submit and then nothing. Anyone have any idea why this is?

A lil help here?

freebase69 05-12-2005 09:11 PM

Ok easy question here...how do you settle an event after the event has ended and you know the outcome? I can't seem to figure this one out and the online manual can't be found.

Thanks

freebase69 05-16-2005 09:41 PM

bump...anyone?

RichieBoy67 05-18-2005 06:37 PM

Is there an uninstaller for this? I need to reinstall the queris

Pain86 05-18-2005 09:45 PM

hi... i have this installed on my forums but when i set which usergroup to be able to bet it just wont let that usegroup bet...

any idea what could be the problem?

i want every usergroup to able to bet on events... so i set "can this usergroup bet on events" to yes...

but when i make an event it says "you may not bet on this event" ?!?!

help please.

T_Montana 05-20-2005 08:57 PM

great hack

djwins 05-23-2005 04:57 PM

How do I increase the number of Richest people displayed on the Stats screen?

lcryan 05-25-2005 12:54 AM

works with 3.0.7?

Lord Brar 05-25-2005 10:59 AM

Heya mate! Just curious, what happened to the vBookie sections on Respawned?

[high]* Lord Brar crosses fingers that you are still supporting this hack ;)[/high]

NitroMan 05-26-2005 02:11 PM

ok I installed this and everything seen good but when try to create a event after summit all the info .
I can see a preview but after hit summit new event nothing happen event isn't seen in vbookie area. or nothing xtra on the thread .
any help please?

TIA

Celtic_Mad 05-27-2005 03:04 PM

When I go to the vbookie.php it duplicates the event and when I click to go to the thread of the duplicated event, it brings me to a different vbookie event's thread with the new event I added at the top, very weird! How do I fix this?

lebanon 05-31-2005 09:30 AM

Hi everyone,
I installed this hack , everything sounds fine , i set admins to can post events in user groups .
In newthread.php it doesnt show that i can add an event or add a vbookie event ...
i double checked edits in newthread and they are there all
the code states if vbookie is on and usercan post events to show it, since ive done that i stilll cannot see add events ...
suggestions ?

lebanon 05-31-2005 09:46 AM

i added new usergroup and a new member allowed there
it showed add a new bookie event to newthread that way ...
I went on , and when i am submitting new event it replies that i dont have access to view that page !
Permissions are confusing me , they are set but they act as if they aint

lebanon 05-31-2005 10:57 AM

sorry for multiple posts , just to let anyone having any issue like this know this
admin wasnt able to place a new event , so i created new group although i did allow admins to place new events but i still had to create a group
Make sure group is non moderated ( i had problems because i had it moderated by mistake ) and i was searching and searching untill i was doing new group all over for that lousy simple button choice that i was in a rush to look at !

Flow Fusion 05-31-2005 07:04 PM

Quote:

Originally Posted by lebanon
Hi everyone,
I installed this hack , everything sounds fine , i set admins to can post events in user groups .
In newthread.php it doesnt show that i can add an event or add a vbookie event ...
i double checked edits in newthread and they are there all
the code states if vbookie is on and usercan post events to show it, since ive done that i stilll cannot see add events ...
suggestions ?


Same issue.

NitroMan 06-01-2005 11:00 AM

is a nice hack but no one to help any more .

robaldo 06-01-2005 07:32 PM

does this work with VBulletin 3.0.7??

Mr. Brian 06-03-2005 06:52 AM

Quote:

Originally Posted by robaldo
does this work with VBulletin 3.0.7??

Works fine for me. :)

Pain86 06-05-2005 10:47 AM

hi..i cant get the vBookies own cash to show up in postbit... all the code is correct and ive ticked "yes" in the vbookie options...but its still not showin?

lebanon 06-06-2005 11:52 AM

Flow Fusion ,
Add a new group , a new user and login using that user ( specifying that this group CAN add events ) it will work.
I still couldnt let admin add events, but as long as i can login into another user who can its okey with me.

lebanon 06-06-2005 03:02 PM

am confused about onething,
I just added new events and noticed that eventhough i allowed registered and moderators ( can bet on events ) . They were still NOT able to
So here is my way of fixing it :
In the edit which you do on showthread.php

$nopermission = 0;
if (!($forumperms & CANBET))
{
$nopermission = 1;

I replaced with
$nopermission = 0;
if (($forumperms & CANBET))
{
$nopermission = 1;

Which means i reversed the canbet perms , which is weird but this way the whole permissions worked exactly as i set them and instead of having a non working code or messed up , i had it working like a charm !
I posted it just incase someone wanted to try doing the same if having same problems with permissions issues.

axi 06-07-2005 06:41 PM

ive installed it, so how does it work.

do members use there uCash points for the gambling? I have uCash/uShop installed. so wondering if thats how it works?

axi 06-07-2005 06:44 PM

anothe question, do you have to make a thread to make a bet? is there a way to make bets without starting threads?

congpine 06-08-2005 11:32 AM

how i can add event ? i installed it, there is no error , I did add a group that can add Event , Edit Event ..... and then login with that group ...but i don't know i can add event ....could u please show me how to do that thing ? ( i am using v 3.0.7 ) is this working properly ?

Rabbitoh Warren 06-08-2005 11:47 AM

Quote:

Originally Posted by congpine
how i can add event ? i installed it, there is no error , I did add a group that can add Event , Edit Event ..... and then login with that group ...but i don't know i can add event ....could u please show me how to do that thing ? ( i am using v 3.0.7 ) is this working properly ?

vBookie works fine with 3.0.7. If you are having trouble and getting errors I would advise double checking your code modifications.

To create a new vBookie event you have to start a new thread ? but be sure to tick the box where it says "Yes, post a vBookie Event with this thread" as there is no way to add an event to a thread afterwards.

congpine 06-08-2005 11:52 AM

thanks . I got it!

axi 06-08-2005 01:49 PM

some members created the bookie event but it doesnt get listed in the vbookie page why not?

axi 06-08-2005 05:59 PM

looks like it doesnt like my board, i just un isntalled it until i get some support

cheers

Celtic_Mad 06-09-2005 12:28 PM

Is it possible to automatically award members vcash after making so many posts?

axi 06-09-2005 04:51 PM

use ucash/ushop for it

ams3521 06-10-2005 04:01 AM

Hi the answer to my question is-

To reset everyone to whatever you want use :
PHP Code:

UPDATE user SET vbookie_cash=500

I cant see where in the admin to put it. When i search vbookie_cash i get 2 options which are-

vbookie_cash_bit

and

postbit


Do i just add that line (UPDATE user SET vbookie_cash=500;) in there somewhere? :( Thank. Also i know i dont wanna run before i can walk but id be as well asking if you dont mind. I prefer the avatars and post count etc down the left of the forum but find that the vbookie totals dont show if i have it that way.

All help appreciated as ive been fiddling for over 12hrs now and its got me down a bit.

Thanks

ams3521 06-11-2005 11:50 AM

Great hack and thanks but is it possible to put a cap on what a person can bet, I.e i dont want anybody to be able to bet over 50 points on any event.

Flow Fusion 06-11-2005 12:00 PM

Quote:

Originally Posted by Flow Fusion
OK I got everything to work till I hit submit and then nothing. Anyone have any idea why this is?


??? anybody? any suggestions?

ams3521 06-15-2005 01:48 AM

ok sorted that but now im in REAL bother :(

Ive fell out with all the other admin on my forum over the running of our vbookie competition as they said my way was too tricky etc (but it aint) Everything is going great and i was pretty pleased with some of the events i had posted up

http://www.thedailypunt.com

So anyhow i ended up DELETING the first post from an event and i cant get to see the vbookie event. I understand it will payout folks money when it aint settled 7 days after it closes but thats after the end of our tourney :( I gotta work this out so all help would be very appreciated. Heres 2 other posts on the matter but i couldnt see a reply sorry :(

Quote:

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?


and....


Quote:

It's been brought to my attention that I neglected to add a way to actually delete an Event. "Abandon" will cancel all bets and place the Event in a closed state, but it still exists in the database. I'll add a method to physically remove an event/detach it from a thread. I expect it to be just an update to vbookie.php, so patching should be very simple.

Apologies for the rather glaring oversight!

thanks for the great hack but their gonna hack me in about 2 hours :( anyone know the answer?

thanks :hope

ams3521 06-15-2005 01:52 AM

http://img145.echo.cx/img145/4452/bahhh5kg.jpg

:(

The golf one actually has quite a bit of cash on it all at diff prices so i'd love to be able to see it again but its disappeared into the ether :(

Ps i know youve had a discusion on this on this thread but your decimals odds ARE wrong at least in Europe. to us 7.00 = 6/1 as we include our stake. I belive American odds are as shown. Is there an easy way to change this?

Also i might as well ask if there is any way you can set a DAILY limit? I aint checked that yet so ill go do a search the now but if anyone could help me in my original question then i'll give them a virtual kiss. Thanks :(

Biker_GA 06-15-2005 10:00 AM

Not sure if this is a bug or what.

I have vBookie set to where every registered user can bet, but only the Admin group can create/edit events.

We recently had an event where one of the moderators was able to pay out the bet at the end of the event. A quick double check of the permissions for that group confirmed it was set to bet only. Is vBookie set internally to allow any "staff" member to pay out? I had assumed that only the admin group would be able to do this.


All times are GMT. The time now is 05:07 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.01967 seconds
  • Memory Usage 1,827KB
  • 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
  • (8)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