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)

tjdrico 06-06-2004 10:08 PM

Quote:

Originally Posted by GamerzWorld
what do you get to start with? Also can you loose all your cash?

If you're using uCash or Petz, people start off with whatever they have. If using vCash, it starts at 500. Yes, people can lose all their "money", but there's a "charity" setting that gives 25 to anyone poorer than that whenever a new bet event is added, so people always have something to play with so they can build up a new pot.

deathemperor 06-07-2004 01:21 AM

Quote:

Originally Posted by xQuEeNzNaZcHox
OK, I fixed problem B, but problem A is bad.

Screenshot is attached

try this:
- check the links to the JS files.
- view the source to see if there is something like this:
<a style="float:right" href="#top" onclick="return toggle_collapse('forumbit_forumid')"><img id="collapseimg_forumbit_72" src="/buttons/collapse_tcat.gif" alt="" border="0" /></a> , check to see if it got something wrong with those tags.
hope this help

rinkrat 06-07-2004 02:28 AM

Can this be modded to use VB reputation points as the currency? That would be perfect for my board.

tjdrico 06-07-2004 06:27 AM

Quote:

Originally Posted by rinkrat
Can this be modded to use VB reputation points as the currency? That would be perfect for my board.

Yes, that's quite possible.

All you'd need to do is hack the functions_vbookie.php file, changing the 8 instances of 'vbookie_cash' to 'reputation'. That should be all you need to do. You might want to alter some of the phrases as well, as they mention 'cash' such as "You do not have enough cash to cover your bets" (vbookie_not_enough_cash) or "You have 300 cash" (vbookie_may_bet), etc.

Also, in the vBookie general settings, turn off the display of vCash in the postbit, as it'd be pointless to display. Since you're dealing with Reputation, you'd also want to turn off the "charity" mode I expect, as that would re-set anyone lower than 25 to a 25 Reputation each time a new Event is added.

Ronso Rage 06-07-2004 05:18 PM

Ok I have a small proble in the changes to the includes/init.php file you say to carry out these changes

OPEN includes/init.php

FIND
PHP Code:
PHP Code:

'stylecache' 
        
), $specialtemplates); 

REPLACE WITH
PHP Code:
PHP Code:

'stylecache'
            
// +++ vBookie 
            
'vbookiesettings' 
            
// --- vBookie 
        
), $specialtemplates); 

Well I have the arcade installed and have 'arcadesettings' in that area to replace as well, and leaving it there gives me a parse error, i have tried moving it around and still get the error

Any ideas ?

tjdrico 06-07-2004 05:34 PM

You should end up with something like this:

PHP Code:

            'stylecache'
            
'arcadesettings',
            
// +++ vBookie 
            
'vbookiesettings' 
            
// --- vBookie 
        
), $specialtemplates); 

As long as there's a comma after 'arcadesettings', it should be fine.

Ronso Rage 06-07-2004 05:52 PM

Quote:

Originally Posted by tjdrico
You should end up with something like this:

PHP Code:

            'stylecache'
            
'arcadesettings',
            
// +++ vBookie 
            
'vbookiesettings' 
            
// --- vBookie 
        
), $specialtemplates); 

As long as there's a comma after 'arcadesettings', it should be fine.

Thanks it's all sorted now and seems to be running fine, i just forgot the comma (stupid me)

CarolinaKid 06-07-2004 06:58 PM

This would be really great if there was a way to use paypal or another online bank so u could deposit real money....but i guess that would be gambling

tjdrico 06-07-2004 07:07 PM

As I said early in this thread, I'm sure it's possible for someone to hack in. I, however, wouldn't feel confident about doing a bulletproof, un-exploitable hack, so it's not for me.

Battle_Ring 06-08-2004 01:45 AM

i just fully installed this

but it dont show up so i can add an event

any idea

i did the fiel edits and uplaoded them

tjdrico 06-08-2004 06:26 AM

Quote:

Originally Posted by Battle_Ring
i just fully installed this

but it dont show up so i can add an event

any idea

i did the fiel edits and uplaoded them

Did you make sure that a) vBookie is turned on, and b) your user group has been given permission to create events? This is covered in the installation instructions, so please go over them and double-check that you've done those things.

tjdrico 06-08-2004 12:57 PM

Thanks to everyone that has installed this hack. It's good to know that the time spent on it has been appreciated by someone other than myself. =)

With Euro 2004 on the horizon, Wimbledon, the Tour de France, the Olympics and what-not, I'm sure that it'll be a fun addition to your forums.

Of course, you can place events on anything! Even Big Brother. /o\

Battle_Ring 06-08-2004 02:05 PM

yes vbookie is turned on and usergroupe permissions are set

tjdrico 06-08-2004 02:11 PM

You have probably missed a template edit or a file edit. Go through the installation instructions and double-check that you've done everything correctly.

Battle_Ring 06-08-2004 02:42 PM

i got it missed a template edit

tjdrico 06-08-2004 02:45 PM

There ya go! =)

Battle_Ring 06-08-2004 02:45 PM

foudn a bug or something

Richest members is way off

Creeper has a total of 990
Platinum~Pimp has a total of 98
|†|KryptoniK|†| has a total of 9485
shinoda has a total of 93
ºDissØrderlyº has a total of 9152

dniMTheory 06-08-2004 02:56 PM

^^same thing here. not only that, my times are all screwed up. The open until and payout dates are never right.

tjdrico 06-08-2004 02:56 PM

Are you using uCash?

If so, please make this edit if you wouldn't mind, and let me know:

Open includes/functions_vbookie.php

Find:
PHP Code:

$q "SELECT u.username, p.".$vboptions['uttpoints_pointsfield']." 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"

Replace with:

PHP Code:

$q "SELECT u.username, p.".$vboptions['uttpoints_pointsfield']." AS cash FROM " TABLE_PREFIX $vboptions['uttpoints_pointtable']." AS p LEFT JOIN " TABLE_PREFIX "user AS u ON u.userid=p.userid ORDER BY p.".$vboptions['uttpoints_pointsfield']." DESC LIMIT 5"

If that doesn't correct it, can you tell me what your uttpoints_pointsfield and uttpoints_pointtable are set to?

tjdrico 06-08-2004 02:57 PM

Quote:

Originally Posted by dniMTheory
^^same thing here. not only that, my times are all screwed up. The open until and payout dates are never right.

What timezone are you in? Have you got the timezone set correctly? When you add an event or edit one, what timezone is in the timezone box? Have you tried setting that to the correct timezone? It should default to the timezone you have set in your User CP options.

Battle_Ring 06-08-2004 03:01 PM

that edit didnt change anythign and my

uttpoints_pointsfield ----uttpoints
and
uttpoints_pointtable ----user

tjdrico 06-08-2004 03:10 PM

Quote:

Originally Posted by Battle_Ring
that edit didnt change anythign and my

uttpoints_pointsfield ----uttpoints
and
uttpoints_pointtable ----user

Well, I'm a bit puzzled then. Unless I'm just missing something blatently obvious. I don't have a well-used forum handy that uses uCash that I can try an duplicate this problem on. I tried to view your forum but it required registration for viewing.

Do you know how to run SQL commands using the console or mySQL? You could try running the select and what it looks like.

It should be:

[sql]SELECT u.username, p.uttpoints AS cash FROM user AS p LEFT JOIN user AS u ON u.userid=p.userid ORDER BY cash DESC LIMIT 5;[/sql]

Battle_Ring 06-08-2004 03:20 PM

i ran the quey and this si what it says

Creeper 990
Platinum~Pimp 98
|†|KryptoniK|†| 9485
shinoda 93
ºDissØrderlyº 9152
yo-yo's-r-us 91
madhatter 9
~*Ladie Berretta*~ 88
nimbus 87
STYLES 8679469
Blak Siinz 855
K-jun 85
Katana no Mune 83
Exact SkillZ 82
PURE*EVIL 80
ThOr-O 8
Denze 8
.:.¼¦¶Lü§.:. 8
Q_skinnypimp 8
Eye Solation 8

tjdrico 06-08-2004 03:33 PM

Oh, wait... it's using a character field, not an integer. So it uses "dictionary" ordering. Two ticks while I look up the mySQL syntax to cast a VARCHAR to an INT. =)

tjdrico 06-08-2004 03:39 PM

OK, if you do the following, it should fix that little problem:

Open includes/functions_vbookie.php

Find:
PHP Code:

$q "SELECT u.username, p.".$vboptions['uttpoints_pointsfield']." 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"

Replace with:

PHP Code:

$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 p.".$vboptions['uttpoints_pointsfield']." DESC LIMIT 5"


Battle_Ring 06-08-2004 03:41 PM

nope

tjdrico 06-08-2004 03:44 PM

Did for me. Are you sure you saved it? Uploaded it? What version of mySQL are you using? Did you try it at the console too?

Battle_Ring 06-08-2004 03:46 PM

i only use the one in the console

Battle_Ring 06-08-2004 03:47 PM

i can give you ful ladmin access to my site and ftp info and stuff and you can see if you can do it

tjdrico 06-08-2004 03:47 PM

What about:

PHP Code:

$q "SELECT u.username, CONVERT(p.".$vboptions['uttpoints_pointsfield'].", SIGNED) AS cash FROM " TABLE_PREFIX $vboptions['uttpoints_pointtable']." AS p LEFT JOIN " TABLE_PREFIX "user AS u ON u.userid=p.userid ORDER BY p.".$vboptions['uttpoints_pointsfield']." DESC LIMIT 5"

Maybe your version of mySQL handles the +0 differently. The CONVERT() function should be the same though I think. I'm not sure about older versions of mySQL - this manual is for 4.0.9

Oh, I just read that "The CAST() and CONVERT() functions were added in MySQL 4.0.2. " so if you're on mySQL 3 then it'll still be unhappy. =) I'll look some more.

Battle_Ring 06-08-2004 03:52 PM

MySQL v4.0.12

tjdrico 06-08-2004 03:54 PM

In that case the CONVERT() above should work (but so should the +0 have). If it doesn't and you want to PM me the access details to your FTP or phpMyAdmin, I'll have a look and see if I can suss it out.

tjdrico 06-08-2004 04:17 PM

Are you sure the "+0" didn't work? According to a manual for MySQL 3.23:

Quote:

MySQL automatically converts numbers to strings as necessary, and vice-versa:

Code:

mysql> SELECT 1+"1";
        -> 2


I can't see why they'd break that support in version 4.

tjdrico 06-08-2004 04:31 PM

OK, after checking your forum (thanks), I think the +0 did work fine:

Quote:

Richest People
STYLES has a total of 8679484
2_Die_4 has a total of 46487
Chance has a total of 19603.25
Young Legend has a total of 16350
|?|KryptoniK|?| has a total of 9485
So I'll release a minor update with that fix in.

Battle_Ring 06-08-2004 04:33 PM

thanks for all your help nwo if i could get someone to help me wit hthe shoutbox and log in as user id be all set

Battle_Ring 06-08-2004 05:57 PM

ok so how does the best work if the odss are 1/1 they get doubtle there bet if they win???

what would
2/1
5/1
10.1

do???

Battle_Ring 06-08-2004 06:23 PM

problem

all permissiosn are set and my users get a white screen when trying to go to the vbookie.php page and when i post an event in the thread they cant see it

also no matter what ya put the pay out date always goes to the bets end date

tjdrico 06-08-2004 06:59 PM

Quote:

Originally Posted by Battle_Ring
problem

all permissiosn are set and my users get a white screen when trying to go to the vbookie.php page and when i post an event in the thread they cant see it

also no matter what ya put the pay out date always goes to the bets end date

I just registered, and it displays fine for me (no "white screen"). However, there are no events listed. Are you sure you added one correctly?

Regarding the second item, did you clear the checkbox that specifies that you want them both to be the same date?

Battle_Ring 06-08-2004 07:02 PM

i got ti it didnt add the templates to all styles just one nwo i need to manually add them

is there a hack that adds templates to al lstyles i think there is but i cant find it

tjdrico 06-08-2004 07:03 PM

Quote:

Originally Posted by Battle_Ring
ok so how does the best work if the odss are 1/1 they get doubtle there bet if they win???

what would
2/1
5/1
10.1

do???

If odds are 1/1, that means that for every 1 that's bet, you win 1 back. So if I placed a bet of 5 at 1/1, I'd win 5, and get my stake back.

Odds of 2/1 mean that you win 2 for every 1 placed. So if I placed a bet of 5 at 2/1, I'd win 10, and get my stake back as well.

Odds of 10/1 mean that you win 10 for every 1 placed. So if I placed a bet of 5 at 10/1, I'd win 50, and get my stake back as well.

Odds of 1/5 mean that you win 1 for every 5 placed. So if I placed a bet of 5 at 1/5, I'd win 1, and get my stake back as well.


All times are GMT. The time now is 10:50 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.01966 seconds
  • Memory Usage 1,851KB
  • 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
  • (9)bbcode_php_printable
  • (11)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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