vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   vBookie for vBulletin 3.5 (https://vborg.vbsupport.ru/showthread.php?t=94128)

CLF 05-20-2009 02:28 AM

Quote:

Originally Posted by JJ the Fox (Post 1813832)
Yes.

Thank you JJ.

I installed everything but one thing I can't find:

Code:

In Template navbar
  FIND
  --------------------------------------------------
  <td class="vbmenu_control"><a href="calendar.php?$session[sessionurl]">$vbphrase[calendar]</a></td>

Because below that I am supposed to add:

Code:

  --------------------------------------------------

  BELOW that ADD
  --------------------------------------------------
  <td class="vbmenu_control"><a href="vbookie.php?$session[sessionurl]">$vbphrase[vbookie]</a></td>



Not sure if it would work without this because to me it looks like a navbar shortcut.

CLF 05-20-2009 02:29 AM

Here is my navbar and I can't figure out where to add that code:

Code:

<script type="text/javascript">
<!--
function openChatbox () {
        chatbox = window.open('chatbox.php','chatbox','height=330,width=650,directories=no,location=no,menubar=no,resizable=yes,status=no,toolbar=no,scrollbars=yes');
}
//-->
</script>
<!-- breadcrumb, login, pm info -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
        <td class="alt1" width="100%">
                <if condition="is_array($navbits)">
                        <table cellpadding="0" cellspacing="0" border="0">
                        <tr valign="bottom">
                                <td><a href="#" onclick="history.back(1); return false;"><img src="$stylevar[imgdir_misc]/navbits_start.gif" alt="$vbphrase[go_back]" border="0" /></a></td>
                                <td>&nbsp;</td>
                                <td width="100%"><span class="navbar"><a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1">$vboptions[bbtitle]</a></span> $navbits[breadcrumb]</td>
                        </tr>
                        <tr>
                                <td class="navbar" style="font-size:10pt; padding-top:1px" colspan="3"><if condition="$_SERVER['REQUEST_METHOD'] == 'POST'"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_finallink_$stylevar[textdirection].gif" alt="" border="0" /><else /><a href="$scriptpath"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_finallink_$stylevar[textdirection].gif" alt="$vbphrase[reload_this_page]" border="0" /></a></if> <strong>$navbits[lastelement]</strong></td>
                        </tr>
                        </table>                       
                <else />
                        <div class="navbar" style="font-size:10pt"><a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_start.gif" alt="" border="0" /></a> <strong>$vboptions[bbtitle]</strong></div>
                </if>
        </td>       
       
        <if condition="$show['member']">
       
                <td class="alt2" valign="top" nowrap="nowrap">
                <div class="smallfont">
                        <strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong><br />
                        <phrase 1="$pmbox[lastvisitdate]" 2="$pmbox[lastvisittime]">$vbphrase[last_visited_x_at_y]</phrase>
                        <if condition="$show['pmstats']"><br /><phrase 1="$vbphrase[unread_x_nav_compiled]" 2="$vbphrase[total_x_nav_compiled]" 3="$session[sessionurl_q]">$vbphrase[private_messages_nav]</phrase></if>
                        <if condition="$show['pmwarning']"><br /><strong><phrase 1="$vbphrase[pmpercent_nav_compiled]">$vbphrase[your_pm_box_is_x_full]</phrase></strong></if>
                </div>
                </td>
               
        <else />
               
                <td class="alt2" nowrap="nowrap" style="padding:0px">
                       
                <!-- login form -->
                <form action="login.php?do=login" method="post" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, $show[nopasswordempty])">
                <script type="text/javascript" src="clientscript/vbulletin_md5.js?v=$vboptions[simpleversion]"></script>
                <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
                <tr>
                        <td class="smallfont"><label for="navbar_username">$vbphrase[username]</label></td>
                        <td><input type="text" class="bginput" style="font-size: 11px" name="vb_login_username" id="navbar_username" size="10" accesskey="u" tabindex="101" value="$vbphrase[username]" onfocus="if (this.value == '$vbphrase[username]') this.value = '';" /></td>
                        <td class="smallfont" colspan="2" nowrap="nowrap"><label for="cb_cookieuser_navbar"><input type="checkbox" name="cookieuser" value="1" tabindex="103" id="cb_cookieuser_navbar" accesskey="c" />$vbphrase[remember_me]</label></td>
                </tr>
                <tr>
                        <td class="smallfont"><label for="navbar_password">$vbphrase[password]</label></td>
                        <td><input type="password" class="bginput" style="font-size: 11px" name="vb_login_password" id="navbar_password" size="10" tabindex="102" /></td>
                        <td><input type="submit" class="button" value="$vbphrase[log_in]" tabindex="104" title="$vbphrase[enter_username_to_login_or_register]" accesskey="s" /></td>
                </tr>
                </table>
                <input type="hidden" name="s" value="$session[sessionhash]" />
                <input type="hidden" name="do" value="login" />               
                <input type="hidden" name="vb_login_md5password" />
                <input type="hidden" name="vb_login_md5password_utf" />
                </form>
                <!-- / login form -->
                       
                </td>
               
        </if>       
       
</tr>
</table>
<!-- / breadcrumb, login, pm info -->
<br />
<if condition="$show['forumdesc']">
        <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
        <tr>
                <td class="alt1" width="100%"><strong>$foruminfo[title]</strong> <span class="smallfont">$foruminfo[description]</span></td>
        </tr>
        </table>
        <br />
</if>

<if condition="$show['popups']">
<!-- NAVBAR POPUP MENUS -->
       
        <if condition="$show['searchbuttons']">
        <!-- header quick search form -->
        <div class="vbmenu_popup" id="navbar_search_menu" style="display:none">
                <table cellpadding="4" cellspacing="1" border="0">
                <tr>
                        <td class="thead">$vbphrase[search_forums]</td>
                </tr>
                <tr>
                        <td class="vbmenu_option" title="nohilite">
                                <form action="search.php?do=process" method="post">
                                        <input type="hidden" name="do" value="process" />
                                        <input type="hidden" name="quicksearch" value="1" />
                                        <input type="hidden" name="childforums" value="1" />
                                        <input type="hidden" name="exactname" value="1" />
                                        <input type="hidden" name="s" value="$session[sessionhash]" />
                                        <div><input type="text" class="bginput" name="query" size="25" tabindex="1001" /><input type="submit" class="button" value="$vbphrase[go]" tabindex="1004" /></div>
                                        <div style="margin-top:$stylevar[cellpadding]px">
                                                <label for="rb_nb_sp0"><input type="radio" name="showposts" value="0" id="rb_nb_sp0" tabindex="1002" checked="checked" />$vbphrase[show_threads]</label>
                                                &nbsp;
                                                <label for="rb_nb_sp1"><input type="radio" name="showposts" value="1" id="rb_nb_sp1" tabindex="1003" />$vbphrase[show_posts]</label>
                                        </div>                                       
                                </form>
                        </td>
                </tr>
                <tr>
                        <td class="vbmenu_option"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[advanced_search]</a></td>
                </tr>
                $template_hook[navbar_search_menu]
                </table>
        </div>
        <!-- / header quick search form -->
        </if>

        <if condition="$show['member']">
        <!-- user cp tools menu -->
        <div class="vbmenu_popup" id="usercptools_menu" style="display:none">
                <table cellpadding="4" cellspacing="1" border="0">
               
                <tr><td class="thead">$vbphrase[quick_links]</td></tr>               
                <if condition="$vboptions['enablesearches']"><tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getdaily">$vbphrase[todays_posts]</a></td></tr></if>
                <tr><td class="vbmenu_option"><a href="forumdisplay.php?$session[sessionurl]do=markread">$vbphrase[mark_forums_read]</a></td></tr>
                <tr><td class="vbmenu_option"><a href="#" onclick="window.open('misc.php?$session[sessionurl]do=buddylist&amp;focus=1','buddylist','statusbar=no,menubar=no,toolbar=no,scrollbars=yes,resizable=yes,width=250,height=300'); return false;">$vbphrase[open_buddy_list]</a></td></tr>
                $template_hook[navbar_quick_links_menu_pos1]
                               
                <tr><td class="thead"><a href="usercp.php$session[sessionurl_q]">$vbphrase[user_control_panel]</a></td></tr>
                <if condition="$show['siglink']"><tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editsignature">$vbphrase[edit_signature]</a></td></tr></if>
                <!--<if condition="$show['avatarlink']"><tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editavatar">$vbphrase[edit_avatar]</a></td></tr></if>-->
                <tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editprofile">$vbphrase[edit_profile]</a></td></tr>
                <tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editoptions">$vbphrase[edit_options]</a></td></tr>
                $template_hook[navbar_quick_links_menu_pos2]
               
                <tr><td class="thead">$vbphrase[miscellaneous]</td></tr>
                <if condition="$show['pmmainlink']"><tr><td class="vbmenu_option"><a href="private.php$session[sessionurl_q]" rel="nofollow">$vbphrase[private_messages]</a></td></tr></if>
                <tr><td class="vbmenu_option"><a href="subscription.php$session[sessionurl_q]" rel="nofollow">$vbphrase[subscribed_threads]</a></td></tr>
                <tr><td class="vbmenu_option"><a href="member.php?$session[sessionurl]u=$bbuserinfo[userid]">$vbphrase[my_profile]</a></td></tr>
                <if condition="$show['wollink']"><tr><td class="vbmenu_option"><a href="online.php$session[sessionurl_q]">$vbphrase[whos_online]</a></td></tr></if>
                $template_hook[navbar_quick_links_menu_pos3]
               
                </table>
        </div>
        <!-- / user cp tools menu -->
        </if>
<!-- / NAVBAR POPUP MENUS -->

<!-- PAGENAV POPUP -->

        <div class="vbmenu_popup" id="pagenav_menu" style="display:none">
                <table cellpadding="4" cellspacing="1" border="0">
                <tr>
                        <td class="thead" nowrap="nowrap">$vbphrase[go_to_page]</td>
                </tr>
                <tr>
                        <td class="vbmenu_option" title="nohilite">
                        <form action="$vboptions[forumhome].php" method="get" onsubmit="return this.gotopage()" id="pagenav_form">
                                <input type="text" class="bginput" id="pagenav_itxt" style="font-size:11px" size="4" />
                                <input type="button" class="button" id="pagenav_ibtn" value="$vbphrase[go]" />
                        </form>
                        </td>
                </tr>
                </table>
        </div>

<!-- / PAGENAV POPUP -->
</if>



<!-- / PAGENAV POPUP -->
</if>

<if condition="THIS_SCRIPT=='index' OR THIS_SCRIPT=='forumdisplay'">

<br>

<center><script language="javascript" type="text/javascript">

            <!--//

            document.write('<iframe src="http://bodogticker.bodoglife.com/flashticker/ticker_728x90.php?affiliateID=2589331-10DF6" width="728" height="90" frameborder="0" marginwidth="0" magingheight="0">');

            document.write('</iframe>');

            //-->

</script></center>

<br>

<!-- rightside column -->
<table border="0" width="100%" class="page" cellspacing="0" cellpadding="0" align="center">
<tr>
        <td valign="top">
<!-- / rightside column -->
</if>
$afm_menu
$welcomeheaders
$lgvmessage


Biker_GA 05-20-2009 02:58 AM

Check your header template.

CLF 05-20-2009 03:20 AM

Quote:

Originally Posted by Biker_GA (Post 1813856)
Check your header template.

Yeah! It was there! THANK YOU!

Now everything looks like installed but when I try to edit usergroup (admin first) and I set vBookie to 'all yes', and click update - nothing happens. :confused:
I went to Forums & Moderators and the same thing happens - I set it to 'yes' but it automatically changes it to 'no'

Biker_GA 05-20-2009 03:32 AM

It's been eons since I've run this particular modification. Can't remember all the locations you need to set with this one.

CLF 05-20-2009 03:35 AM

Quote:

Originally Posted by Biker_GA (Post 1813871)
It's been eons since I've run this particular modification. Can't remember all the locations you need to set with this one.

Thank you for the response, Biker.

Yeah, I don't know. It doesn't wanna change from 'no' to 'yes' in usergroup and forums & moderators. I checked under vBulletin Options and it says that it's active. I see it in the navbar and when I click on it it looks fine. But I can't make it turn on :(

In usergroup manager it says:

vBookie Event Permissions
Can Post vBookie Events No
Can Edit other people's vBookie Events No
Can Bet on vBookie Events No

and I cannot set it to yes :(

CLF 05-20-2009 04:04 AM

Ok, now I rebuilt bitfields and I was able to edit the usergroup manager.

But when I wanted to test how it works I got this error:

Parse error: syntax error, unexpected '<' in /home/cappersl/public_html/forum/newthread.php(244) : eval()'d code on line 5"

Anyone, please?
Thank you!

CLF 05-20-2009 11:35 AM

A friendly bump. :)

Biker_GA 05-20-2009 12:04 PM

If you look at the top, it does say this mod isn't compatible with 3.6+. ;)

CLF 05-20-2009 12:25 PM

Quote:

Originally Posted by Biker_GA (Post 1814033)
If you look at the top, it does say this mod isn't compatible with 3.6+. ;)

Oh, but it is. I asked in here before I installed it, members confirmed and I checked couple of 3.6.7 PL1 boards and it works just fine. And there is something about this error (probably something in vbookie.php) but I don't know what it is or how to fix it.

Parse error: syntax error, unexpected '<' in /home/cappersl/public_html/forum/newthread.php(244) : eval()'d code on line 5"

Thanks a million to whoever has a suggestion or the instruction on how to fix this issue.

DobieGillis? 05-20-2009 01:30 PM

Quote:

Originally Posted by CLF (Post 1814041)
Oh, but it is. I asked in here before I installed it, members confirmed and I checked couple of 3.6.7 PL1 boards and it works just fine. And there is something about this error (probably something in vbookie.php) but I don't know what it is or how to fix it.

Parse error: syntax error, unexpected '<' in /home/cappersl/public_html/forum/newthread.php(244) : eval()'d code on line 5"

Thanks a million to whoever has a suggestion or the instruction on how to fix this issue.

mine is working on 3.8.2

CLF 05-20-2009 03:41 PM

A bit different but this is the error I'm getting now every time I try to start new thread:

Parse error: syntax error, unexpected $end in /home/cappersl/public_html/newthread.php(244) : eval()'d code on line 5

I really hope someone could help me here.

THANK YOU IN ADVANCE! :)

CLF 05-20-2009 04:11 PM

Quote:

Originally Posted by CLF (Post 1814171)
A bit different but this is the error I'm getting now every time I try to start new thread:

Parse error: syntax error, unexpected $end in /home/cappersl/public_html/newthread.php(244) : eval()'d code on line 5

I really hope someone could help me here.

THANK YOU IN ADVANCE! :)

I found the error!!! :)

There was "}" missing in "vBookie: Redirect to vbookie.php when posting new Event" plugin at the very end.

sportwiz628 05-21-2009 12:43 AM

So would this work on my 3.8.2 forum?

Please answer..thanks!

Biker_GA 05-21-2009 01:06 AM

Extremely doubtful...

sportwiz628 05-21-2009 01:11 AM

What do you think would happen if I tried it out though.

DS MrSinister 05-21-2009 09:36 AM

here is the fixed for 3.6 +. make sure you do all the edits and rebuilld bitfields...

https://vborg.vbsupport.ru/showthrea...92#post1035092

theybannedme 05-27-2009 09:20 PM

Quote:

Originally Posted by Hiranmanu (Post 1770679)
I have this working for 3.8.1 PL1. This works for any forum version with the right modifications done. I will write up exactly what you guys need to do to get it working.


1: Upload all files in upload folder
2: Import product-bookiehack.xml
3: Goto ACP > Plugins & Products > Plugin Manager
4: Edit Redirect to vbookie.php when posting new Event by replacing the entire code with this
PHP Code:

if ($newpost['postvbookieevent'])  
{  
    
$vbulletin->url 'vbookie.php?' $vbulletin->session->vars['sessionurl'] . "t=$newpost[threadid]&vbookieeventoptions=$newpost[vbookieeventoptions]&do=newevent";  
    eval(
print_standard_redirect('redirect_postthanks_moderate'truefalse)); 


5: In template Newthread find
PHP Code:

$threadmanagement 

. Above that add the following code
PHP Code:

<if condition="$show['vbookieevent']">
    <
fieldset class="fieldset">
        <
legend>$vbphrase[post_a_vbookieevent]</legend>
        <
div style="padding:$stylevar[formspacer]px">
            <
div><label for="cb_postvbookieevent"><input type="checkbox" name="postvbookieevent" value="yes" id="cb_postvbookieevent" tabindex="1" $checked[postvbookieevent] />$vbphrase[yes_post_a_vbookieevent_thread]</label></div>
        </
div>
    </
fieldset>
   </if> 

6: Download ICash and install
7: Change ICash Options. Change the Money Row to vbookie_cash


This will definately work for you. I have left off showing the points in the postbit and the link in the navbar. If you need to add these the code is the same as the original.

Sorry but where exactly does Step #4 go? Thanks!

DS MrSinister 05-28-2009 12:14 PM

*theybannedme

step 4 is the code replacement

just login to your admincp and goto Plugin & Products under this goto plugin manager and find vBookie: Redirect to vbookie.php when posting new Event and repalce the code with step 4.

powerful_rogue 05-28-2009 06:52 PM

Quote:

Originally Posted by sportwiz628 (Post 1814408)
So would this work on my 3.8.2 forum?

Please answer..thanks!

Works fine on 3.8.2

merk_aus 05-30-2009 06:40 AM

Ok Guys - I have started recoding this, slowly seem I am only new to coding - I am coding it all up to meet the new standards outlined by vBulletin. I can say that it will not work on vb4.0 when it is released - when the coding is finished it will however work on 3.8.x

Ok so here are some new features etc that will be in the new version:-
+ Ajax Betting Updates
You can open a betting event at 1/1 and when people bet on something the odds will improve for that bet, just like proper betting the odds will move up and down depending on what people are betting on - if someone bets 1000 credits on 1 event obviously that teams odds will become shorter while the other teams will blow out.

+ Ability to cater for Horse Racing
There will be a new selection option where you can select if this is a Horse Racing Event, this would allow you to add a "Place/Show" odds as well, this would also help if you run a motorsport betting system - you would be able to bet on a win or placing.

+ Easier installation
Our aim is to provide an easier installation, with limited template edits, we are hoping to make it a product install only - however as I mentioned I am only new to coding and therefore it would depend on how well things go.

-------------
I am still open to ideas, and am open to anyone with coding knowledge to help me out.

At the moment I am the only one Andreas has given the re-code permission to and my hope is to try and get this set up and running well... to work on 3.8.x and we will have to see what the coding involved with 4.0 is before deciding whether it would work on there.

If you are interested in helping please pm me.

dancue 05-30-2009 12:27 PM

Quote:

Originally Posted by merk_aus (Post 1819979)
Ok Guys - I have started recoding this, slowly seem I am only new to coding - I am coding it all up to meet the new standards outlined by vBulletin. I can say that it will not work on vb4.0 when it is released - when the coding is finished it will however work on 3.8.x

Ok so here are some new features etc that will be in the new version:-
+ Ajax Betting Updates
You can open a betting event at 1/1 and when people bet on something the odds will improve for that bet, just like proper betting the odds will move up and down depending on what people are betting on - if someone bets 1000 credits on 1 event obviously that teams odds will become shorter while the other teams will blow out.

+ Ability to cater for Horse Racing
There will be a new selection option where you can select if this is a Horse Racing Event, this would allow you to add a "Place/Show" odds as well, this would also help if you run a motorsport betting system - you would be able to bet on a win or placing.

+ Easier installation
Our aim is to provide an easier installation, with limited template edits, we are hoping to make it a product install only - however as I mentioned I am only new to coding and therefore it would depend on how well things go.

-------------
I am still open to ideas, and am open to anyone with coding knowledge to help me out.

At the moment I am the only one Andreas has given the re-code permission to and my hope is to try and get this set up and running well... to work on 3.8.x and we will have to see what the coding involved with 4.0 is before deciding whether it would work on there.

If you are interested in helping please pm me.

YES!!

About time someone takes this on!! I have mine working for 3.8 already, but I would love to have the new features.

I'll definitely be dropping a few suggestions in this thread when I get them. The ones you mentioned already sound great!

dancue 05-31-2009 01:06 PM

For starters, I'd like for my users to be able to make bets between other users. If a person wants to bet x amount of money on a certain event, they can post it along with the amount of people (limit) they'd like to bet that amount against.

Whoever creates a bet can send people invites to bet, or anyone can bet depending on what that user wants to do.

highblue 06-01-2009 11:29 PM

Quote:

Originally Posted by merk_aus (Post 1819979)
Ok Guys - I have started recoding this, slowly seem I am only new to coding - I am coding it all up to meet the new standards outlined by vBulletin. I can say that it will not work on vb4.0 when it is released - when the coding is finished it will however work on 3.8.x

Ok so here are some new features etc that will be in the new version:-
+ Ajax Betting Updates
You can open a betting event at 1/1 and when people bet on something the odds will improve for that bet, just like proper betting the odds will move up and down depending on what people are betting on - if someone bets 1000 credits on 1 event obviously that teams odds will become shorter while the other teams will blow out.

+ Ability to cater for Horse Racing
There will be a new selection option where you can select if this is a Horse Racing Event, this would allow you to add a "Place/Show" odds as well, this would also help if you run a motorsport betting system - you would be able to bet on a win or placing.

+ Easier installation
Our aim is to provide an easier installation, with limited template edits, we are hoping to make it a product install only - however as I mentioned I am only new to coding and therefore it would depend on how well things go.

-------------
I am still open to ideas, and am open to anyone with coding knowledge to help me out.

At the moment I am the only one Andreas has given the re-code permission to and my hope is to try and get this set up and running well... to work on 3.8.x and we will have to see what the coding involved with 4.0 is before deciding whether it would work on there.

If you are interested in helping please pm me.

Really can't thank you enough for working on this! I sure wish I could write code because I'd be trying to help every step of the way. As it is, about all I can offer are a few suggestions.

I'll just hit the first two off the top of my head... the Edit VBookie Event function should be a clickable button instead of clickable white text. That's already confused a couple of people in my forum, and I'll admit it's not as people-friendly as it could be... more easily visible, that is.

I'd also go back to an earlier suggestion. People should have the option to change their bets before the cut-off date. Particularly in the case of horseracing, that would clean up any problems connected to scratched horses. We ran into that issue last weekend, and it wasn't a problem for me to go into Admin CP and give them their points back, but if they'd been able to change their own bets, it would've saved me some time. Besides, horseracing bettors will often change their minds anyway. ;)

I'm sure I'll have more suggestions as you go along, but those two are at the top of the list right now... sorry, and one other problem. The other day, when a horse scratched out of a race, I tried to change the Number of Outcomes. So I reduced the Number of Outcomes by one and clicked the button to Update Event. Even though it was supposed to reduce the number by one (I assume, since I changed the number), it still showed the same Number of Outcomes as the original setting after I'd clicked Update. In short, reducing the Number of Outcomes had no effect at all. It wasn't a major problem... just a glitch in the original code, I suppose.

Thanks again, and I'll try to come up with some more suggestions. I really think this could be a MOTM because it's definitely got tons of potential. I'd vote for it!

Biker_GA 06-01-2009 11:34 PM

I'd love to see this mod back on my site. We used to bet on everything! :D

highblue 06-01-2009 11:51 PM

One of the bettors on my site just brought up a really good and very important point.

vBookie would be more workable for horseracing if the Ajax calculations for a pari-mutuel type of betting system could be disabled. We've got some excellent handicappers in our forum, and if all of them bet on the same horse, or even if most of them bet on the same horse - knowing it's going to win - then the vBookie odds on that race wouldn't even come close to reflecting the real world odds in the race.

In the real world race, that winning horse might go off at 1-1 or better, but in the vBookie race with most of the people betting on it, the horse could go off at 1-20 odds.

So for horseracing purposes, ideally we would have the option to disable the Ajax function that's calculating the odds based on the amounts being bet on the event. It might also be useful to have the option of disabling it for other events too.

New Joe 06-03-2009 03:43 AM

I downloaded this but it doesn't seem to work,

I clicked on Manage Products in my Admin Panel, then added Import and Imported the product XML, all installed but it doesn't work.
It show in my vBulletin Options but when I go to make a Thread the option isn't there to use the vBookie.
Any ideas why?

markhendo1986 06-03-2009 08:16 AM

Quote:

Originally Posted by markhendo1986 (Post 1808466)
Hi there,

Got this installed and all is up and running. Members are able to post a new event to bet on and are able to bet/settle bets.

However, when members are betting, their vCash doesn't go down and automatically returns to 500 vCash even after betting and losing their cash.

Any ideas how to fix this? I've not been 'giving to the poor' or anything like that...

Is anybody able to help me regarding this problem? I've managed to get this up and running in the past before but for some reason, this just isn't happening...

DS MrSinister 06-03-2009 12:53 PM

Quote:

Originally Posted by New Joe (Post 1822530)
I downloaded this but it doesn't seem to work,

I clicked on Manage Products in my Admin Panel, then added Import and Imported the product XML, all installed but it doesn't work.
It show in my vBulletin Options but when I go to make a Thread the option isn't there to use the vBookie.
Any ideas why?

sounds like you are running vb 3.6 or high.. you need to apply the fix and make the template edits. so it will work..

https://vborg.vbsupport.ru/showthrea...92#post1035092

New Joe 06-03-2009 02:19 PM

Quote:

Originally Posted by DS MrSinister (Post 1822710)
sounds like you are running vb 3.6 or high.. you need to apply the fix and make the template edits. so it will work..

https://vborg.vbsupport.ru/showthrea...92#post1035092

Done that but it still doesn't show in the options when I go to start a new Thread.

DS MrSinister 06-04-2009 12:09 AM

did you set the usergroup permissions?

New Joe 06-04-2009 09:23 AM

Quote:

Originally Posted by DS MrSinister (Post 1823045)
did you set the usergroup permissions?

There's nothing showing in the usergroup permissions about it.:(

DS MrSinister 06-05-2009 05:54 PM

reupload the files

and

rebuild bitfields

admincp/index.php?do=buildbitfields

DobieGillis? 06-08-2009 09:58 PM

Quote:

Originally Posted by Paul M (Post 1035092)
vBookie & 3.6

The posting of vbookie events in 3.6 is broken because the hook used has moved.

To fix this problem, the following plugin must be edited ;


vBookie: Redirect to vbookie.php when posting new Event

Replace the plugin code with this ;

PHP Code:

if ($newpost['postvbookieevent']) 

    
$vbulletin->url 'vbookie.php?' $vbulletin->session->vars['sessionurl'] . "t=$newpost[threadid]&vbookieeventoptions=$newpost[vbookieeventoptions]&do=newevent"
    eval(
print_standard_redirect('redirect_postthanks_moderate'truefalse));


Note: I'm not actually using vbookie atm so I can't comment on any other problems.

you rock!

mike2902 06-10-2009 02:20 AM

This is good news..Id like to see the ability to put in a spread for games. Or put straight up odds for boxing and the like.

CyprusTM 06-22-2009 04:29 AM

is this good for Football (soccer) predictions? when will it be available for version 3.8 ?

Id love to use this on my forum for the upcoming season

Cheers

aranthorn 07-06-2009 02:24 PM

If you want to use vbbux as the cash system, here's what your functions_vbookie.php file should contain.

I just made the edits and tested it out, works fine.

This is a copy of the ENTIRE contents of that file.

PHP Code:

<?php
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['vbbux'];
            break;
        case 
'custom':
            (
$hook vBulletinHook::fetch_hook('vbookie_get_user_cash')) ? eval($hook) : false;
        
    }
    
    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 vbbux=vbbux-$amount WHERE userid=" $vbulletin->userinfo['userid']);    
            
$cash = (int)$vbulletin->userinfo['ebux'];
            break;
        case 
'custom':
            (
$hook vBulletinHook::fetch_hook('vbookie_take_user_cash')) ? eval($hook) : false;
        
    }
}

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 vbbux=vbbux+$amount WHERE userid=$userid");    
            
$cash = (int)$vbulletin->userinfo['vbbux'];
            break;
        case 
'custom':
            (
$hook vBulletinHook::fetch_hook('vbookie_give_user_cash')) ? eval($hook) : false;
        
    }
}

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, vbbux AS cash FROM " TABLE_PREFIX "user ORDER BY cash DESC LIMIT 5";    
            break;
        case 
'custom':
            (
$hook vBulletinHook::fetch_hook('vbookie_get_richest')) ? eval($hook) : false;
    
    }

    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 vbbux=" $vbulletin->options['vbookiegivetopoor'] . " WHERE vbbux < " $vbulletin->options['vbookiegivetopoor']);    
                break;
            case 
'custom':
                (
$hook vBulletinHook::fetch_hook('vbookie_do_charity')) ? eval($hook) : false;
        
        }
    }
}

function 
vbookie_delete_event($eventinfo)
{
    global 
$vbulletin;
    
// 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]");
}
?>


aranthorn 07-06-2009 02:26 PM

Quote:

Originally Posted by CyprusTM (Post 1834537)
is this good for Football (soccer) predictions? when will it be available for version 3.8 ?

Id love to use this on my forum for the upcoming season

Cheers

That's exactly what I had to install it for.

Running on 3.7.1 (because I got sick of upgrading vbulletin every 2 weeks)

Viruseater 07-15-2009 01:47 AM

this has probably been covered but in a thread with 150 pages of replies, and the terrible search engine vb has I can't find this answer.

I've got everything working, except changing the dates of the lines opening. I can't edit or set either. does this make sense? I need to stop an event on aug 1 but it stays at the date i made the event at 1am.

thoughts?

Chase 07-20-2009 08:22 PM

Any updates on the progress of the rewrite of this script. I really want to use this... but I want a stable version.

Out of curiosity.... does anyone with 3.8.3 installed have it working while using these instructions? https://vborg.vbsupport.ru/showpost....postcount=2152. If so, are these the ONLY instructions necessary needed to get this to work on 3.8.3?


All times are GMT. The time now is 01:57 AM.

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

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03984 seconds
  • Memory Usage 2,057KB
  • 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
  • (3)bbcode_code_printable
  • (5)bbcode_php_printable
  • (16)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)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