vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Add-On Releases - vBookie for vBulletin 4 (https://vborg.vbsupport.ru/showthread.php?t=233473)

dartho 01-18-2010 10:00 PM

vBookie for vBulletin 4
 
1 Attachment(s)
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 :o 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

dartho 01-18-2010 10:03 PM

F.A.Q.

Q. Is there a release for 4.2?
A. Not yet, but this post tells you how to get it mostly working:

Q. How can I use vbexperience with vBookie?
A. See this post: https://vborg.vbsupport.ru/showpost....&postcount=435

Q. vBookie page doesn;t display quite right (vBookie 4.0.9 or earlier)
A. Check this post: https://vborg.vbsupport.ru/showthrea...06#post2077906
Q. How can I limit the amount a member may bet?
A. Check this post: https://vborg.vbsupport.ru/showpost....&postcount=678

Will be resolved in next release.

Q. How do I clear all past vBookie events?
A. See: https://vborg.vbsupport.ru/showthrea...87#post1959987

Switch3130 01-18-2010 10:06 PM

Wow bro awesome work.

Edit: How can you edit how is displays in postbit?

Magz 01-18-2010 10:13 PM

Wow,

Did not expect to see this ported....

Thank you

TimberFloorAu 01-18-2010 10:15 PM

Bout Bloody TIME ;) goodonya mate.

Can't wait :up:

Gnoll 01-18-2010 10:21 PM

Tagged for future use :) , looks awsome

Switch3130 01-18-2010 10:22 PM

Every time you change the user group settings they go right back to 'No'

how do we go about fixing this?

dartho 01-18-2010 10:29 PM

rebuild bitfields I think

..../admincp/index.php?do=buildbitfields

bobster65 01-18-2010 10:29 PM

Quote:

Originally Posted by Switch3130 (Post 1959700)
Every time you change the user group settings they go right back to 'No'

how do we go about fixing this?

rebuild bit fields.... append this to your forums domain ...

/admincp/index.php?do=buildbitfields

Switch3130 01-18-2010 10:33 PM

Yeah I ended up finding that in the other thread. Thanks guys for the quick help.

GreigM 01-18-2010 10:33 PM

Awesome to see this ported :-)

dartho 01-18-2010 10:34 PM

Quote:

Originally Posted by Switch3130 (Post 1959682)
Edit: How can you edit how is displays in postbit?

Edit the vBookie: Add Cash to Postbit plugin

Switch3130 01-18-2010 10:38 PM

Quote:

Originally Posted by dartho (Post 1959712)
Edit the vBookie: Add Cash to Postbit plugin

Thanks. :up:

bart6767 01-18-2010 10:41 PM

Thanks .

Zaiaku 01-18-2010 10:42 PM

Quote:

Originally Posted by Magz (Post 1959691)
Wow,

Did not expect to see this ported....

Thank you

I was thinking the exact samething

Trip3151 01-18-2010 10:42 PM

Great MOD tagged this :)

ti07shadow 01-19-2010 06:02 AM

There is a template issue in alignment.
the private betting check mark is on the far left while the rest is centered.

Delilahs 01-19-2010 06:39 AM

Same problem as the last version, where it won't save the permissions on the usergroups as to who can; post, edit or bet

GreigM 01-19-2010 06:46 AM

read the 2nd post how to fix

Delilahs 01-19-2010 06:59 AM

Thanks for the heads up GreigM ;)

all working

jonty 01-19-2010 07:04 AM

fantastic <clicks install> :up:

GreigM 01-19-2010 07:22 AM

How can we change the starting value for vcash? I am sure it was a DB query on the old mod would it still be the same?

Also on the main forum display a vbookie thread displays the poll icon, thread view shows the vbookie icon, would that be able to be changed?

Also when a bet is settled it does not seem to give the details of who won etc

http://i68.photobucket.com/albums/i3...7/39c6cdb7.jpg

other than that all seems great, so nice to see this mod back, thanks :-)

dartho 01-19-2010 07:36 AM

Quote:

Originally Posted by ti07shadow (Post 1959937)
There is a template issue in alignment.
the private betting check mark is on the far left while the rest is centered.

As an initial release, there are bound to be a few things like this. I'll look into this.

Quote:

Originally Posted by GreigM (Post 1959978)
How can we change the starting value for vcash? I am sure it was a DB query on the old mod would it still be the same?

The DB query would be the same, as the DB structure is the same. If you find it before I get around to looking, post it here and I'll link to it in the first post and try and implement at some time.

Quote:

Originally Posted by GreigM (Post 1959978)
Also on the main forum display a vbookie thread displays the poll icon, thread view shows the vbookie icon, would that be able to be changed?

I see that - I'll look into it. :up:

I've notice one or two other "small things" which I'll fix up soon also.

dartho 01-19-2010 07:41 AM

actually - the small things are a little obtrusive, although they won;t affect any data - just look odd to your users, I'll fix up tonight (next few hours) and get a new release out.

If you want to manually get rid of the most obvious one in the mean time, edit the vbookie_eventresults_table template, scroll to the end and you'll see a table with data such as "Hello World" etc. Delete that whole table block :o

To see who won, click on the winning "Outcome" in the thread

GreigM 01-19-2010 07:48 AM

Quote:

Originally Posted by msu2k (Post 1321015)
For people wondering how to reset all user's vCash to 500, you need to execute this SQL query:

UPDATE user SET vbookie_cash=500;

If you totally want to clear all past events as well, execute these SQL queries:

DELETE FROM vbookie_news;
DELETE FROM vbookie_bets_placed;
DELETE FROM vbookie_item_options;
DELETE FROM vbookie_items;
DELETE FROM vbookie_groups;

Run these at your own risk...you may want to backup your DB first before running them. I run these once each year and have not had any problems with them.

from the old thread, just ran it on my install and it set everyone to 1000 which is what I set the vcash too :)

edit: actually this will work for members currently registered but anyone new would still start with 500, would it be possible to add a admincp option to set the default vcash value? I guess the 500 default is set in the xml import, maybe we could just change it in there?

TimberFloorAu 01-19-2010 08:35 AM

Note:

The postbit icon isnt displaying for us.

Also wish to change title of navbar menu name from vbookie to The Bookies

TimberFloorAu 01-19-2010 08:49 AM

Okies Icon is displaying lol ( thought it would be in the postbit ...duhhh)

Ste

btw love the roman numerals postcount on twf

dartho 01-19-2010 08:57 AM

Quote:

Originally Posted by TimberFloorAu (Post 1960014)
Also wish to change title of navbar menu name from vbookie to The Bookies

Edit the vbookie_navbar_link template and change the 2 occurences (currently on 3rd line and 2nd last lines) of {vb:rawphrase vbookie} with what you want...

Other wise you can just change teh phrase "vbookie" to be what you want and this will change all occurences


Quote:

btw love the roman numerals postcount on twf

see here: https://vborg.vbsupport.ru/showthread.php?t=222213 Should work under 4.0 also :up:

dartho 01-19-2010 09:00 AM

Quote:

Originally Posted by GreigM (Post 1959987)
edit: actually this will work for members currently registered but anyone new would still start with 500, would it be possible to add a admincp option to set the default vcash value? I guess the 500 default is set in the xml import, maybe we could just change it in there?

You could edit your database with phpmyadmin and set teh default value for user.vbookie_cash then all new users will start with the default

TimberFloorAu 01-19-2010 09:35 AM

Changed navbar link plugin to:

Code:

if (defined('The Bookies') )
{
    $vbulletin->options['selectednavtab'] = 'The Bookies';
}
$template_hook['navtab_middle'] .= vB_Template::create('vbookie_navbar_link')->render();

Didnt change anything. Will look at phrases

dartho 01-19-2010 09:39 AM

Not plugin changes, that messes up your Navbar links!

Template changes!

TimberFloorAu 01-19-2010 10:04 AM

k so changed it to this:

Code:

<vb:if condition="$vboptions['selectednavtab'] == 'The Bookies'">
<li class="selected">
    <a class="navtab" href="vbookie.php{vb:raw session.sessionurl_q}">{vb:rawphrase vbookie}</a>
<ul class="floatcontainer">
        <li><a href="vbookie.php{vb:raw session.sessionurl_q}">vBookie Home</a></li>
        <li><a href="vbookie.php?{vb:raw session.sessionurl}do=bets">Your Bets</a></li>
        <li><a href="vbookie.php?{vb:raw session.sessionurl}do=stats">Bet Statistics</a></li>
        <li class="popupmenu">
          <a href="javascript://" class="popupctrl">Books</a>
          <ul class="popupbody popuphover">
          <li><a href="vbookie.php?{vb:raw session.sessionurl}type=OPEN">Open Books</a></li>
          <li><a href="vbookie.php?{vb:raw session.sessionurl}type=CLOSED">Closed Books</a></li>
          <li><a href="vbookie.php?{vb:raw session.sessionurl}type=SETTLED">Settled Books</a></li>
          <li><a href="vbookie.php?{vb:raw session.sessionurl}type=ABANDONED">Abandoned Books</a></li>
          </ul>
        </li>
</ul>
</li>
<vb:else />
<li><a class="navtab" href="vbookie.php{vb:raw session.sessionurl_q}">{vb:rawphrase vbookie}</a></li>
</vb:if>

No difference

dartho 01-19-2010 10:24 AM

I'll forgive you as you're English, and you're in Queensland ;)

As stated back a few posts, change {vb:rawphrase vbookie} on the 3rd and the 2nd last lines of that template - they are unchanged in the code you pasted ...

Revert the template, try again :)

shzad1 01-19-2010 11:01 AM

bro pls teach me how 2 use vbookie? any tutorial i dunno how 2 add new bets

GreigM 01-19-2010 11:09 AM

Create a new thread and tick the box for, Yes, post a vBookie Event with this thread, this will open the options for your bet, and odds etc and is well documented in that page :)

jonty 01-19-2010 11:32 AM

Quote:

Originally Posted by GreigM (Post 1959987)
from the old thread, just ran it on my install and it set everyone to 1000 which is what I set the vcash too :)

edit: actually this will work for members currently registered but anyone new would still start with 500, would it be possible to add a admincp option to set the default vcash value? I guess the 500 default is set in the xml import, maybe we could just change it in there?

Code:

ALTER TABLE user CHANGE COLUMN vbookie_cash vbookie_cash BIGINT(20) UNSIGNED NULL DEFAULT 1000  ;
Changes the default value to '1000' for new members (if you've already imported the product)

TimberFloorAu 01-19-2010 11:45 AM

Quote:

Originally Posted by dartho (Post 1960071)
I'll forgive you as you're English, and you're in Queensland ;)

As stated back a few posts, change {vb:rawphrase vbookie} on the 3rd and the 2nd last lines of that template - they are unchanged in the code you pasted ...

Revert the template, try again :)

Without sounding like a Banana Bender could you post the code to change the NAVBAR replacement to "The Bookies"

Simple, Easy ;) thanks

dartho 01-19-2010 11:54 AM

Quote:

Originally Posted by TimberFloorAu (Post 1960114)
Without sounding like a Banana Bender could you post the code to change the NAVBAR replacement to "The Bookies"

Simple, Easy ;) thanks

Here's the code you wanted:
Code:

<vb:if condition="$vboptions['selectednavtab'] == 'vbookie'">
<li class="selected">
    <a class="navtab" href="vbookie.php{vb:raw session.sessionurl_q}">The Bookies</a>
<ul class="floatcontainer">
        <li><a href="vbookie.php{vb:raw session.sessionurl_q}">vBookie Home</a></li>
        <li><a href="vbookie.php?{vb:raw session.sessionurl}do=bets">Your Bets</a></li>
        <li><a href="vbookie.php?{vb:raw session.sessionurl}do=stats">Bet Statistics</a></li>
        <li class="popupmenu">
          <a href="javascript://" class="popupctrl">Books</a>
          <ul class="popupbody popuphover">
          <li><a href="vbookie.php?{vb:raw session.sessionurl}type=OPEN">Open Books</a></li>
          <li><a href="vbookie.php?{vb:raw session.sessionurl}type=CLOSED">Closed Books</a></li>
          <li><a href="vbookie.php?{vb:raw session.sessionurl}type=SETTLED">Settled Books</a></li>
          <li><a href="vbookie.php?{vb:raw session.sessionurl}type=ABANDONED">Abandoned Books</a></li>
          </ul>
        </li>
</ul>
</li>
<vb:else />
<li><a class="navtab" href="vbookie.php{vb:raw session.sessionurl_q}">The Bookies</a></li>
</vb:if>


TimberFloorAu 01-19-2010 12:03 PM

Actually no we havent removed it just Commented it out. I was playing with <!-- and -->

It will be reinstated mate, I NEVER remove copyright from other authors work

TimberFloorAu 01-19-2010 12:17 PM

Reinstated, and all footer copyrights intact ( sorry was playing with target=_blank for your link

Many thanks for your code, all sorted now


All times are GMT. The time now is 06:27 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02007 seconds
  • Memory Usage 1,846KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete