The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
vBookie for vBulletin 4 Details »» | |||||||||||||||||||||||||||||||||||||||
Please See the first post for a F.A.Q. I will endevour to link to useful posts within this thread there as I spot them. You should check there before posting issues etc. This is a port of vBookie for vBulletin 3.5 by Andreas which was a port of vBookie - vBulletin Betting Hack by tjdrico. Permission was given by tjdrico to port this. 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'. 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. Install Instructions 1. Unzip product file 2. Upload files from 'Upload' folder to your forum 3. Install product XML [S]4. Edit "newthread" template as per readme.txt ionstructions[/S] 5. Set usergroup permissions 6. Set vBookie settings 7. Enjoy. 8. Check out Dismounted's Activity Stream addon 9. Click Mark As Installed and Rate Upgrade instructions same as above, but undo edits made in point 4 if upgrading from pre 4.0.7! (see readme.txt for more info) Version Control 4.0.0 (19 Jan '10 ) - Initial Release 4.0.1 (21 Jan '10 ) - Removed some junk from templates, added enable private bets option 4.0.2 (24 Jan '10 ) - fixed options for hiding vcash, added some more stuff to teh settings screen, added some vCash utilities (reset balances, give to everyone, set default balance) and fixed some template bugs. 4.0.3 (25 Jan '10) - fixed bugs I introduced in 4.0.2 see post #109 4.0.4 (25 Jan '10) - fixed time zone not being saved, can delete events, + plus a couple other things. 4.0.5 (Australia Day '10) - no longer uses bitfields for permissions, fixed vCash display, fixed stats page error 4.0.6 (27 Jan '10) - fixed TABLE PREFIX issue in vBookie stats page 4.0.7 (23 Mar '10) - fixed redirect bug when editing events, fixed display of cash holdings in events, added plugin to make template mods (no template mods needed now) and updated code to 4.0.2 standards, added hooks for vbcredits integration. NOTE 0- if upgrading from pre 4.0.7, you will need to eitehr revert your "newthread" temp[late, or manually undo template edits as there is now a plugin which does this for you. Check teh readme.txt in the archive for more info. 4.0.8 (31 May '10) - hopefully fixed bug with updating number of outcomes when editing events. To upgrade from previous version (4.0.7) just overwrite vbookie.php 4.0.9 (25 July 10) - Added ability to select Reputation points for currency. Phrased had coded text. Fixed bug in displaying vCash balance in postbit. 4.2.0 (21 August 12) Added in navigation manager Code for vBulletin 4.2, disabled old nav plugin 4.2.1 (24 January 13) Added missing template, fixed Nav code, fixed some small bugs Download Now
Screenshots
Supporters / CoAuthors Show Your Support
|
7 благодарности(ей) от: | ||
DS MrSinister, gagan007, RichieBoy67, snowlion, talkncaasports, tbworld |
Comments |
#752
|
|||
|
|||
eDIT THE VCASH PHRASE i THINK (oops - caps lock)
|
#753
|
|||
|
|||
Is there a solution for removing the navbar tab but not the subnav options?
I tried both in the options and the plug in but its removes the sub nav options. Thanks in advance |
#754
|
|||
|
|||
Running 4.1.9 vbulletin
installed mod and once filling out all information and trying to submit the event i get the following error message. Code:
Database error in vBulletin 4.1.9: Invalid SQL: UPDATE vb_user SET credits=6 WHERE credits < 6; MySQL Error : Unknown column 'credits' in 'where clause' Error Number : 1054 Request Date : Wednesday, January 11th 2012 @ 06:06:16 PM Error Date : Wednesday, January 11th 2012 @ 06:06:16 PM Script : http://***********.com/vbookie.php Referrer : http://**********.com/vbookie.php IP Address : ************* Username : ******* Classname : vB_Database_MySQLi MySQL Version : 5.1.60-community-log |
#755
|
|||
|
|||
looks like a vbcredits or otehr money add-on integration issue
|
#756
|
|||
|
|||
does this work with vbplaza / vbbux?
|
#757
|
|||
|
|||
Hooks are there so that others can integrate with it - check with the developers
|
#758
|
|||
|
|||
Edit: It is working the code por Functions_vbookie.php to integrate vbbux in Custom.
Code:
<?php // Last updated version 4.0.7 19-02-2010 10:07 function vbookie_get_user_bet_count($item_id=0) { global $vbulletin; $user_n_bets_placed_result = $vbulletin->db->query_first(" SELECT COUNT(bet_id) AS user_n_bets_placed FROM " . TABLE_PREFIX . "vbookie_bets_placed WHERE userid = " . $vbulletin->userinfo['userid'] . " AND item_id = $item_id "); return (int)$user_n_bets_placed_result['user_n_bets_placed']; } function vbookie_get_user_cash() { global $vbulletin; switch ($vbulletin->options['vbookiecash']) { case 'vCash': $cash = (int)$vbulletin->userinfo['vbookie_cash']; break; case 'uCash': $cash = (int)$vbulletin->userinfo['ucash']; break; case 'eBux': $cash = (int)$vbulletin->userinfo['ebux']; break; case 'vbCredits': $cash = (int)$vbulletin->userinfo['credits']; break; case 'Reputation': $cash = (int)$vbulletin->userinfo['reputation']; break; case 'Custom': $cash = (int)$vbulletin->userinfo['vbbux']; break; } return $cash; } function vbookie_take_user_cash($amount) { global $vbulletin; switch ($vbulletin->options['vbookiecash']) { case 'vCash': $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET vbookie_cash=vbookie_cash-$amount WHERE userid=" . $vbulletin->userinfo['userid']); break; case 'uCash': $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET ucash=ucash-$amount WHERE userid=" . $vbulletin->userinfo['userid']); break; case 'eBux': $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET ebux=ebux-$amount WHERE userid=" . $vbulletin->userinfo['userid']); $cash = (int)$vbulletin->userinfo['ebux']; break; case 'vbCredits': $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET credits=credits-$amount WHERE userid=" . $vbulletin->userinfo['userid']); $cash = (int)$vbulletin->userinfo['credits']; break; case 'Reputation': $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET reputation=reputation-$amount WHERE userid=" . $vbulletin->userinfo['userid']); $cash = (int)$vbulletin->userinfo['reputation']; break; case 'Custom': $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET vbbux=vbbux-$amount WHERE userid=" . $vbulletin->userinfo['userid']); $cash = (int)$vbulletin->userinfo['vbbux']; break; } } function vbookie_give_user_cash($userid, $amount) { global $vbulletin; switch ($vbulletin->options['vbookiecash']) { case 'vCash': $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET vbookie_cash=vbookie_cash+$amount WHERE userid=$userid"); break; case 'uCash': $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET ucash=ucash+$amount WHERE userid=$userid"); break; case 'eBux': $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET ebux=ebux+$amount WHERE userid=$userid"); $cash = (int)$vbulletin->userinfo['ebux']; break; case 'vbCredits': $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET credits=credits+$amount WHERE userid=$userid"); $cash = (int)$vbulletin->userinfo['credits']; break; case 'Reputation': $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET reputation=reputation+$amount WHERE userid=$userid"); $cash = (int)$vbulletin->userinfo['reputation']; break; case 'Custom': $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET vbbux=vbbux+$amount WHERE userid=$userid"); $cash = (int)$vbulletin->userinfo['vbbux']; break; } } function vbookie_abandon_event($item_id=0) { global $vbulletin; if ((int)$item_id) { $q = "UPDATE ". TABLE_PREFIX . "vbookie_items SET item_status='ABANDONED' WHERE item_id=$item_id"; $vbulletin->db->query($q); // update running totals $q = "UPDATE " . TABLE_PREFIX . "vbookie_item_options SET option_amount_staked=0, option_n_bets_placed=0 WHERE item_id=$item_id"; $vbulletin->db->query($q); // update running totals $q = "UPDATE " . TABLE_PREFIX . "vbookie_items SET item_n_bets_placed=0, item_amount_staked=0 WHERE item_id=$item_id"; $vbulletin->db->query($q); $result = $vbulletin->db->query_read("SELECT p.userid, p.bet_amount_placed FROM " . TABLE_PREFIX . "vbookie_bets_placed AS p LEFT JOIN " . TABLE_PREFIX . "user AS u ON(u.userid = p.userid) WHERE p.item_id=$item_id"); while ($bet = $vbulletin->db->fetch_array($result)) { // pay the money back vbookie_give_user_cash($bet['userid'], $bet['bet_amount_placed']); } } } function vbookie_get_richest() { global $vbulletin; switch ($vbulletin->options['vbookiecash']) { case 'vCash': $q = "SELECT username, vbookie_cash AS cash FROM " . TABLE_PREFIX . "user ORDER BY cash DESC LIMIT 5"; break; case 'uCash': $q = "SELECT username, ucash AS cash FROM " . TABLE_PREFIX . "user ORDER BY cash DESC LIMIT 5"; break; case 'eBux': $q = "SELECT username, ebux AS cash FROM " . TABLE_PREFIX . "user ORDER BY cash DESC LIMIT 5"; break; case 'vbCredits': $q = "SELECT username, credits AS cash FROM " . TABLE_PREFIX . "user ORDER BY cash DESC LIMIT 5"; break; case 'Reputation': $q = "SELECT username, reputation AS cash FROM " . TABLE_PREFIX . "user ORDER BY cash DESC LIMIT 5"; break; case 'Custom': $q = "SELECT username, vbbux AS cash FROM " . TABLE_PREFIX . "user ORDER BY cash DESC LIMIT 5"; break; } return $vbulletin->db->query_read($q); } function vbookie_do_charity() { global $vbulletin; if ($vbulletin->options['vbookiegivetopoor']) { switch ($vbulletin->options['vbookiecash']) { case 'vCash': $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET vbookie_cash=" . $vbulletin->options['vbookiegivetopoor'] . " WHERE vbookie_cash < " . $vbulletin->options['vbookiegivetopoor']); break; case 'uCash': $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET ucash=" . $vbulletin->options['vbookiegivetopoor'] . " WHERE ucash < " . $vbulletin->options['vbookiegivetopoor']); break; case 'eBux': $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET ebux=" . $vbulletin->options['vbookiegivetopoor'] . " WHERE ebux < " . $vbulletin->options['vbookiegivetopoor']); break; case 'vbCredits': $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET credits=" . $vbulletin->options['vbookiegivetopoor'] . " WHERE credits < " . $vbulletin->options['vbookiegivetopoor']); break; case 'Reputation': $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET reputation=" . $vbulletin->options['vbookiegivetopoor'] . " WHERE reputation < " . $vbulletin->options['vbookiegivetopoor']); break; case 'Custom': $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET vbbux=" . $vbulletin->options['vbookiegivetopoor'] . " WHERE vbbux < " . $vbulletin->options['vbookiegivetopoor']); break; } } } function vbookie_delete_event($eventinfo) { global $vbulletin; ($hook = vBulletinHook::fetch_hook('vbookie_delete_event')) ? eval($hook) : false; // if we're deleting an event that has bets on it but hasn't yet been settled, // we must give people their money back. if ($eventinfo['item_status'] == 'OPEN' OR $eventinfo['item_status'] == 'CLOSED') { // abandon the bet vbookie_abandon_event($eventinfo['item_id']); } $vbulletin->db->query_write("DELETE FROM ". TABLE_PREFIX . "vbookie_bets_placed WHERE item_id=$eventinfo[item_id]"); $vbulletin->db->query_write("DELETE FROM ". TABLE_PREFIX . "vbookie_item_options WHERE item_id=$eventinfo[item_id]"); $vbulletin->db->query_write("DELETE FROM ". TABLE_PREFIX . "vbookie_items WHERE item_id=$eventinfo[item_id]"); // update the thread this was attached to to remove the event. $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "thread SET vbookie_item_id=0 WHERE vbookie_item_id=$eventinfo[item_id]"); } function vbookie_reset_vcash($amount) { global $vbulletin; $q = "UPDATE " . TABLE_PREFIX . "user SET vbookie_cash =".$amount; return $vbulletin->db->query($q); } function vbookie_set_default_vcash($amount) { global $vbulletin; $q = "ALTER TABLE " . TABLE_PREFIX . "user CHANGE COLUMN vbookie_cash vbookie_cash BIGINT(20) UNSIGNED NULL DEFAULT ".$amount; return $vbulletin->db->query($q); } function vbookie_give_users_vcash($amount) { global $vbulletin; $q="UPDATE " . TABLE_PREFIX . "user SET vbookie_cash=vbookie_cash+$amount"; return $vbulletin->db->query($q); } // Additional pay/debit bookie function vbookie_take_bookie_cash($userid, $amount) { global $vbulletin; $bookie = $vbulletin->db->query_first("SELECT * FROM " . TABLE_PREFIX . "user WHERE userid=$userid"); switch ($vbulletin->options['vbookiecash']) { case 'vCash': if($amount > $bookie['vbookie_cash']) { $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET vbookie_cash=0 WHERE userid=$userid"); } else { $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET vbookie_cash=vbookie_cash-$amount WHERE userid=$userid"); } break; case 'uCash': if($amount > $bookie['ucash']) { $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET ucash=0 WHERE userid=$userid"); } else { $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET ucash=ucash-$amount WHERE userid=$userid"); } break; case 'eBux': if($amount > $bookie['ebux']) { $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET ebux=0 WHERE userid=$userid"); } else { $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET ebux=ebux-$amount WHERE userid=$userid"); } break; case 'Custom': if($amount > $bookie['vbbux']) { $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET vbbux=0 WHERE userid=$userid"); } else { $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET vbbux=vbbux-$amount WHERE userid=$userid"); } break; } } ?> |
#759
|
|||
|
|||
Freshly installed on 4.0.4 - didn't do any template edits as instructed, activated everything, set usergroups ok and i still am not seeing anything under threads to create a bookie event (however i DO see a vbulletin menu up top).
When i go into usergroup perms for admins / supermods (groups who should be able to create events) - vbookie/vbulletin won't save the allow vbulletin options. HELP.! |
#760
|
||||
|
||||
Quote:
rebuild bit fields.... append this to your forums domain ... /admincp/index.php?do=buildbitfields __________________:up: |
#761
|
|||
|
|||
Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|