View Full Version : vBookie - vBulletin Betting Hack
tjdrico
06-03-2004, 10:00 PM
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/ (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=65844) 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.
Updates
1.0.0 -> 1.0.1
- adds the ability to delete Events. See this post (https://vborg.vbsupport.ru/showpost.php?p=519902&postcount=29) 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 (https://vborg.vbsupport.ru/showpost.php?p=519943&postcount=33) 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 (https://vborg.vbsupport.ru/showpost.php?p=520924&postcount=91).
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 (https://vborg.vbsupport.ru/showpost.php?p=523030) 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 (https://vborg.vbsupport.ru/showpost.php?p=523030). 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 (https://vborg.vbsupport.ru/showpost.php?p=520924&postcount=91).
-> If you want to use poster 'Reputation' as the currency for vBookie, see this post (https://vborg.vbsupport.ru/showpost.php?p=520086&postcount=44).
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.
_______________________________________
sabret00the
06-04-2004, 09:27 PM
/me clicks install again
msimplay
06-04-2004, 11:11 PM
sounds excellent :D will install tomoz :D
corsacrazy
06-04-2004, 11:36 PM
how and WHO organises the events? because i was thinking right, i own a car website and i thought members can each own a car and put cash into the pot and race eachother is that possible with this ?
dniMTheory
06-05-2004, 12:45 AM
Got it installed with no problems at all. Perfect instructions.
A few things.
1. My "open until" and "payout on" dates are the same as the time I posted the thread.
It just says "This event will pay out after 1 Minute Ago at 12:00 AM" even though i set the payout for two days from now. Same thing for event info.
2. I'm using Ucash and the display of richest people is way off.
Can this be used to bet on real events such as sports? There would be no "odds" needed then. Simply wait until the end of the game and then someone would go enter the score. Is this possible with this?
tjdrico
06-05-2004, 07:44 AM
how and WHO organises the events? because i was thinking right, i own a car website and i thought members can each own a car and put cash into the pot and race eachother is that possible with this ?
If you give them the right permissions, anyone can post events, but payouts are always made by "the system". It's not possible to win from another poster as such.
tjdrico
06-05-2004, 07:46 AM
Can this be used to bet on real events such as sports? There would be no "odds" needed then. Simply wait until the end of the game and then someone would go enter the score. Is this possible with this?
Do you mean just betting on "the winner"? If so you could just enter each team/participants name as an Outcome, with them all having Odds of 1/1. Then just select the winning team when you settle the bet. Everyone who bet on the winner would get their stake back plus the same amount again.
tjdrico
06-05-2004, 07:53 AM
Got it installed with no problems at all. Perfect instructions.
A few things.
1. My "open until" and "payout on" dates are the same as the time I posted the thread.
It just says "This event will pay out after 1 Minute Ago at 12:00 AM" even though i set the payout for two days from now. Same thing for event info.
2. I'm using Ucash and the display of richest people is way off.
1. I've never had that problem, so it's difficult to suggest what the reason is without access to your forum/event. I will try to replicate it. What timezone are you using?
2. The query I'm using is this:
$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";
That should work out something like:
SELECT u.username, p.money AS cash FROM user AS p LEFT JOIN user AS u ON u.userid=p.userid ORDER BY cash DESC LIMIT 5
It might be that I don't understand uCash properly, as I don't really use it. I'll try to find out what's what and iron out any glitches.
deathemperor
06-05-2004, 08:48 AM
great, this is what I was asking hundreds of time. Thank you tjdrico !
going to install this soon
thanks again.
sabret00the
06-05-2004, 09:18 AM
upgrade went mega smoothly
good job, i will install it later.
Beermonster
06-05-2004, 03:59 PM
* Beermonster clicks install again :)
xQuEeNzNaZcHox
06-05-2004, 05:34 PM
I truly screwed up
www.nymfans.com
tjdrico
06-05-2004, 05:39 PM
I truly screwed up
www.nymfans.com
Screwed up the installation?
AzHousePro
06-05-2004, 11:02 PM
Excellent hack. It will fit in perfectly with my billiards board.
Mike
xQuEeNzNaZcHox
06-05-2004, 11:33 PM
Parse error: parse error, unexpected T_VARIABLE, expecting ')' in /home/nymfans/public_html/includes/init.php on line 868
I get that now. I can't run the install script. I edited all the files and templates, and want to run the installer.
HELP!
xQuEeNzNaZcHox
06-06-2004, 12:29 AM
HELP PLEASE! I need to reopen my board.
check your init.php file edit and redo the changes on a fresh copy if neccessary
xQuEeNzNaZcHox
06-06-2004, 01:12 AM
Ok, most is all good, but I still have 2 issues:
- My forums won't expand in vB. They are stuck in the collapsed position.
- I don't have the sticky-like label next to the thread in showthread. Is that normal?
AzHousePro
06-06-2004, 02:03 AM
I have it installed and taking bets now. How do I go in and change the odds after the event has been posted?
Is there a way that I could change the poor mode so that everyone gets an extra 25 or 50 dollars when a new event is posted?
Mike
AzHousePro
06-06-2004, 06:11 AM
Doh, nevermind.
Mike
tjdrico
06-06-2004, 07:07 AM
I have it installed and taking bets now. How do I go in and change the odds after the event has been posted?
Is there a way that I could change the poor mode so that everyone gets an extra 25 or 50 dollars when a new event is posted?
You've probably already worked this out, but just in case you haven't:
Edit includes/functions_vbookie.php
Find:
$amount = 25;
Change that to 50, or whatever.
tjdrico
06-06-2004, 07:08 AM
Ok, most is all good, but I still have 2 issues:
- My forums won't expand in vB. They are stuck in the collapsed position.
- I don't have the sticky-like label next to the thread in showthread. Is that normal?
I'm not sure what either of the problems you mention are -- can you provide screenshots?
tjdrico
06-06-2004, 02:10 PM
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!
xQuEeNzNaZcHox
06-06-2004, 02:57 PM
OK, I fixed problem B, but problem A is bad.
Screenshot is attached
xQuEeNzNaZcHox
06-06-2004, 03:08 PM
That's my homepage, believe it or not. Thats this list of forums on my homepage.
tjdrico
06-06-2004, 03:10 PM
I'm sorry, I can't suggest what you might have done. There are no edits to index.php for vBookie, so that page shouldn't have been affected as far as I can tell. I've checked on my own forum that has vBookie installed, and the forums collapse and uncollapse fine. Check it out here (http://www.respawned.co.uk/forums/index.php?). I can only suppose that you either didn't follow the instructions correctly, or didn't realise that something you were asked to do might conflict with some other hack you've got installed.
Perhaps someone who is more familiar with the forum display page might be able to suggest what the problem may be, but I'm sorry I have no ideas.
tjdrico
06-06-2004, 03:38 PM
I've just uploaded a file with version 1.0.1 in it. This is essentially identical to 1.0.0 but it adds the ability to delete Events.
If you have already installed 1.0.0, please download 1.0.1 and overwrite vbookie.php with the new version. Then add the following three phrases and one new template plus one template change:
Phrases
----------------------------------------------------------
type: GLOBAL
varname: vbookie_delete_event
text: Delete <i>vBookie</i> Event
----------------------------------------------------------
type: GLOBAL
varname: vbookie_confirm_delete_event
text: Are you sure you want to <b>delete</b> this <i>vBookie</i> event?
----------------------------------------------------------
type: Front-End Redirect Messages
varname: vbookie_redirect_deleted
text: Your <i>vBookie</i> event has been deleted. If there were any stakes placed on an unsettled bet, they have been returned. You will now be taken back to the main <i>vBookie</i> page.
----------------------------------------------------------
New Template
title: vbookie_confirm_delete_event
<br />
<form action="vbookie.php" method="post">
<input type="hidden" name="item_id" value="$item_id">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat">$vbphrase[vbookie_delete_event]</td>
</tr>
<tr>
<td class="alt1" colspan="7">
$vbphrase[vbookie_confirm_delete_event]<br />
</td>
</tr>
<tr>
<td class="thead">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="t" value="$threadid" />
<input type="hidden" name="do" value="confirmeddelete" />
<input type="submit" class="button" name="preview" value="Yes" accesskey="p" tabindex="1" />
</td>
</tr>
</table>
</form>
<br />
Template CHANGE
title: vbookie_main_items_bit
<tr>
<td class="$bgclass">$item[item_title]<span class="smallfont"><br /><a href="showthread.php?t=$item[threadid]">Thread</a> | <a href="vbookie.php?do=viewitem&item_id=$item[item_id]">Info</a>
<if condition="$can_delete"> | <a href="vbookie.php?do=deleteitem&item_id=$item[item_id]">Delete</a></if></span></td>
<td class="$bgclass">$item[group_title]</td>
<td class="$bgclass">$item[item_status]</td>
<td class="$bgclass">$item[created]</td>
<td class="$bgclass">$item[openuntil]</td>
<td class="$bgclass">$item[payafter]</td>
</tr>
Let me know if there are any problems.
xQuEeNzNaZcHox
06-06-2004, 03:48 PM
HELP ME! Please!!!!!!!!!!!!!!!!!!!!!!!!!!!
djohn
06-06-2004, 05:03 PM
Awesome. Before i install this, does it have any group and forum specific permissions, so that only specified groups can bet or post vBookie events in specified forums?
tjdrico
06-06-2004, 05:19 PM
Awesome. Before i install this, does it have any group and forum specific permissions, so that only specified groups can bet or post vBookie events in specified forums?
Yes. You can use the standard permissions system to grant/revoke rights to:
- add/edit an event
- edit someone else's events
- bet on events
These can be applied to user groups, or turned on/off on specific forums.
On my forums I have Registered Users allowed to bet, Bookies allowed to add/edit anyone's, and Restricted Bookies allowed to add/edit their own.
tjdrico
06-06-2004, 05:33 PM
Just updated for 1.0.2 which is a minor fix. I tidied up some stuff and deleted something I shouldn't have. Just upload the includes/functions_vbookie.php file, or do the following change:
Find:
function vbookie_do_charity()
{
global $DB_site, $vbookiesettings;
Change to:
function vbookie_do_charity()
{
global $DB_site, $vboptions, $vbookiesettings;
This would only have affected you if you had the "charity mode" on, and had any users with less than 25 money.
Wolffman
06-06-2004, 07:25 PM
When I tried to edit the permissions this came up:
Database error in vBulletin 3.0.1:
Invalid SQL: UPDATE usergroup SET
### UPDATE QUERY GENERATED BY fetch_query_sql() ###
title = 'Members',
description = '',
usertitle = '',
opentag = '',
closetag = '',
passwordexpires = '0',
passwordhistory = '0',
attachlimit = '0',
canpostvbookieevent = '1',
caneditothersvbookieevents = '1',
canbet = '1',
avatarmaxwidth = '150',
avatarmaxheight = '150',
avatarmaxsize = '50000',
profilepicmaxwidth = '200',
profilepicmaxheight = '200',
profilepicmaxsize = '65535',
pmquota = '40',
pmsendmax = '5',
uttstore_discount = '0',
forumpermissions = '127487',
pmpermissions = '3',
calendarpermissions = '17',
wolpermissions = '1',
adminpermissions = '0',
genericpermissions = '7879',
genericoptions = '30',
shoutboxpermissions = '0',
siguploaderpermissions = '0',
arcadepermissions = '0'
WHERE usergroupid=2
mysql error: Unknown column 'canpostvbookieevent' in 'field list'
mysql error number: 1054
tjdrico
06-06-2004, 07:45 PM
When I tried to edit the permissions this came up:
Database error in vBulletin 3.0.1:
Invalid SQL: UPDATE usergroup SET
### UPDATE QUERY GENERATED BY fetch_query_sql() ###
title = 'Members',
description = '',
usertitle = '',
opentag = '',
closetag = '',
passwordexpires = '0',
passwordhistory = '0',
attachlimit = '0',
canpostvbookieevent = '1',
caneditothersvbookieevents = '1',
canbet = '1',
avatarmaxwidth = '150',
avatarmaxheight = '150',
avatarmaxsize = '50000',
profilepicmaxwidth = '200',
profilepicmaxheight = '200',
profilepicmaxsize = '65535',
pmquota = '40',
pmsendmax = '5',
uttstore_discount = '0',
forumpermissions = '127487',
pmpermissions = '3',
calendarpermissions = '17',
wolpermissions = '1',
adminpermissions = '0',
genericpermissions = '7879',
genericoptions = '30',
shoutboxpermissions = '0',
siguploaderpermissions = '0',
arcadepermissions = '0'
WHERE usergroupid=2
mysql error: Unknown column 'canpostvbookieevent' in 'field list'
mysql error number: 1054
According to my local mySQL, those columns shouldn't be in usergroup anyway:
mysql> show columns from vb_usergroup;
+---------------------+----------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+---------------------+----------------------+------+-----+---------+----------------+
| usergroupid | smallint(5) unsigned | | PRI | NULL | auto_increment |
| title | varchar(100) | | | | |
| description | varchar(250) | | | | |
| usertitle | varchar(100) | | | | |
| passwordexpires | smallint(5) unsigned | | | 0 | |
| passwordhistory | smallint(5) unsigned | | | 0 | |
| pmquota | smallint(5) unsigned | | | 0 | |
| pmsendmax | smallint(5) unsigned | | | 5 | |
| pmforwardmax | smallint(5) unsigned | | | 5 | |
| opentag | varchar(100) | | | | |
| closetag | varchar(100) | | | | |
| canoverride | smallint(5) unsigned | | | 0 | |
| ispublicgroup | smallint(5) unsigned | | | 0 | |
| forumpermissions | int(10) unsigned | | | 0 | |
| pmpermissions | int(10) unsigned | | | 0 | |
| calendarpermissions | int(10) unsigned | | | 0 | |
| wolpermissions | int(10) unsigned | | | 0 | |
| adminpermissions | int(10) unsigned | | | 0 | |
| genericpermissions | int(10) unsigned | | | 0 | |
| genericoptions | int(10) unsigned | | | 0 | |
| pmpermissions_bak | int(10) unsigned | | | 0 | |
| attachlimit | int(10) unsigned | | | 0 | |
| avatarmaxwidth | smallint(5) unsigned | | | 0 | |
| avatarmaxheight | smallint(5) unsigned | | | 0 | |
| avatarmaxsize | int(10) unsigned | | | 0 | |
| profilepicmaxwidth | smallint(5) unsigned | | | 0 | |
| profilepicmaxheight | smallint(5) unsigned | | | 0 | |
| profilepicmaxsize | int(10) unsigned | | | 0 | |
| arcadepermissions | int(10) unsigned | YES | | 0 | |
| uttstore_discount | varchar(20) | | | 0 | |
+---------------------+----------------------+------+-----+---------+----------------+
30 rows in set (0.02 sec)
It looks like you didn't follow the installation instructions correctly. Those three columns (canpostvbookieevent, caneditothersvbookieevents, canbet) should have gone directly below "'canseedelnotice' => 262144," in init.php which would make them part of the 'forumpermissions' group.
I recommend that you go through the installation instructions again, double-checking them against what you've actually done.
Wolffman
06-06-2004, 07:57 PM
That was my fault. All I did was forget to add a phrase.
Thanks anyway. :)
tjdrico
06-06-2004, 08:02 PM
That was my fault. All I did was forget to add a phrase.
Thanks anyway. :)
Cool! =) Odd error to happen as a result of a missing phrase though.
lordnex
06-06-2004, 08:07 PM
Good hack, thanks for posting it! It does take a bit of careful editing as it does go into a few hacks and someone not very observant might overwrite those hacks.
Good job though!
tjdrico
06-06-2004, 08:13 PM
Good hack, thanks for posting it! It does take a bit of careful editing as it does go into a few hacks and someone not very observant might overwrite those hacks.
I agree. Unfortunately it's impossible to write instructions that cover every available hack, so it's only really possible to write them assuming an 'as new' unhacked installation. If something like v3Arcade has already been added, or uCash perhaps, or Petz, or... or... or... then the instructions might clash; particularly when it comes to bitfield permissions where the next available number in an original installation might be 16, but that might already have been used by another hack. The savvy hacker would know to use 32 instead, but not everyone has such knowledge.
I've tried to stress in the installation instructions the importance of prior backups, but that's advice not everyone will heed. Sensible people would read through all the instructions first, and compare them to their own files before starting, but this is the real world and people aren't that cautious. =)
I think I might update the installation instructions to stress these points though.
Additional:
OK, updated installation instructions:
http://www.kop.nildram.co.uk/images/vbinstall.gif
I think that's about all I can reasonably do. =)
GamerzWorld
06-06-2004, 08:49 PM
what do you get to start with? Also can you loose all your cash?
tjdrico
06-06-2004, 10:08 PM
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
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
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:
'stylecache'
), $specialtemplates);
REPLACE WITH
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:
'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
You should end up with something like this:
'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
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:
$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:
$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
^^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
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:
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;
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:
$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:
$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:
$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:
MySQL automatically converts numbers to strings as necessary, and vice-versa:
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:
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
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
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.
subu1
06-08-2004, 07:29 PM
oh, i have an error :surprised:
Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit in safe mode in /home/virtual/site25/fst/var/www/html/board/vbookie.php on line 16
and if i post a event i have this error
Datenbankfehler in vBulletin 3.0.0:
Ungueltige SQL-Abfrage: UPDATE SET =25 WHERE <25
mysql error: You have an error in your SQL syntax near 'SET =25 WHERE <25' at line 1
mysql error number: 1064
Datum: 08.06.2004 22:29:45
Skript: http://www.starlight-board.net/board/vbookie.php
Referer: http://www.starlight-board.net/board/vbookie.php
sorry i need help
tjdrico
06-08-2004, 08:16 PM
oh, i have an error :surprised:
Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit in safe mode in /home/virtual/site25/fst/var/www/html/board/vbookie.php on line 16
Just edit vbookie.php and comment out set_time_limit on line 16.
i.e.
Change:
set_time_limit(0);
To:
//set_time_limit(0);
It's not really required.
and if i post a event i have this error
Datenbankfehler in vBulletin 3.0.0:
mysql error: You have an error in your SQL syntax near 'SET =25 WHERE <25' at line 1
sorry i need help
Just update includes/functions_vbookie.php to the latest version. I assume you downloaded it early on, and have 1.0.0.
dniMTheory
06-08-2004, 09:04 PM
Found a small bug...or maybe its just me.
If you have the date/time options set to show detailed, vbookie doesnt work well. I had to change my time settings to normal to get my times to show correctly.
tjdrico
06-08-2004, 10:08 PM
Found a small bug...or maybe its just me.
If you have the date/time options set to show detailed, vbookie doesnt work well. I had to change my time settings to normal to get my times to show correctly.
What setting are you talking about? I'm not aware of any "show detailed" settings for time & date. Can you explain for me?
Battle_Ring
06-08-2004, 10:13 PM
i have oen event up and it onyl shows up on here under open http://battlering.net/forums/vbookie.php on one of my skins the dragon skin any ideas why??
Me too.
Bit of a bugger really, I do like the Detailed settings.
(tjdrico - AdminCP - VBulletin Options - Date and Time Options , shows Start and End times of vbookie events as 1 minute ago.)
tjdrico
06-09-2004, 06:34 AM
i have oen event up and it onyl shows up on here under open http://battlering.net/forums/vbookie.php on one of my skins the dragon skin any ideas why??
I just checked your templates using your AdminCP (your login you gave me), it it seems that the 'vbookie_main_items_bit' template only got added to the Dragon style, but not Rage etc. I'm not sure why that would be - all the other templates seem to me installed in all the other styles. I've added it to the other templates for you, and the display on vbookie.php now looks correct.
tjdrico
06-09-2004, 06:45 AM
Me too.
Bit of a bugger really, I do like the Detailed settings.
(tjdrico - AdminCP - VBulletin Options - Date and Time Options , shows Start and End times of vbookie events as 1 minute ago.)
Ah, I get you. OK, that's because the built-in vbdate() function that I'm using only handles historical dates correctly (3 minutes ago, 4 hours ago). I'll add a new function that can handle future dates (in 3 minutes time, in 4 hours time) and that should sort things out for Detailed view. Should be later today.
Ah, I get you. OK, that's because the built-in vbdate() function that I'm using only handles historical dates correctly (3 minutes ago, 4 hours ago). I'll add a new function that can handle future dates (in 3 minutes time, in 4 hours time) and that should sort things out for Detailed view. Should be later today.
Couldn't you just do it like the Polls do?
They keep the normal 'will close on 12 june 2004 at 3:00 PM' style...while the thread's post time is saying '1 minute ago' or '2 weeks ago'.
tjdrico
06-09-2004, 06:59 AM
Couldn't you just do it like the Polls do?
They keep the normal 'will close on 12 june 2004 at 3:00 PM' style...while the thread's post time is saying '1 minute ago' or '2 weeks ago'.
Aye, I suppose... but that's not as pretty as saying "This poll will close in 3 minutes' time", and if you use "Detailed" so you can see "3 Minutes Ago" on post times, I don't see why you wouldn't want that same detail.
tjdrico
06-09-2004, 07:02 AM
If you want to hack that in for the time being anyway, open showthread.php and...
Find:
$eventinfo['openuntil_date'] = vbdate($vboptions['dateformat'],$eventinfo['item_open_until'],true);
$eventinfo['payafter_date'] = vbdate($vboptions['dateformat'],$eventinfo['item_pay_after'],true);
$eventinfo['openuntil_time'] = vbdate($vboptions['timeformat'],$eventinfo['item_open_until'],true);
$eventinfo['payafter_time'] = vbdate($vboptions['timeformat'],$eventinfo['item_pay_after'],true);
and replace it with:
$eventinfo['openuntil_date'] = vbdate($vboptions['dateformat'],$eventinfo['item_open_until']);
$eventinfo['payafter_date'] = vbdate($vboptions['dateformat'],$eventinfo['item_pay_after']);
$eventinfo['openuntil_time'] = vbdate($vboptions['timeformat'],$eventinfo['item_open_until']);
$eventinfo['payafter_time'] = vbdate($vboptions['timeformat'],$eventinfo['item_pay_after']);
Next, open vbookie.php
Find:
exec_switch_bg();
$item['created'] = vbdate($vboptions['dateformat'],$item['item_created'],true);
$item['openuntil'] = vbdate($vboptions['dateformat'],$item['item_open_until'],true);
$item['payafter'] = vbdate($vboptions['dateformat'],$item['item_pay_after'],true);
eval('$betitembits .= "' . fetch_template('vbookie_main_items_bit') . '";');
and replace it with:
exec_switch_bg();
$item['created'] = vbdate($vboptions['dateformat'],$item['item_created']);
$item['openuntil'] = vbdate($vboptions['dateformat'],$item['item_open_until']);
$item['payafter'] = vbdate($vboptions['dateformat'],$item['item_pay_after']);
eval('$betitembits .= "' . fetch_template('vbookie_main_items_bit') . '";');
Then find:
$eventinfo['openuntil_date'] = vbdate($vboptions['dateformat'],$eventinfo['item_open_until'],true);
$eventinfo['payafter_date'] = vbdate($vboptions['dateformat'],$eventinfo['item_pay_after'],true);
$eventinfo['openuntil_time'] = vbdate($vboptions['timeformat'],$eventinfo['item_open_until'],true);
$eventinfo['payafter_time'] = vbdate($vboptions['timeformat'],$eventinfo['item_pay_after'],true);
and replace that with:
$eventinfo['openuntil_date'] = vbdate($vboptions['dateformat'],$eventinfo['item_open_until']);
$eventinfo['payafter_date'] = vbdate($vboptions['dateformat'],$eventinfo['item_pay_after']);
$eventinfo['openuntil_time'] = vbdate($vboptions['timeformat'],$eventinfo['item_open_until']);
$eventinfo['payafter_time'] = vbdate($vboptions['timeformat'],$eventinfo['item_pay_after']);
That should sort the "1 Minute Ago" problem. These edits will be made to the install set from 1.0.4 onwards.
Aye, I suppose... but that's not as pretty as saying "This poll will close in 3 minutes' time", and if you use "Detailed" so you can see "3 Minutes Ago" on post times, I don't see why you wouldn't want that same detail.
How about making that optional? ;)
tjdrico
06-09-2004, 07:10 AM
How about making that optional? ;)
Well, it'll be optional to install the update. :D
Battle_Ring
06-09-2004, 02:57 PM
COol Thanks for all your help
Parsing functions.php Time before: 1086813007.8077 Time after: 1086813007.829 Time taken: 0.021291971206665
--------------------------------------------------------------------------------
Processing sessions.php Time before: 1086813007.8296
i keep getting this in my includes/init.php file... what am i doing wrong?
FIND
PHP Code:
'stylecache'
), $specialtemplates);
REPLACE WITH
PHP Code:
'stylecache',
// +++ vBookie
'vbookiesettings'
// --- vBookie
), $specialtemplates);
im not sure how to replace this since this area looks like the following:
'stylecache',
'utt_store_act',
'arcadesettings'
), $specialtemplates);
when i try to edit this area i get the errors i listed above...
Please help!
tjdrico
06-09-2004, 07:44 PM
Change this:
'stylecache',
'utt_store_act',
'arcadesettings'
), $specialtemplates);
To this:
'stylecache',
'utt_store_act',
'arcadesettings',
// +++ vBookie
'vbookiesettings'
// --- vBookie
), $specialtemplates);
It's important that you add the new comma after 'arcadesettings'.
ok cool... that works! thanks! i still had some more errors - i just had to reverse them... so when i get more (if) i'll be back lol
thanks alot man
tjdrico
06-09-2004, 10:06 PM
No probem. Click install if you don't mind - that way I'll be able to alert you to any updates.
No probem. Click install if you don't mind - that way I'll be able to alert you to any updates.
done!
is there anymore info on how to use this? i got everything set up, yada yada... but im trying to figure out how to place bets, etc...
nvm... my bad - i found it on your website.
GREAT SYSTEM! THANKS! I'LL TRY TO DONATE SOON! :)
limey
06-10-2004, 04:44 AM
Cool hack tjdrico! One of the best. Will install when I can.
Cool hack tjdrico! One of the best. Will install when I can.
I had some problems, but I worked through it... but now I was wondering this:
- Richest Members in vBookie Stats only shows my richest uShop/uCash members, except the 2 richest. The two richest have like $13.xx and $17.xx, and 3rd richest has $7.xx ... the list in vBookie starts at the $7.xx person. (If that made any sense)
- Also, when I click the option to add an event with the thread, I don't get taken to a "Post a vBookie Event" page... any ideas... ? I did set my usergroup to be able to add events
tjdrico
06-10-2004, 06:34 AM
I had some problems, but I worked through it... but now I was wondering this:
- Richest Members in vBookie Stats only shows my richest uShop/uCash members, except the 2 richest. The two richest have like $13.xx and $17.xx, and 3rd richest has $7.xx ... the list in vBookie starts at the $7.xx person. (If that made any sense)
- Also, when I click the option to add an event with the thread, I don't get taken to a "Post a vBookie Event" page... any ideas... ? I did set my usergroup to be able to add events
Regarding the first, which version of the installation file did you have? Is it version 1.0.3? Check the 'includes/functions_vbookie.php' file, and the 'function vbookie_get_richest()' function. You should see this code:
if ($vbookiesettings['ucash'] == 1)
{
$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 cash DESC LIMIT 5";
}
The main point here is that there is a "+0" on the uttpoints_pointsfield column, as this forces it to be an integer rather than a string.
The second suggests that you didn't make all the changes correctly, or missed one all together. One suspect would be this one in 'newthread.php':
FIND
if ($newpost['postpoll'])
{
$url = "poll.php?$session[sessionurl]t=$newpost[threadid]&polloptions=$newpost[polloptions]";
}
AFTER, ADD
// +++ vBookie
else if ($newpost['postvbookieevent'])
{
$url = "vbookie.php?$session[sessionurl]t=$newpost[threadid]&vbookieeventoptions=$newpost[vbookieeventoptions]&do=newevent";
}
// --- vBookie
The change above is what specifies the page you are directed to after submitting a new thread. Double check all the changes prescribed in the installation instructions.
Thanks for the quick reply...
- Regarding the first issue(how my Store uses decimals), is there a way to fix this? Or do you suggest changing my point system over to integers?? I liked the idea of dollars and cents
- New Event... well everything seems correct... I'm gonna try to double check...
ahhhh... found it :nervous:
FIND
$newpost['polloptions'] = intval($_POST['polloptions']);
AFTER, ADD
// +++ vBookie
$newpost['postvbookieevent'] = $_POST['postvbookieevent'];
$newpost['vbookieeventoptions'] = intval($_POST['vbookieeventoptions']);
// --- vBookie
That's what I forgot ... thanks again for your help
*clicked install*
tjdrico
06-10-2004, 07:24 AM
Thanks for the quick reply...
- Regarding the first issue(how my Store uses decimals), is there a way to fix this? Or do you suggest changing my point system over to integers?? I liked the idea of dollars and cents
Well, actually, the "+0" should just convert it to a number, not strictly an integer. The problem with the ordering was that the uttpoints field is a VARCHAR, so "ORDER BY" uses dictionary ordering. In dictionary ordering "8.5" comes after "700", so the numbers come out wrong. The "+0" forces them to be viewed as numbers, so "8.5" comes before "700".
I don't know why it uses a char field rather than a decimal or int for a numeric amount, but it seems to work OK and the +0 on my SELECT should fix it if it's not present in your copy of the file.
deathemperor
06-10-2004, 09:58 AM
tjdrico, this is a great hack and how about: don't the money the users lost goes thrash, there should be an account like 'bet master' to keep all of the money users have lost and pay how much they won. and you should make it like: in ACP admin can have the option that if he wants the money goes to someone and if yes enter the user id of that person.
hope it gives more fun ^^
Okiewan
06-10-2004, 12:46 PM
Silly question I'm sure, but how would one settle an event?
Is there not an option shown to do so until the end date/time has passed?
tjdrico
06-10-2004, 12:53 PM
No, the "Settle" option is only shown once the "This event will pay out after" date has been reached. If you want to settle a bet before that time, edit it and change the date. Presumably, however, one wouldn't settle an event until the result is known, so it makes sense to set the "This event will pay out after " to that time in the first place. It defaults to being the same as the "accept bets until" date/time, which should be before the result is known. ;)
Okiewan
06-10-2004, 01:22 PM
Excellent hack. HOTM level stuff!
tjdrico
06-10-2004, 01:28 PM
Thanks for the kind words.
Click "Install" and spread the gospel according to St Bookmaker to all who will listen (and some that won't). =)
Okiewan
06-10-2004, 02:15 PM
will do.
Next question:
Let's say we have a couple of usergroups we allow to make events. Are they able to settle it? Senario: Someone makes an event, expires in 20 minutes. Makes odds 1000/1. Makes "correct" pick. Settles.
Maybe only the Admin can settle? Or if you make the event, you can't win it?
tjdrico
06-10-2004, 02:21 PM
Let's say we have a couple of usergroups we allow to make events. Are they able to settle it? Senario: Someone makes an event, expires in 20 minutes. Makes odds 1000/1. Makes "correct" pick. Settles.
Maybe only the Admin can settle? Or if you make the event, you can't win it?
Well, this comes down to trusting the people you allow to set up events. The top winners are shown for any event so it's quite easy to see if anyone's abusing it. I don't think it's any more of a problem than appointing someone as a forum moderator.
There's no need to make it so only admins can settle though. Just set up a "Bookmakers" group that has rights to create and edit events, but not to play them. That should be enough. Of you really want it so that only admins can settle, then make it so only admins can create events in the first place. =)
Okiewan
06-10-2004, 02:23 PM
I hear ya... I do have a couple of larger groups (paid subscribers)that I initially wanted to allow to post events... too many to trust, lol.
Thanks for the reply.
tjdrico
06-10-2004, 02:31 PM
I hear ya... I do have a couple of larger groups (paid subscribers)that I initially wanted to allow to post events... too many to trust, lol.
Thanks for the reply.
Aye, but if you have a large group, all allowed to post events, then the poor Administrator(s) have a big job keeping on top of them (assuming lots of people set events up). It's just another hassle for admins on top of other things.
I think the idea of not being allowed to bet on your own event(s) is fair enough though. I'll look into adding that as an option for another release. I don't see it being a big job.
Alternatively, just make it so that only your paid subscribers can play, as added value to the forum. =) You never know, it might persuade some people on the edge to decide to pay up after all. Hehe.
Okiewan
06-10-2004, 02:41 PM
Alternatively, just make it so that only your paid subscribers can play, as added value to the forum. =) You never know, it might persuade some people on the edge to decide to pay up after all. Hehe.
It is so :)
Okiewan
06-10-2004, 02:50 PM
Another thing comes to mind...
An easy way for the Admin to deduct vCash?
Reason: Let's say at the end of a month of betting, the member with the most cash can "buy" something.. real stuff, or vStuff :)
tjdrico
06-10-2004, 03:03 PM
Another thing comes to mind...
An easy way for the Admin to deduct vCash?
Reason: Let's say at the end of a month of betting, the member with the most cash can "buy" something.. real stuff, or vStuff :)
There are a number of store/points/money hacks floating around that would have that sort of administration built in. Rather than reinventing any wheels, I think it would make more sense to install one of those, and then make a couple of changes to vBookie to use that particular hack's money or points.
immotive
06-10-2004, 04:04 PM
i got this error :
Database error in vBulletin 3.0.0:
Invalid SQL: UPDATE SET =25 WHERE <25
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 'SET =25 WHERE <25' at line 1
mysql error number: 1064
am i missing something?
immotive
06-10-2004, 04:07 PM
i modified according to here
https://vborg.vbsupport.ru/showthread.php?p=520745&highlight=sql+error#post520745
events are recorded, but i still got the error.
Excellent stuff, thanks!
Of course, you can do whatever you see fit, here. You might prefer to only allow vBookie events to be created in a specific forum, rather than in every forum. To do this, just set the permissions for specific forums as normal.Could you clarify this a bit more? I want to set up a forum for only vbookie events but there are no settings in the adminCP for doing so? From the installation instructions I can see that there are no file edits to the admincp/forums.php file so I must be misreading the purpose or something...
Cheers,
~Regs.
tjdrico
06-10-2004, 04:19 PM
i modified according to here
https://vborg.vbsupport.ru/showthread.php?p=520745&highlight=sql+error#post520745
events are recorded, but i still got the error.
Please check the contents of 'includes/functions_vbookie.php', in particular the vbookie_do_charity() function, and make sure that the first line of it says:
global $DB_site, $vboptions, $vbookiesettings;
If it does, then please report back, and tell me what the values of uttpoints_pointtable and uttpoints_pointsfield are in your uTT Store settings.
tjdrico
06-10-2004, 04:23 PM
Could you clarify this a bit more? I want to set up a forum for only vbookie events but there are no settings in the adminCP for doing so? From the installation instructions I can see that there are no file edits to the admincp/forums.php file so I must be misreading the purpose or something...
Using the 'Usergroups' -> 'Forum Permissions' page, you can edit each user group, e.g. Registered Users, forum-specific permissions. You will get a warning that custom permissions must be enabled, but as long as you OK that, you can set up forum-specific permissions and restrict vBookie to that forum. You can make the same changes via 'Forums & Moderators' -> 'Forum Permissions' as well.
Well, actually, the "+0" should just convert it to a number, not strictly an integer. The problem with the ordering was that the uttpoints field is a VARCHAR, so "ORDER BY" uses dictionary ordering. In dictionary ordering "8.5" comes after "700", so the numbers come out wrong. The "+0" forces them to be viewed as numbers, so "8.5" comes before "700".
I don't know why it uses a char field rather than a decimal or int for a numeric amount, but it seems to work OK and the +0 on my SELECT should fix it if it's not present in your copy of the file.
But you can only bet values of integers also..
i set up an event and the user i was on had like $3.50... i could only bet 1, 2, or 3
is this how its supposed to be?
tjdrico
06-10-2004, 05:35 PM
But you can only bet values of integers also..
i set up an event and the user i was on had like $3.50... i could only bet 1, 2, or 3
is this how its supposed to be?
Yes. It was designed to use its own vCash or integer points originally. uCash came later but it only made sense in the original version to bet with whole points. Everything's geared around integers, and most points systems are integer based.
LoOnEyToOnZ
06-11-2004, 02:42 AM
Please check the contents of 'includes/functions_vbookie.php', in particular the vbookie_do_charity() function, and make sure that the first line of it says:
global $DB_site, $vboptions, $vbookiesettings;
If it does, then please report back, and tell me what the values of uttpoints_pointtable and uttpoints_pointsfield are in your uTT Store settings.
Hello tjdrico
I will help immotive answer some questions since he is too busy and cant check here too often.
Yes, the global $DB_site, $vboptions, $vbookiesettings; is there under the vbookie_do_charity() function .
May i know where can i find out the utt store settings ? There are too many instances of uttpoints_pointtable and uttpoints_pointsfield in 'includes/functions_vbookie.php' .
tjdrico
06-11-2004, 06:27 AM
May i know where can i find out the utt store settings ?
In your AdminCP, under "uTT Store Hack", click on "uTT Point System Settings". The first two entries on that page are the pointstable and pointsfield settings.
For example, mine say 'user' and 'uttpoints'.
If they are correctly set, are you sure that your uTT Store hack is correctly installed? Is it working as expected in other instances?
immotive
06-11-2004, 03:01 PM
Thanks for your hint, i made some mistake in my global.php
Please check the contents of 'includes/functions_vbookie.php', in particular the vbookie_do_charity() function, and make sure that the first line of it says:
global $DB_site, $vboptions, $vbookiesettings;
If it does, then please report back, and tell me what the values of uttpoints_pointtable and uttpoints_pointsfield are in your uTT Store settings.
LoOnEyToOnZ
06-12-2004, 11:47 AM
Another question - Is the tax a compulsary amount to have ? Cause i had noticed that quite a few items, by default come with a tax amount. Is it okay if we get rid of all the taxes ?
Thanks
MrNase
06-12-2004, 11:56 AM
you must be insane... how shall i translate that? dozens of templates, many phrases and some english text left in the file :(
LoOnEyToOnZ
06-12-2004, 12:44 PM
you must be insane... how shall i translate that? dozens of templates, many phrases and some english text left in the file :(
Are you talking to me ? Kindly use a better tone towards me or anyone else
Shall i rephrase as "is it possible to use a 0 value inside the AdminCP Action Manager" ?
MrNase
06-12-2004, 02:24 PM
ops sorry, i forgot a ':D' after the '...' :(
installed, translated and running, thank you :)
tjdrico
06-12-2004, 03:42 PM
Another question - Is the tax a compulsary amount to have ? Cause i had noticed that quite a few items, by default come with a tax amount. Is it okay if we get rid of all the taxes ?
Thanks
vBookie imposes no taxes.
tjdrico
06-12-2004, 03:44 PM
you must be insane... how shall i translate that? dozens of templates, many phrases and some english text left in the file :(
Sorry for the bits that aren't in templates or phrases. That was just laziness on my part. I assure you that all the templates and phrases are there for a reason though. =)
Tim Wheatley
06-12-2004, 04:13 PM
Can someone please tell me where/how I can hard code the userid of those I want to allow to post events? I don't want to risk the complications of setting up new usergroups, as some of those I want to post events are mods, some registered, etc etc. I don't expect this to be added to the hack, btu the knowledge would be useful to some. :)
tjdrico
06-12-2004, 06:19 PM
Can someone please tell me where/how I can hard code the userid of those I want to allow to post events? I don't want to risk the complications of setting up new usergroups, as some of those I want to post events are mods, some registered, etc etc. I don't expect this to be added to the hack, btu the knowledge would be useful to some. :)
There are probably a couple of places you should do this. The first would be in newthread.php
There'll be a section like this:
if (!($forumperms & CANPOSTVBOOKIEEVENT))
{
unset($_POST['postvbookieevent']);
}
You could change that to something like:
if (!$bbuserinfo['userid'] != 126)
{
unset($_POST['postvbookieevent']);
}
Also:
if (($forumperms & CANPOSTVBOOKIEEVENT) && ($vbookiesettings['active'] != 0))
{
$show['vbookieevent'] = true;
}
To:
if (($bbuserinfo['userid'] == 126) && ($vbookiesettings['active'] != 0))
{
$show['vbookieevent'] = true;
}
That should hide the checkbox for adding a new event from everyone but the allowed user.
Then, in vbookie.php, find the section that starts:
if ($_REQUEST['do'] == 'newevent')
Then, below that, find the lines:
if (!($forumperms & CANVIEW) OR !($forumperms & CANPOSTNEW) OR !($forumperms & CANPOSTVBOOKIEEVENT))
{
print_no_permission();
}
Change that to:
if (!($forumperms & CANVIEW) OR !($forumperms & CANPOSTNEW) OR !($bbuserinfo['userid'] == 126))
{
print_no_permission();
}
There will be a similar change to make in the section that starts:
if ($_POST['do'] == 'postevent')
Just search on 'CANPOSTVBOOKIEEVENT' to find the two locations.
I think that'd be enough, but it's just from my head and not tested in any way.
I keep getting the error
Parse error: parse error in /usr/local/psa/home/vhosts/forestforum.co.uk/httpdocs/forum/includes/init.php on line 516
Parsing functions.php Time before: 1087071117.6956 Time after: 1087071117.7328 Time taken: 0.037165880203247
--------------------------------------------------------------------------------
Processing sessions.php Time before: 1087071117.7334
which relates to this section
'stylecache',
'arcadesettings',
// +++ vBookie
'vbookiesettings'
// --- vBookie
), $specialtemplates);
$datastoretemp = $DB_site->query("
SELECT title, data
FROM " . TABLE_PREFIX . "datastore
WHERE title IN ('" . implode("', '", $specialtemplates)) . "')
");
Any ideas?
tjdrico
06-12-2004, 07:23 PM
I think the problem is this line:
WHERE title IN ('" . implode("', '", $specialtemplates)) . "')
Maybe you've edited it for some other hack, but I think it should be:
WHERE title IN ('" . implode("', '", $specialtemplates) . "')
i.e. you've ended up with an extra ) in there.
excellent that sorted it - no idea how i missed that! :o
excellent hack by the way i'm sure it will become an essential part of my forum.
(clicked install)
BarHopper
06-12-2004, 09:36 PM
I need this hack!! I attempted it, but i messed up on msot of the file eidts,
Is anyone interested doing the file edits for me? Just the include ones? I'll pay
Mr. Brian
06-12-2004, 11:18 PM
Oops.. Didn't expect to get this..
Parse error: parse error in /home/soccerwi/public_html/forums/vbookie.php on line 728
Any ideal whats went wrong?
tjdrico
06-13-2004, 06:37 AM
I need this hack!! I attempted it, but i messed up on msot of the file eidts,
Is anyone interested doing the file edits for me? Just the include ones? I'll pay
I don't have a lot of time to respond right now, but PM me and we can sort it out.
tjdrico
06-13-2004, 06:39 AM
Oops.. Didn't expect to get this..
Any ideal whats went wrong?
Did you edit the script in any way? Try re-uploading the original script. No one else has reported a parse error, so I'm assuming it's a mistake you've made. Which version of the file did you download? Are you sure it extracted OK and uploaded without errors? vbookie.php in version 1.0.3 should be 58,966 bytes according to my PC.
MrNase
06-13-2004, 10:19 AM
Is there a chance to allow commas? The odds for France beating England are 1.90 to 1 but vbookie changes that to 2 :(
Is there a chance to allow commas? The odds for France beating England are 1.90 to 1 but vbookie changes that to 2 :(
Just make the odds 190 to 100...
tjdrico
06-13-2004, 11:50 AM
Just make the odds 190 to 100...
Or 19/10. =)
MrNase
06-13-2004, 12:00 PM
hey cool, i'll do so. thank you :)
LoOnEyToOnZ
06-13-2004, 02:57 PM
tjdrico does the back work like when people place a bet the money is subtracted from them first, then later when the event is settled, the money is kept or the odds will be paid out ?
also, if i create the events, will the money be deducted from me or the system ?
Mr. Brian
06-13-2004, 05:27 PM
Did you edit the script in any way? Try re-uploading the original script. No one else has reported a parse error, so I'm assuming it's a mistake you've made. Which version of the file did you download? Are you sure it extracted OK and uploaded without errors? vbookie.php in version 1.0.3 should be 58,966 bytes according to my PC.
Seem like I've to create an event before proceeding any step further. And yes, I did, and now the problem are sloved! :D
Thanks for your reply anyway. :)
tjdrico
06-13-2004, 10:09 PM
tjdrico does the back work like when people place a bet the money is subtracted from them first, then later when the event is settled, the money is kept or the odds will be paid out ?
also, if i create the events, will the money be deducted from me or the system ?
If I place a bet on an event, the stake is immediately deducted from me. That might mean I lose 50 uTT points, or 50 Petz points or 50 reputation etc.
When the bet is settled, if I lost I get nothing back. If I won, I get my winnings, plus the stake returned as well.
All bets are settled using an infinate supply of system points/money. I did think about making it so that there was a "system pot" or the administrator/event owner being liable, but it didn't seem to be as much fun as people would have to concentrate too hard on a) their odds and b) limiting the number of bets they accepted so all wins could be covered.
msimplay
06-14-2004, 09:53 AM
absolutely Fantastic hack great work
i would make a suggestion tho adding events to threads that don't already have them
like the add poll button on the forum drop down :)
tjdrico
06-14-2004, 10:02 AM
absolutely Fantastic hack great work
i would make a suggestion tho adding events to threads that don't already have them
like the add poll button on the forum drop down :)
Yep, fair point. I didn't actually realise one could add a poll to a thread like that until very recently when I stumbled upon it my accident. I have a few things I want to do for an update to vBookie, and I dare say this will be one of them.
msimplay
06-14-2004, 10:35 AM
i hope the updates easy to install hehe :p
Alan Ang
06-14-2004, 03:39 PM
hi tjdrico,
i think your betting system is great!
i have a some features for the next version that i would like to suggest:
1. admin able to assign credits to individual members. (i.e. members with higher donations to forum can get higher starting vCash, it also allows players who are bankrupt to come back into the game with a new donation.)
2. members are able to set up separate wagers with fellow members, subjected to credit limit bought/assigned by admin. win or loss are deducted from one another.
3. when members bet with one another (i.e. this allows members to side bet with each other, and to deduct directly from current top winners.), a portion of the proceeds goes to the admin.
4. members have varied credit limits when betting, limit to be set by admin.
5. admin able to set a limit to the total bets received.
6. admin to have a panel that lists the full details of all bets as well as summarized reports.
7. admin to be able to stop accepting bets in realtime, in order to adjust odds.
8. admin to be able to set formula for calculation of odds for automatic tabulation.
9. members able to have a results panel to list their current bets, past bets and total profit/loss.
i feel that with these features, it makes for a more realistic betting system and it allows an avenue for forums to start its subscriptions for members. in turn, forums can work with businesses to sponsor prizes for the person who finally makes the most vCash at the end of the events/season.
is this possible? or is it too hard to be realised?
tjdrico
06-14-2004, 05:26 PM
Hi Alan, I've read your post and will respond properly later when I've a bit more time. Most, if not all of the things are fairly straight forward. Really it comes down to whether I can be bothered. ;) I'll give a better reply later.
tjdrico
06-14-2004, 07:24 PM
1. admin able to assign credits to individual members. (i.e. members with higher donations to forum can get higher starting vCash, it also allows players who are bankrupt to come back into the game with a new donation.)
I addressed this previously, saying that there are many store/points hacks already available that offer this sort of thing. I don't really have plans to incorporate it into vBookie but you're not the first to ask, and if I get more requests for the same thing I'll probably do it.
However, there is already a mechanism for players to "get back into the game" - there's a "charity mode" whereby anyone on less than 25 credits gets set to 25 when a new event is added.
2. members are able to set up separate wagers with fellow members, subjected to credit limit bought/assigned by admin. win or loss are deducted from one another.
I like the idea, but it doesn't really fit into the current framework. It'd require some sort of challenge/response mechanism to be built in. That's not particularly difficult, but it's a sizeable addition. Like I say, I do like the idea though, so I'll consider doing it.
3. when members bet with one another (i.e. this allows members to side bet with each other, and to deduct directly from current top winners.), a portion of the proceeds goes to the admin.
Not entirely sure what you mean here by "deduct directly from the top winners.
4. members have varied credit limits when betting, limit to be set by admin.
This was actually in my original plan, but I decided not to bother since it's virtual "cash" and there's an unlimited supply as far as settling goes.
5. admin able to set a limit to the total bets received.
Again, since there's an unlimited settlement pot, there's really no need to limit the number or size of bets that may be placed.
6. admin to have a panel that lists the full details of all bets as well as summarized reports.
9. members able to have a results panel to list their current bets, past bets and total profit/loss.
Better reporting is certainly something that's relatively simple to add.
7. admin to be able to stop accepting bets in realtime, in order to adjust odds.
You can close an event at any point to do this, just by changing the appropriate time. Do you mean a one-click button to do the job?
8. admin to be able to set formula for calculation of odds for automatic tabulation.
I'm not sure what you're getting at here.
is this possible? or is it too hard to be realised?
None of it is particularly difficult. All I need is the motivation to do it. =) I'll look to release an update with some enhancements in the next week or two.
Fanboys Suck
06-14-2004, 07:34 PM
I can't add events but at the top of the vbookie settings I see this error:
Warning: Invalid argument supplied for foreach() in .../includes/functions.php on line 2871
I didn't even edit line 2871. Any ideas?
tjdrico
06-14-2004, 07:45 PM
You may not have edited line 2871, but it may still tell you where the problem lies as you'll be able to see what the invalid argument is. Line 2871 of my functions.php is
if ($forumpwd == md5($password))
so obviously I can't compare mine with yours. I'm guessing that yours is one of
foreach ($parents AS $fid)
foreach ($_FIELDNAMES AS $field => $bitvalue)
They are both in that area, anyway. The latter one might make sense, and could suggest that you didn't make all the vBookie installation changes correctly. First of all, go through all the changes and compare them against the changes you actually made. People usually find that they inadvetently missed an edit.
Rushty
06-15-2004, 11:13 AM
Excellent hack, but im having one problem that I can figure.
Im useing the Petz money system, and everyone can place bets o.k. (and its deducted from there money) but when it comes to payout it dosent give anyone there winnings, but does seem to give it to me (defaulting to userid 1 which is my id?) any ideas?
tjdrico
06-15-2004, 11:22 AM
Excellent hack, but im having one problem that I can figure.
Im useing the Petz money system, and everyone can place bets o.k. (and its deducted from there money) but when it comes to payout it dosent give anyone there winnings, but does seem to give it to me (defaulting to userid 1 which is my id?) any ideas?
Thanks for the bug report. There's an error in includes/functions_vbookie.php, in the function 'vbookie_give_user_cash()'.
You can correct it very simply yourself:
Find:
$q = "UPDATE " . TABLE_PREFIX . "user SET money=money+$amount WHERE userid=$bbuserinfo[userid]";
Replace that with:
$q = "UPDATE " . TABLE_PREFIX . "user SET money=money+$amount WHERE userid=$userid";
My apologies for the oversight.
Rushty
06-15-2004, 12:00 PM
:D Thanks for the quick reply, works fine now
Alan Ang
06-17-2004, 12:28 AM
I addressed this previously, saying that there are many store/points hacks already available that offer this sort of thing. I don't really have plans to incorporate it into vBookie but you're not the first to ask, and if I get more requests for the same thing I'll probably do it.
However, there is already a mechanism for players to "get back into the game" - there's a "charity mode" whereby anyone on less than 25 credits gets set to 25 when a new event is added.
personally, i would not want to use any other store hack to add-on to vbookie. cos, i think vbookie is really a great piece of work. and where i am coming from for this suggestion is to enable a forum to entice members to "subscribe". get what i mean? *wink
i think a small extension to vbookie's "charity mode" might do the job.
I like the idea, but it doesn't really fit into the current framework. It'd require some sort of challenge/response mechanism to be built in. That's not particularly difficult, but it's a sizeable addition. Like I say, I do like the idea though, so I'll consider doing it.
glad that you liked it. :)
Not entirely sure what you mean here by "deduct directly from the top winners.
it allows a player of a lower position to challenge the one higher (much like a ladder system where a player within 2 or 3 positions can challenge the higher positioned player) so that if he wins, points from the higher player are deducted and given to him.
This was actually in my original plan, but I decided not to bother since it's virtual "cash" and there's an unlimited supply as far as settling goes.
yup, but i was hoping that it be fairer to those who wishes to donate more and increase their chances of winning a prize. (e.g a pool cue/accessories/case/tables/etc for my forum members) :)
Better reporting is certainly something that's relatively simple to add.
cool! sometimes, i really wish i know php too... you made it sound so simple... maybe i should really pick it up.
You can close an event at any point to do this, just by changing the appropriate time. Do you mean a one-click button to do the job?
yup. you hit it right on the head!
I'm not sure what you're getting at here.
oops, this is really quite hard to explain. why did i use only a sentence previous to tell ya... hahaha, i will post a more detailed reply to this later.
None of it is particularly difficult. All I need is the motivation to do it. =) I'll look to release an update with some enhancements in the next week or two.
You are the man!
tjdrico
06-17-2004, 06:39 AM
There won't be any updates this weekend, as I'm away on a mate's stag weekend from Friday - Sunday, and if England lose to Switzerland I'll be too depressed anyway. =)
tjdrico
06-18-2004, 06:35 AM
Whooo, I broke the half-century. Thanks to everyone that clicked "Install". Rest assured, I'll be working on a better, prettier, more functional, enhanced version, and you will all be notified as soon as it's available.
Arrrrrrrr!
Dean C
06-18-2004, 09:55 AM
This looks great! Thanks for sharing with the community :)
bluesteel
06-20-2004, 11:49 AM
Great add-on! My members love it. Thanks.
tjdrico
06-20-2004, 12:17 PM
I should be getting a new release available by next weekend which will enable admins/bookies to alter bets and refund bets etc., as well as some other updates and enhancements.
ethics
06-20-2004, 12:22 PM
I should be getting a new release available by next weekend which will enable admins/bookies to alter bets and refund bets etc., as well as some other updates and enhancements.
Excellent hack, best one in a long time, thank you!
rinkrat
06-22-2004, 07:13 AM
Yeah, this mod rocks, thanks!
Tombstone
06-22-2004, 03:20 PM
I have tried twice now to implement this hack but each time I do it, I get all my pages as showing as blank. I think that means my global.php is messed up. I re-copy my orig (pre-edit files) back up and all works. I thought I read somewhere that this means I have a space missing or added somewhere. Any ideas?
tjdrico
06-23-2004, 08:56 AM
I have tried twice now to implement this hack but each time I do it, I get all my pages as showing as blank. I think that means my global.php is messed up. I re-copy my orig (pre-edit files) back up and all works. I thought I read somewhere that this means I have a space missing or added somewhere. Any ideas?
I would say that you just have to take more care when doing the hacks. Make sure you are doing exactly what the instructions tell you to do; if any of your files are already hacked for other things, the instructions might not be exactly correct, so you need to be careful in those circumstances.
Tombstone
06-23-2004, 01:31 PM
My problem is that I did it three times - the edits I mean. I have other hacks such as arcade, articles and cmps_ advanced and non have the problems. What file could cause this to happen? I would assume it would be the init.php or global.php because it even causes the admin panel index.php to be blank.
EA Junkie
06-24-2004, 02:58 AM
I now get a blank page for vBookie after upgrading to vB 3.0.1 . I still have all the control panel options, but can't view vBookie.php . I had the same problem w/ uCash, but used the uninstall option and then reinstalled and everything worked fine...
Thanks in advance to any help.
msimonds
06-24-2004, 08:26 PM
this is a great mod! I am testing it now! Outstanding Work
Matt Bush
06-25-2004, 08:44 PM
Any where that I can find this hack for vb 2.2?
sabret00the
06-26-2004, 11:31 AM
it doesn't exist.
sabret00the
06-26-2004, 11:32 AM
I now get a blank page for vBookie after upgrading to vB 3.0.1 . I still have all the control panel options, but can't view vBookie.php . I had the same problem w/ uCash, but used the uninstall option and then reinstalled and everything worked fine...
Thanks in advance to any help. check your templates
What a sweet mod thanks a million
Matt Bush
06-27-2004, 06:46 AM
Need Help! I have a fat error whenever I try to view my board, all it shows is Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /www/s/showdownshop/htdocs/forum/includes/init.php on line 508
Any suggestions?
The effects of it is my whole board cannot be accessed, even the admin cp
deathemperor
06-27-2004, 06:54 AM
Need Help! I have a fat error whenever I try to view my board, all it shows is Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /www/s/showdownshop/htdocs/forum/includes/init.php on line 508
Any suggestions?
The effects of it is my whole board cannot be accessed, even the admin cp
that's because you didn't follow the instructions properly and it MUST BE that.
Matt Bush
06-27-2004, 06:59 AM
that's because you didn't follow the instructions properly and it MUST BE that.
Positive? Could it be anything else? Also... could you point me in the right direction as to where I messed up?
I have this sugestions :
- posibility to pick from (i don't know how to say it in english) 1:1 sistem to a 1-x-2 sistem. You know, the actual sistem. My users want to have a 1 (home team wins) x (draw) 2 (away team wins)
- posibility to RESTART the whole sistem. I mean, restart the monney, and all users will have again 500 vCash
- posibility to manualy edit vCash that user has
tjdrico
06-27-2004, 01:38 PM
I have this sugestions :
- posibility to pick from (i don't know how to say it in english) 1:1 sistem to a 1-x-2 sistem. You know, the actual sistem. My users want to have a 1 (home team wins) x (draw) 2 (away team wins)
- posibility to RESTART the whole sistem. I mean, restart the monney, and all users will have again 500 vCash
- posibility to manualy edit vCash that user has
Yes to the latter two - they will come soon. I don't really understand the first one though. Perhaps you could give some examples.
Posibility to chose from the ODDS system to a 1 - x - 2 sistem.
The 1-x-2 sistem is like this :
You have 2 teams (football - soccer for americans :P) and from the 2 teams you can chose 1, x or 2.
If you chose 1 the home team wins, if you choose X then it's a draw, if you chose 2 the away team wins.
Go it ?
P.S. http://hattrick.computergames.ro/forum
this is my forum. See your hack in action :)
NuclioN
06-27-2004, 03:43 PM
The odds system confuse our (Dutch) members. 10/1 and 5/2 bets...and i can't explane it, they have to deal with the instructions given. Is it possible to simplify the instruction? For example a bet of 100 points will increase/decrease by *** if etc. :)
Great hack! clicks install
tjdrico
06-27-2004, 05:00 PM
Posibility to chose from the ODDS system to a 1 - x - 2 sistem.
The 1-x-2 sistem is like this :
You have 2 teams (football - soccer for americans :P) and from the 2 teams you can chose 1, x or 2.
If you chose 1 the home team wins, if you choose X then it's a draw, if you chose 2 the away team wins.
Go it ?
Why not just use three outcomes, all with odds of 1/1?
i.e.
Team A vs. Team B:
Team A to win: 1/1
Draw: 1/1
Team B to win: 1/1
It seems to me that you want to unneccessarily complicate the system.
tjdrico
06-27-2004, 05:03 PM
The odds system confuse our (Dutch) members. 10/1 and 5/2 bets...and i can't explane it, they have to deal with the instructions given. Is it possible to simplify the instruction? For example a bet of 100 points will increase/decrease by *** if etc. :)
Great hack! clicks install
They're about as simple as I can make them. I've already explained it in terms of how much you'd win, haven't I?
At odds of 10 / 1, a bet of 100 would increase by 1000 if the bet was won, i.e. you'd get 1100 back (1000 winnings, plus the 100 stake). A bet of 100 at 5/2 would increase by (100 * 5) / 2, or 500/2, or 250. The person would get paid 350, their 250 win plus their 100 stake back.
Why not just use three outcomes, all with odds of 1/1?
i.e.
Team A vs. Team B:
Team A to win: 1/1
Draw: 1/1
Team B to win: 1/1
It seems to me that you want to unneccessarily complicate the system.
nice sugestion.
P.S. So it is 1/1 not 1:1 :)
geovadim
06-29-2004, 01:04 PM
The problem is that one can't bet for one game in a simple 1x2. It is complicated.
Holidazed
06-30-2004, 06:57 PM
Maybe it is just me. Most likely it is.
I installed this on my vb3.01 system and set the user permissions to allow admins to do anything. I turned it on and set it to use ucash.
However, when I goto the site, login as an admin and goto the vbookie, I do not see any options at all to add an event? I double checked the instructions and it does nto appear that I have forgotten anything.
How do I add an event?
tjdrico
06-30-2004, 07:40 PM
Have you tried reading the manual?
tjdrico :
Another small sugestion. Posibility to add an image on bet GROUP.
For exemple, when you create a new bet, you put a group text. Like ENGLAND PREMIERSHIP, or something. How about posibility to use images instead of text ? So i won't writte ENGLISH PREMIERSHIP, i will just put the logo.
This is a small sugestion :)
Also, on the vBooking page, you have :
Currently showing OPEN Events. Switch to .....
There is OPEN, CLOSE, etc. What about ALL, that will show all the bets, closed, open, suspended, etc.
tjdrico
06-30-2004, 08:00 PM
I would think that's entirely possible, PET. I can't recall offhand whether I parse BB code in the "group" text, but all I think I'd need to do is that, so that you could use ... and have it converted to HTML by the parser. Good suggestion.
The "ALL" option is easy to add, so I will.
Holidazed
06-30-2004, 08:51 PM
OK, I did not see the link in the instructions for where the manual was located.
However, when I choose to post a new event, I get the following error.
Warning $botuserid is not set to the proper member ID
Now, I searched the documentation and all of the files that came with this hack saw no reference to $botuserid.
I searched the templates as well.
Help
tjdrico
07-01-2004, 06:27 AM
However, when I choose to post a new event, I get the following error.
Warning $botuserid is not set to the proper member ID
Now, I searched the documentation and all of the files that came with this hack saw no reference to $botuserid.
I searched the templates as well.
Help
$botuserid is absolutely nothing to do with vBookie, so I can't offer any help or ideas. I imagine you need to check whatever hack you've installed that uses that variable name.
Mr. Brian
07-01-2004, 04:11 PM
I now get a blank page for vBookie after upgrading to vB 3.0.1 . I still have all the control panel options, but can't view vBookie.php . I had the same problem w/ uCash, but used the uninstall option and then reinstalled and everything worked fine...
Thanks in advance to any help.
I'm experiencing the same problem, hope someone can help.
Many many thanks in advance:)
tjdrico
07-01-2004, 04:14 PM
I haven't installed 3.0.1, so I don't really have any ideas.
sabret00the
07-01-2004, 04:15 PM
i'm on 3.0.1 and don't have that problem :urghh:
Mr. Brian
07-01-2004, 04:26 PM
I haven't installed 3.0.1, so I don't really have any ideas.
Any way I could reinstall this hack? Just like what ushop provided, with a reinstall scrip. (useful after upgrading vBulletin)
Many thanks in advance.. :)
i'm on 3.0.1 and don't have that problem :urghh:
Thats because you intalled this hack on a fresh 3.0.1.
gwhooooey
07-01-2004, 07:40 PM
Re-add, edit the templates...
Got this error when looking at bet statistics
"Database error in vBulletin 3.0.1:
Invalid SQL: SELECT u.username, (p.+0) AS cash FROM AS p LEFT JOIN user AS u ON u.userid=p.userid ORDER BY cash DESC LIMIT 5
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 '+0) AS cash FROM AS p LEFT JOIN user AS u ON u.userid=p.userid
mysql error number: 1064
Date: Thursday 01st of July 2004 09:12:28 PM
Script: http://www.********.com/forum/vbookie.php?do=stats"
And when I check yes,post a vbookie event with this post .. I get a blank page .. ??
Holidazed
07-02-2004, 12:02 AM
$botuserid is absolutely nothing to do with vBookie, so I can't offer any help or ideas. I imagine you need to check whatever hack you've installed that uses that variable name.
Damn AliceBOT got me again. I gotta remove that hack someday.
Thanks for the help.
Holidazed
07-02-2004, 12:05 AM
Anyway to set it so only certain users (instead of usergroup) can post an event? That is, other than putting that user into a new group and assigning permissions to the group.
Also, is there any way to allow event posting into certain forums only?
I would love it if my moderators could post events but only in the forums that they moderate.
ideas?
Doesn't appear to work on 3.0.1 .. perhaps that should be included in the installation file :disappointed:
Holidazed
07-02-2004, 02:12 PM
Doesn't appear to work on 3.0.1 .. perhaps that should be included in the installation file :disappointed:
Dude. I run this at my site at http://www.dungeonkeepersdomain.com and it is running v3.01. It is working just fine.
Dude .. I and 2 admins from my site have tried the install on 3.0.1 three times and had the same database error's on every installation .. installed arcade / petz with no problems on my main forum .. will not be trying this until the database errors are corrected .. any useful comments anyone .. !?
tjdrico
07-02-2004, 04:17 PM
Dude .. I and 2 admins from my site have tried the install on 3.0.1 three times and had the same database error's on every installation .. installed arcade / petz with no problems on my main forum .. will not be trying this until the database errors are corrected .. any useful comments anyone .. !?
Useful comments might follow useful problem reports. What, for example, do the database errors say?
As listed above .. !?
Got this error when looking at bet statistics
"Database error in vBulletin 3.0.1:
Invalid SQL: SELECT u.username, (p.+0) AS cash FROM AS p LEFT JOIN user AS u ON u.userid=p.userid ORDER BY cash DESC LIMIT 5
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 '+0) AS cash FROM AS p LEFT JOIN user AS u ON u.userid=p.userid
mysql error number: 1064
Date: Thursday 01st of July 2004 09:12:28 PM
Script: http://www.********.com/forum/vbookie.php?do=stats"
================================================== =======
Database error in vBulletin 3.0.1:
Invalid SQL: SELECT FROM WHERE userid='1'
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 'FROM WHERE userid='1'' at line 1
mysql error number: 1064
And when I check yes,post a vbookie event with this post .. I get a blank page .. ??
tjdrico
07-02-2004, 05:38 PM
As listed above .. !?
Got this error when looking at bet statistics
"Database error in vBulletin 3.0.1:
Invalid SQL: SELECT u.username, (p.+0) AS cash FROM AS p LEFT JOIN user AS u ON u.userid=p.userid ORDER BY cash DESC LIMIT 5
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 '+0) AS cash FROM AS p LEFT JOIN user AS u ON u.userid=p.userid
mysql error number: 1064
That's nothing to do with installation, sorry. Your phrasing in the last post mis-led me.
The problem here is the "(p.+0)" and "FROM AS p". Those should contain the uCash column and table, e.g. "(p.money+0)" and "FROM user AS p" -- $vboptions['uttpoints_pointsfield'] and $vboptions['uttpoints_pointtable']. Check what these are set to in the Admin control panel.
I can't really suggest what might be wrong as I haven't got 3.0.1, but I can't see that there would be any major changes between 3.0.0 and 3.0.1. If you want to give me FTP and Admin access to your forum, I can take a look for you, but it won't be until Sunday evening at the earliest because I'm away at a wedding this weekend.
wcbryant
07-02-2004, 08:37 PM
Installed today on a heavily modded 3.0.1 forum. Works brilliantly, no problems on the install at all. Always a pleasure when the instructions are structured so clearly.
Thanks for an outstanding release! My users are ecstatic, fits right in on a college football (US) forum, even though we're testing it on Williams v. Sharapova.
The only hassle now is two of my users jumped in full bore and bet everything on Maria, before realizing that 500 is all they're getting. Can't decide whether to abandon the event, or let them learn a hard lesson. Lol.
Anyway, thanks again for an outstanding hack. Clicked install. ;)
--edit--
Is there any way (even a mysql query) to reset the system, clear all events, and start everyone from 500?
da prez
07-03-2004, 11:43 PM
i haven't even installed it yet, but i clicked install, this is one cool hack.
thanks alot.
da prez
07-04-2004, 12:25 AM
sorry one question.
i haven't installed yet, but i am wondering about something.
i wanna use it for football season.
so is each game an entirely separate event, like will they have to bet on each one individually,
or we i be able to set up one page with all the choices and maybe a default amount of points per game ?
because i would rather they have to pick in all games, not just the ones they feel like.
da prez
07-04-2004, 05:12 AM
also one other thing, is there anyway to reset totals back to default when we want ?
Holidazed
07-04-2004, 04:37 PM
Anyway to set it so only certain users (instead of usergroup) can post an event? That is, other than putting that user into a new group and assigning permissions to the group.
Also, is there any way to allow event posting into certain forums only?
I would love it if my moderators could post events but only in the forums that they moderate.
ideas?
Anybody have an answer to this?
I have a user ho has this monney :
bmf_bebecub has a total of 18446744073709341541
I don't know how he did it, but he really has that much monney !!!!
tjdrico
You really need to add this things :
Posibility to ban a user from vBooking
Posibility to change vCash that a user has
I have a user ho has this monney :
bmf_bebecub has a total of 18446744073709341541
I don't know how he did it, but he really has that much monney !!!!
Nevermind. A moderator of my forum chance some odds from a bet, this gut bet...and...he get that monney :)
tjdrico
07-05-2004, 07:25 AM
Nevermind. A moderator of my forum chance some odds from a bet, this gut bet...and...he get that monney :)
!!!!
tjdrico
07-05-2004, 07:29 AM
Is there any way (even a mysql query) to reset the system, clear all events, and start everyone from 500?
Assuming you are using "vCash":
UPDATE user SET vbookie_cash=500;
DELETE FROM vbookie_news;
DELETE FROM vbookie_bets_placed;
DELETE FROM vbookie_item_options;
DELETE FROM vbookie_items;
DELETE FROM vbookie_groups;
You'll need to add the table prefix if you're using that, of course.
tjdrico
07-05-2004, 07:30 AM
sorry one question.
i haven't installed yet, but i am wondering about something.
i wanna use it for football season.
so is each game an entirely separate event, like will they have to bet on each one individually,
or we i be able to set up one page with all the choices and maybe a default amount of points per game ?
because i would rather they have to pick in all games, not just the ones they feel like.
Each event is separate from any other.
tjdrico
07-05-2004, 07:33 AM
tjdrico
You really need to add this things :
Posibility to ban a user from vBooking
Posibility to change vCash that a user has
You can do the first by moving the user into a restricted usergroup. The second will come with the next release. As vBulletin is moving to 3.0.2 I will probably update my test forum and then get the next release ready to ensure that it retains compatibility with vBulletin.
nighteyes
07-05-2004, 11:00 AM
Installed. I've been playing with this...... this is an awesome hack. :D You got my vote for HOTM.
The problem here is the "(p.+0)" and "FROM AS p". Those should contain the uCash column and table, e.g. "(p.money+0)" and "FROM user AS p" -- $vboptions['uttpoints_pointsfield'] and $vboptions['uttpoints_pointtable']. Check what these are set to in the Admin control panel.
And that translated into English means .. ? :ermm:
I'd love to get this great hack working on my board .. would the fact that I'm running the petz and arcade hack be causing the problem .. ?
wcbryant
07-05-2004, 05:41 PM
Assuming you are using "vCash":
UPDATE user SET vbookie_cash=500;
DELETE FROM vbookie_news;
DELETE FROM vbookie_bets_placed;
DELETE FROM vbookie_item_options;
DELETE FROM vbookie_items;
DELETE FROM vbookie_groups;
You'll need to add the table prefix if you're using that, of course.
Thank you! That will be a huge help.
!!!!
It seems that it's still a bug. i don't know. My moderators are confusing me.
About banning from a usergroup. Can't you made something like an option in user admin ? Can bet to user CP - YES , NO ? It is much easy.
tjdrico
07-05-2004, 07:57 PM
It seems that it's still a bug. i don't know. My moderators are confusing me.
About banning from a usergroup. Can't you made something like an option in user admin ? Can bet to user CP - YES , NO ? It is much easy.
If it's an exploit, ask the user for details of how he exploited it, and I can look into plugging the hole.
I'll look into the user restrictions, but if it's as easy as you say please feel free to perform the hack yourself and post the details here so I can incorporate it into the next release.
Tim Wheatley
07-05-2004, 08:09 PM
I have a user ho has this monney :
bmf_bebecub has a total of 18446744073709341541
I don't know how he did it, but he really has that much monney !!!!
I had a similar problem, one of my users had betted (found out by the timestamp) while I was uploading functions_vbookie.php upgrading from v1 to 1.1.
da prez
07-06-2004, 12:58 AM
i have a user who cannot see the vBookie box at top of vBookie threads.
he is using I.E. 6.0 from comcast
is there a setting, like in usercp, that could be conflicting with this ?
or is it something on his end, pop-up blocker, firewall, etc ?
EDIT ***NVM his forum view style was one i hadn't modified. all good ***
Clicked install .. took some editing but the instructions are acurate and well explained.
Only problem I have is the vbookie icon for new events doesn't show.
Where / which template do I need to edit to correct this.
tjdrico
07-07-2004, 09:29 AM
It looks like you've made the changes, but didn't upload the image to the correct place. You should have 'vbookie_posticon.gif' in images/misc.
It looks like you've made the changes, but didn't upload the image to the correct place. You should have 'vbookie_posticon.gif' in images/misc.
:) .. I was just about to edit my post to say that I have placed the 'vbookie_posticon.gif' in images/misc .. your response was to fast .. :)
Sorted .. my skin uses a different path directory for images/misc https://vborg.vbsupport.ru/
tjdrico
07-07-2004, 02:02 PM
Cool. \o/
I've just been notified of a problem on my board that I *think* might be attributed to this great mod...
It appears that you can't add a normal poll when starting a new thread. Adding a vbookie event works no problem but users can't add a poll anymore. The only way to add a poll is to use the thread tools after the thread is posted.
Can anyone else confirm this?
Cheers,
~Regs.
tjdrico
07-15-2004, 06:32 AM
I've just been notified of a problem on my board that I *think* might be attributed to this great mod...
It appears that you can't add a normal poll when starting a new thread. Adding a vbookie event works no problem but users can't add a poll anymore. The only way to add a poll is to use the thread tools after the thread is posted.
Can anyone else confirm this?
I can't confirm any such problem with my own forum (3.0.0) where my members can still post polls as normal.
It could be that you made a small error in the code modifications - perhaps you replaced a piece of poll code instead of adding something after it.
geovadim
07-15-2004, 09:32 AM
Vbookie should have an alternative to odds system: 1X2 betting system.
I can't confirm any such problem with my own forum (3.0.0) where my members can still post polls as normal.
It could be that you made a small error in the code modifications - perhaps you replaced a piece of poll code instead of adding something after it.Thanks Tjdrico,
I'll have a look at it over the next couple of weeks, just thought it might be a shot since everything else was working :D
Cheers,
~Regs.
Mr. Brian
07-16-2004, 03:51 PM
Is there any way that I could reinstall this hack (If possible, the template will do)? Just like what ushop provided, with a reinstall scrip.
Many thanks in advance.. :)
I dont want to think :)
But I can provide what this is missing very easily.
What I need to figure out is an easy way to do all this by cron.
Ok I wanted to seperate my thought - here is exactly in a perfect world what this would do. We get it here, and I will provide the missing half.
1. Everyday evening or morning, exact time a setting, the upcoming baseball games would be posted, automatically, same for basketball, hockey. Every Tuesday for NFL Football and NCAA Football.
For NFL for example, I guess it would have to be multiple threads, but it would autopost one for the over under, one for the money line, and one for the line. It would be really nice to have this be adjustable and keep track of adjustments, but that is probably to far of a leap for now.
When its autoposting the action it obviously sets the close time and all that jazz.
When the game is over and in the books, it autopays.
Would even be real slick to slide in halftime lines and such, but really that would be nothing if we could do the first part.
I can deliver the info (and it would be a delivery, not a five hundred forum slam me every ten seconds in hopes of something new grab). The scores, the lines, obviously the results, etc.
I for all the world can do anything on vbulletin except autopost - I feel like such a dunce
Taco John
07-18-2004, 03:08 AM
This seems like a great hack! Thanks!
However, I can't find some features that I would think would be included... Like how can I adjust my users money amounts? Or how do I reset the game so that everybody is back on an even level? Are these options included/on the way?
It would be great if I could credit across particular user groups (ie. forum supporters). That would be great.
Terriffic hack! It'll be great for the upcoming football season... Hopefully you'll be able to get some of this added functionality in it.
Thanks!
TJ
immotive
07-19-2004, 04:25 PM
here is a little finding by my forum member, i'm not sure if it is the correct way a vbookie should work. When it odds is 1.7, if we bet 100 points, after the bet is settled, we are getting back our capital (100 points) and our winning (170 points) which is 100 points more, is this a "designed" behaviour of vbookie?
http://www.singaporesoccer.com/forum/showthread.php?t=9753&page=7&pp=15
When U place a bet with Spools, say $100 for (+1.5 handicap)....U get back $140 which is ur initial capital + the $40 profits (i.e. U make a net of $40)...
In ur V-betting system, for the same scenario, it pays U $140 + $100 = $240 (U end up making $140)...
This is why I was able to get 300,000+ points from a mere 500 within a short period of time.....
If U do not believe, just try out first before replying with the "wat's wrong?"
In order for U to track without complication, try betting $100 on SAF give & $100 on Pagar eat at the same time for the coming match...... I guarantee whatever FT outcome, U get back the $200 capital plus net profits ( the net profits simply depend on the odds ). U will never end up losing. Suggest after U bet, bank in all ur balance so that it shows only zero. When settlement takes place, U will see the whole picture crystal clear. Having raised this matter more than once with futile responses, I now rest my case.
romeshomey
07-20-2004, 03:17 AM
Awsome hack.. My members will love it!
Thanks.......!
Watson
07-20-2004, 07:28 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
Does Vbulletin Not allow Gambling? Or is it just illegal to do it with real money?
SnowBot
07-21-2004, 04:11 PM
How do i get the templates to align properly? /me is a HTML geek.
romeshomey
07-21-2004, 08:35 PM
Does Vbulletin Not allow Gambling? Or is it just illegal to do it with real money?
Its illegal in the United States.
Watson
07-22-2004, 11:03 AM
Ahhh. So I could use this hack and do it for real cash then? I am in UK, just wondering if anyone in the UK has implemented this,
da prez
07-22-2004, 07:46 PM
here is a little finding by my forum member, i'm not sure if it is the correct way a vbookie should work. When it odds is 1.7, if we bet 100 points, after the bet is settled, we are getting back our capital (100 points) and our winning (170 points) which is 100 points more, is this a "designed" behaviour of vbookie?
http://www.singaporesoccer.com/forum/showthread.php?t=9753&page=7&pp=15
this is correct because it subtracts initial bet from your total.
if you had $500 and bet $100 your new vCash total is $400
then when bet is settled you get what you bet $100 + wininngs $170 (@1.7 to 1 odds)
that is correct way to do it.
da prez
07-22-2004, 07:54 PM
This seems like a great hack! Thanks!
However, I can't find some features that I would think would be included... Like how can I adjust my users money amounts? Or how do I reset the game so that everybody is back on an even level? Are these options included/on the way?
yes you can adjust any way you see fit by using something like following in your phpadmin :
to reset everyone to whatever ya want use :
UPDATE user SET vbookie_cash=500;
to give money to a certain person use :
UPDATE user SET vbookie_cash=500 WHERE userid=xxxx;
replace x's with userid #
It would be great if I could credit across particular user groups (ie. forum supporters). That would be great.
use the following:
UPDATE user SET vbookie_cash=xxx WHERE usergroup=xx;
fill in xxx's with desired amount and usergroup.
Terriffic hack! It'll be great for the upcoming football season... Hopefully you'll be able to get some of this added functionality in it.
Thanks!
TJ
yes it is, i read on rico's forum he is busy for most of summer, but maybe soon.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.