Midnight Modding

Betting

772 posts in this topic

Betting

View File

This is currently not totally compatible beyond ip.board 3.4.7. If you upgrade to 3.4.8 it is going to add paragraph html tags to titles, descriptions, etc... On the public end you won't notice it, but they're there.

This is a sports betting system I have been using and adding features to for years. It can be used to bet points on anything despite being designed for sports. It is not meant to be used for gambling with anything of value or to be used in any other illegal manner. It does have a built in point system, although some stats are better if you have a separate point system. Also members would start with no points to bet with the included system wheras standalone point systems give them ways of earning points.

This almost certainly won't work well if you're using strict modes or similar for PHP or MySQL. And it likely won't work with MS SQL either. I'll try to fix issues and also have it compatible at a later date, but it's uncertain when it would be.
 
5.0.0 Notes: technically if a bracket costs negative amount and it's canceled, there could be a DB error due to it going below zero in a field that doesn't allow it for some point systems. Also, the upgrade process is VERY long, going through about 15 version upgrades and doing many, many changes. It's best that you pay out all unpaid matchups before upgrading, but it is not necessary. I have tested everything and it seems to go through the upgrade routine properly, despite so many complicated changes.

It is strongly suggested that you also use a stand alone point system. This will work with simple points, ipoints, and ibEconomy as long as all of those are 3.2 compatible. You may also set itt o use any other field, as long as it is stored in the members table or the pfields_content table.

Some of the features:
•Bet points on matchups. A matchup can have many opponents with each one paying out at different ratios.

•There are settings which can allow members to have a certain number of free bets and big bets per month. Free bets allow you to pick the winner without risking any points. Big bets give an increased payout.

•Contests- Add matchups into a contest category. The members still bet as normal, but they receive extra points for the contest. When you close the contest the member who did the best wins a jackpot.

•Brackets- NCAA Basketball 64, NCAA Basketball 65, NCAA Basketball 68, NBA, MLB, NHL, NFL, and NIT playoff bracket contests. Members who end up with the most points can win jackpots, including a special jackpot for a perfect bracket. On your bracket page all correct picks are in green and incorrect ones are red and have a strikethrough.

•Several of those sports have unusual rules for their playoffs so it's interesting bracket setups including the brand new 68 team NCAA Tournament setup. Eight teams play in a new first round, including 4 whose seed can vary from year to year. All coded to work in this app.

•Various stats to show who your best members are.

•Tie Breaker questions for the bracket contests. these are optional and must have numerical answers. If someone ties again on the tie breaker, then the pot is split between them.

•Many ways to sort stats and view others'. You can only see other members' picks once the deadlines have passed. Then you can see their picks next to your own for comparison.

•You can always know this will be updated frequently with new features. I'm a big sports fan and use this myself so I update it often. I spent many hours allowing for the new 68 team format, for example.

I am always open to suggestions. I spent so much time on the code itself that there are some areas in need of better skinning. I plan on condensing the bracket functions into only a few. I also intend to improve the overall interface. It's mostly dropdowns currently.

Although I worked very hard testing this, let me know if you notice bugs. I have so much information stored that if there is ever a problem with paying points accurately I can make some tools to fix it most likely.

NOTES: [*]Once again do not use this illegally. If you use links to logos be sure to obey laws as well as using this onl for fun rather than betting anything of value. [*]For a 68 bracket you must enter the 8 teams for the first four games. Make sure that teams 1/2, 3/4, 5/6, and 7/8 are all pairs playing each other in the FIRST round. In the dropdowns below you will then notice options to allow you to show which spots the winners will then take. [*]You must add all teams to the database before creating the brackets. Then the teams will be in dropdowns on the brackets. The easiest way to do this at this time is to look at a list of teams and either add them all at once by copying and pasting or you can check a dropdown to be sure which ones are already there. The team add form will ignroe ones you already added UNLESS you slightly altered their names. [*]Think of Region A as top left, B as bottom left, C as top right, and D as bottom right. Then enter them all in the proper places compared with any online bracket you see broken into regions. NOTE: This will work without a stand alone points system, HOWEVER members won't have a way tor new points if they run out oft hem. Also they start with zero, so they could only do "free bets" in the beginning and try to build their points that way. Thus you should instead use a stand alone points system with this app.






  1.  

  • Submitter
  • Submitted
    03/14/2011
  • Category
  • Discussion URL
  • Support Info
    <p>Currently, the best way is the topic in the Marketplace forums here.</p>
  • Supported Versions
    IP.Blog 2.4.x

Share this post


Link to post
Share on other sites

Just as a note: the NCAA Tournament starts in less than 6 hours, I believe. Due to how long it took to update it for the 68 team tournament style, fix a lot of bugs, and get it approved ehre it obviously has left barely any time to even set up any bracket contests. I did on my own site, of course, but my sites are pretty dead.

You could always use it for the 64 style, but the main reason I even released it now is because I spent so long adding the 68 feature. So just bad timing on my part.

Share this post


Link to post
Share on other sites

Hi, I am extremely impressed and on the very verge of purchasing this system as I consider it almost vital to my forum.

If you wouldn't mind - is there anyway you could add some "matchups" to your current demo board, just so I can get a feel on how it works from the user end.

Share this post


Link to post
Share on other sites

Yeah, I'll add a couple basketball games.

If you don't like various things about it, I am always considering changes. Some changes I would have already done, but was rushing to get it released by today.

1. When you as an admin enter who won the game you have to select who won, enter by how much they won (points,k runs, goals, etc), AND if you use odds you have to enter which team won the actual bet setup itself. In other words the program doesn't determine whether or not the odds were covered/beat. I did this where if the admin makes a mistake it's easier to notice it than if the program used the odds to determine whether the odds were covered. I may change this later where you simply enter the winner and how much they won by and then the program determine if the odds were covered.

2. I basically set iit all up based around basketball, football, etc... so the way i did the odds may not be to your liking. I basically have it where you enter how many points, runs, etc... a team is favored by. Then you check a box as to whether the odds are used or are just there for informational purposes where people know what the spread would be IF you had used odds. I do have it where you can put many teams into a matchup and have each one pay out at different rates such as if one team has a low probability of winning you could have them pay out at 10:1 for example.

3. A lot of things are done with dropdowns. Not ideal, but I don't currently know ajax so for now it's dropdowns.

So as time goes on I will be improving things, although I have some custom work I need to be doing so I may have to stop adding things temporarily.

Anyway I'll add the matchups and if you think it needs a change let me know in case it's something I can alter, add, etc...

Share this post


Link to post
Share on other sites

Couple of questions here:

  • Does this allow for simple straight up pickem?
  • Does this allow you to control the point system and allow simple one point accumulation per correct pick?
  • Does this have any ability to add graphics ? I had a pick em that allowed things like team icons that made the experience more colorful and themed
  • Can I see this mod end to end? Meaning as a user allow me to make picks in all the scenarios you have set up?


If the answers are good I might be all over this. My 2.3 pick em allowed you to have things like CSS sprites types of graphics for team icons and it made the whole thing more colorful and also is the bracket have a full view? Does it look like a true NCAA bracket or just drop down lines? I do love the fact you can see what was picked and is this real time as picks are made or only after marking the winners?

Please let me know as I very interested.

Thank you

Share this post


Link to post
Share on other sites

When adding one I was just reminded of a few other things.

1. You can mark a matchup as "special" and enter an amount of points to give as a bonus.

2. Big Bets is basically where you have your winnings multiplied and the admin can set the monthly limit to zero if they don't want to use that or the free bets which allow for bets and winnings without risking any points.

3. When you enter the deadlines it is based on your forum setting time zone. So you simply enter the deadline in your own time zone and it will properly update the database to the correct universal timestamp.

By the way another feature I wanted to add was horse racing. Where you can pick who will finish first, second, third. I haven't had time yet.

Share this post


Link to post
Share on other sites

I have to say this is a fantastic system and seems far superior to anything out there.

All I want to confirm before I buy is that each week, I can enter numerous UK football (soccer) games, with odds that I have manually entered - members then bet on these games, I choose a winner after the deadline, (or a draw if it's a tie?) and then the members are returned the points.

I have my money at the ready for this.

Share this post


Link to post
Share on other sites

Couple of questions here:



  • Does this allow for simple straight up pickem?
  • Does this allow you to control the point system and allow simple one point accumulation per correct pick?
  • Does this have any ability to add graphics ? I had a pick em that allowed things like team icons that made the experience more colorful and themed
  • Can I see this mod end to end? Meaning as a user allow me to make picks in all the scenarios you have set up?


If the answers are good I might be all over this. My 2.3 pick em allowed you to have things like CSS sprites types of graphics for team icons and it made the whole thing more colorful and also is the bracket have a full view? Does it look like a true NCAA bracket or just drop down lines? I do love the fact you can see what was picked and is this real time as picks are made or only after marking the winners?



Please let me know as I very interested.



Thank you



You can only see others' picks after the deadline for submitting the form passes. That way someone can't know tricky ways to beat someone by picking most of the same picks and then changing one or two.

Graphics is one thing I'm not good at or skinning in general. I do have it where you can give an actual link to a logo for each team so the feature is there, but not great. And the bracket pages do need some skinning done. Right now it's mostly tables and doesn't look so great. I finally had to stop working on it and release it how it was and figure out a better way of skinning the brackets later on.

As far as picking and points, basically it's set up to bet points, but the admin can enter minimum and maximum bet amounts for each matchup. So as long as your minimum is 0 they could just do straight picks with no loss of points. When you're doing an actual picking CONTEST currently you have a set amount (set in the ACP) for each pick to be worth. So if you set that to be 1 point then every pick in every contest would be worth 1 point. But they still pick them on the betting page so if you allow for a maximum bet of more than zero then they would also get more points, but it would not be added into their contest score.

I can try to set things yup to give a lot of ways to test things, but today I'm about to be gone all day. A;sp thjat site is technically live as I have been unsure whether or not to make a site for my modding alone. But I can just add legit matchups where it can still be tested.

So the bottom line is I am happy with most everything except skinning of the brackets Honestly for me personally I don't mind the bland bracket skinning on the nba, nfl, nhl, mlb, and nit brackets because they're so small. But the ncaa tournament brackets take up a lot of space and need to be skinned better.

Share this post


Link to post
Share on other sites

I have to say this is a fantastic system and seems far superior to anything out there.



All I want to confirm before I buy is that each week, I can enter numerous UK football (soccer) games, with odds that I have manually entered - members then bet on these games, I choose a winner after the deadline, (or a draw if it's a tie?) and then the members are returned the points.



I have my money at the ready for this.



Yes that's how it works. After the deadline has passed there will be a link next to those other links in the system which will say x number of matchups are unpaid or ready (I forget the wording I used). So whenever you're ready you just click that link and then for the game you select who won the GAME itself (from a dropdown), you enter how many they won by, then there is another dropdown to choose who won the bet (so if you used odds you have to determine the final winner which could be different from who won the game itself). Like I said I can make it where the system uses your settings to determine if the odds were met, but for now I didn't do it that way so you do have to choose from the final dropdown who won with odds included.

Then the system goes through the members who bet on it and pays the winners.

If you use a separate point system then at the time of the bet it deducts the points from that system and NOT yet from the betting system's point system itself. If you sue only the betting system then it deducts them from that immediately.

When you have selected the winning team it then pays the points back to the various places. So if you have a separate point field it would pay back their original bet and winnings to that one and then since it never deducted from the internal betting point system it only gives the winnings to that internal part.

I did put the option for "none" as a winner. I haven't tested it much though since everything had winners when I used it. I have seen my code for it many times and it seems right, but I probably should test again. I have it set where it gives back the original bet in that case.

It may be frustrating having to add teams to the database and so many dropdowns, but the reason I did it that way is where it can keep track of how often teams win or lose matchups. Those win/loss records are for betting matchups not their reals eason records, by the way.

Share this post


Link to post
Share on other sites

By the way I was just remembering that I keep track of bets placed and bets won. So then for stats it determines how well you did by subtracting out losses. So the bottom line is if you are using it for sports which could have ties/draws then it will make it seemas if that bet was lost (in the stats itself).

So what I really ened to do is add a database field to keep track of ties where it won't count those against you in the stats area. Eh I could probably add that right now I guess. It should only take a few minutes. I'm sleepy so I don't know whether to add it now or wait until tomorrow. haha

I'm a huge sports fan so i am always wanting to add enw features. Thus why it has a lot more to it than other programs usually do. I just add and add things. If I didn't have custom apps I am needing to work on now I would add a ton of more features quickly.

Share this post


Link to post
Share on other sites

Thanks for the speedy response. As far as the team icons I made the last one to allow me to have a folder on my server and the mod referenced that so when I started building out teams I would go to "Add a team" in the CP and part of adding was selecting a gif from a drop down. So whenever I added a match up for teams and selected them the graphical icon showed up in the page.


Just a thought. From a standpoint I can tell you it helps. Especially for NCAA football and Basketball. While you can spell out the names there are so many that get mixed up and people forget like"

FSU = Florida State and Fresno State
USC = South Carolina and Southern Cal.

etc etc


I would like a full presentation before purchasing so please set that up. Any additions would you be open to additional payment for small customizations? If so we should talk.


Thank you again.

Share this post


Link to post
Share on other sites

Thanks for the speedy response. As far as the team icons I made the last one to allow me to have a folder on my server and the mod referenced that so when I started building out teams I would go to "Add a team" in the CP and part of adding was selecting a gif from a drop down. So whenever I added a match up for teams and selected them the graphical icon showed up in the page.




Just a thought. From a standpoint I can tell you it helps. Especially for NCAA football and Basketball. While you can spell out the names there are so many that get mixed up and people forget like"



FSU = Florida State and Fresn State


USC = South Carolina and Southern Cal.



etc etc




I would like a full presentation before purchasing so please set that up. Any additions would you be open to additional payment for small customizations? If so we should talk.




Thank you again.



I just realized I think I remember seeing you in the past when I was looking for this type of mod myself before I started programming anything. I think you used the perfect page one at one point and maybe a modified one of that?

Not that it matters, I just was randomly thinking I rememebred you.

Anyway yeah I could do custom work, but I have a couple projects to be working on that ened to get finished first. I can't spend much time on these others for a few weeks.

For my site I uploaded pics to a folder on my server also. But I haven't added a feature as far as the dropdown. I'll add it if I can figure it out. I'vI've never done a huge amount of design, skinning, etc... so anything graphics-related I have to figure out.

I thought of ditching the whole logo feature at all because I was worried about it violating trademark laws. But I am guessing as long as I dont include the images myself... someone using images on their own site (especially if it's not for them gaining financially off of the logos) then it would be ok That's my guess, but it's amazing how difficult it is to get straight legal answers.

edit: As far as the presentation do you just want to be able to make picks in each scenario? Either way I am aboutt o be gone for the day, so I'll have to do something tomorrow. I probably should do it on my test board also rather than that live site. (semi-live lol) I have one license I'm not even using too.

If I learn ajax and design I could get this more amazing at some point.

Share this post


Link to post
Share on other sites

If you scroll down on that front sports page and click through you can do a bracket contest, by the way. It gets so annoying how dead my sites have been because nobody does those contests against me so then I automatically win.

Those playoff systems are seriously tricky. In one sport the seeds change in round 2. In another the top seed plays the worst seed left. In several others it's straight through. Then for the NCAA 68 they have these four games which start today and the winners then end up at various places in the bracket. Their seeds are not even a guarantee so it was tricky setting it up.

Share this post


Link to post
Share on other sites

How would I integrate another point system (say IBEconomy) into the betting system?

Share this post


Link to post
Share on other sites

How many sites does the license allow you to use it on?



At this point just one. I hadn't really thought about allowing it on multiple sites since it's rare for that to be allowed.

Share this post


Link to post
Share on other sites

How would I integrate another point system (say IBEconomy) into the betting system?



You simply type the name of the point column in a setting in the ACP. I forget if he called the column points, money, or what exactly, but whatever it is you just type it in as a setting and then it's done. I have a point systeem also which I haven't released on thiss ite at this point.l The field for mine is called points. Usually that's what the field is called, but sometimes people use different names.

It's best if you do use a point system because then obviously people can earn the points by posting wheras if you use only the sports system's points setup then they almost have to be allowed some free bets to even build up points to use. I probably should just flat out say a standalone point system is required because it's not ideal using this without a point system.

Share this post


Link to post
Share on other sites

I keep talking too much about negatives (which are few compared to positives in my opinion), but just as an fyi the add form is really cluttered and needs to be re-skinned. Luckily only admins will see it anyway so hopefully it's not a big deal until I have time to make it look better.

I just want people to know these things in case some want to wait. For the most part skinning is the only thing.

If the person who already purchased it is the one who mentioned matchups that end in a draw, to have stats about how many bets were won vs. lost you might want to wait a day before doing anything that could have a tie for the result. I ened to add a few lines of code to make it more accurate for those no winner situations. If you were to have ties before I code anything it can still be fixed, however.

I may just need to add a point system here because it's important to have one. I really have to go sooon though.

Share this post


Link to post
Share on other sites

As an fyi I added a point system here which I was involved in making and it's up for approval. I rushed to add it as I have to leave soon, but I did just upgrade it on my sites and it seems to still be working fine.

edit: My bracket contest deadline passed and only I am in it again. haha. I never get enough use of anything. See I made this only for me, but when i couldn't get anyone on my site i figured I better just start selling this because why spend all that time making it and then nobody be using it?

If anyone wants me to I can open it back up after I pay out the first round. I sometimes do that to allow people in late at penalty of not getting to count their first round picks. I think it's fun comparing bracket picks so it's mighty boring when nobody else is in the contest. I sure hope I can beat.... myself. lol (edit2: well actually it's open for 6 more mins, but that's not long enough really)

I've been on here basically all day. Soon I have no choice but to go, so hopefully no odd bug creeps up any time soon. I assure you I have worked extremely hard to knock out bugs, which is why this wasn't released several days ago. If there does end up being a bug that affects point totals it's likely I will be able to fix any bad effects it had. Luckily I accidentally noticed earlier a bug in tournament payouts. It paid out to someone whow asn't even in the tournament because of how I formatted a query! I've spent hours and hours looking for bugs so I apologize if you run into any, which does happen with all programs though.

Share this post


Link to post
Share on other sites

This looks very impressive.

Is there a way of hiding the bracket parts? Can't see myself using those as will mainly be doing Irish/UK sports stuff. Looks like plenty of options though from just playing around with it initially.

Share this post


Link to post
Share on other sites

I'll have to add in the option of hiding it. I tend to forget to make things optional. Same with my review system. Which obviously doing the bracket contests is optional, but that table is on the front page of the app and then the area on the add form. So it's something that I can do and won't take too long, but I'm not sure when I'll be able to do it since I have custom work I've absolutely got to finish as soon as possible also.

I should probably also add a logging feature just to be even more sure the points are paying out properly every time. I tested it so much that it sure should always work, but nothing is ever 100% in life. Especially these past few days I tested it a lot. I have a feeling some people will think it messed up when it didn't also because the bet amount is taken from one points column and not another so when it's time to add them back it adds more to one than the other and someone could see that and think something messed up.

Anyway I hope by tomorrow I can at least add one thing related to the "no winner" situation. Maybe I'll have time to make those other parts optional also, but some day soon i'll have to stop working on this for a couple weeks.

Share this post


Link to post
Share on other sites

At this point just one. I hadn't really thought about allowing it on multiple sites since it's rare for that to be allowed.



I have two sports-related sites that are tied closely together, sharing some of the same members. If I bought it for one, I'd have to buy it for the other or all hell would break loose. (We've actually had a similar situation happen previously).

Unfortunately, I just can't bring myself to spend that much. It looks interesting, though.

Share this post


Link to post
Share on other sites

I had accidentally removed part of the description stating that this hasn't been tested with strict modes or MS SQL. I can almost guarantee there will be problems in those situations. Just a warning because I don't know when I will have time to try to do anything about that and most people don't use strict or MS SQL.

Now I'm going for real. I stayed ehre all day. Hopefully no issue comes up for those who purchased it. If so and it's something you don't want to keep happening turn the system off until I'm able to look into it tomorrow. I would think there's no bug that matters in it, but no matter how well a program seems to work there can always be something overlooked.

One more note: Reall;y the only way I can think of for making adding teams less time consuming would be if I included a file with tons of teams and have it auto install them. At this point I have not looked into that. If I had done it without dropdowns you'd still have to type team names over and over, so it's just one of those things which is hard to find an ideal way of doing.

I mention all of this just where you know I am always trying to think of ways to make it easier. :)

Share this post


Link to post
Share on other sites

Updated to 4.3.3 to include hising of contest tables if you change settings in the ACP to hide them. For the person who ddin't want them showsing.

For the person who mentioned ties/draws, I added some functionality to handle stats for that in a better way.

Added a new feature. On your betting stats page it tells your betting accuracy percentage.

I thought I had been doing good on my site over the years, but now noticed my percentage is abrely over 50%. i suppose anything over 50 would certainly be good in real life though. Not that I would risk my money in real life. :P

OK, now not any more enw features for a while. I ahve other things to work on other than if bugs are found in this. And if a bug is big enough I suggest turning the system off until I fix it. Hopefully it won't be necessary.

Share this post


Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.