Back to vBulletin 3.6 Add-ons

Sports predictions
Mod Version: 1.00, by Lionel

This modification is in the archives.
vB Version: 3.6.0 Rating: (1 vote - 5.00 average) Installs: 31
Released: 19 Oct 2006 Last Update: Never Downloads: 338
Not Supported DB Changes Template Edits Code Changes Additional Files  

First of all, a big thank you to nico_swd He gave me the entire ajax code
Thank you also to Abe1 for trying to help me.

Second, this hack while complete for me will be incomplete for you. I am releasing it as a base so you can tailor it to your needs. If you don't know php stay away from it as I don't guarantee support. This is released mainly as a guide if someone else wants to elaborate on it. As I stated, it was done for my needs and serves my purpose fully. I use it for soccer, but that could be used for any sport.

What's missing for you?

1- You would need to find a way to add actual scores results.

Unfortunately, I use a totally dynamic system that feeds that info for me in another table and I had no need to create a control panel.

I suggest you alter the event table and add 2 fields in there: homescore and awayscore and add the mini control panel at calendar edit.

2-You need to add your own jerseys. Each jersey needs to have the same name than the team.

3-You will not have the dynamic info as far as game report etc...

4-You will not get the list of winners (linked automatically)

What does this hack do? It adds a prediction system for any kind of sports and allows your members to predict the outcome.

Unfortunately, this could not be a product, because there are no hooks where I needed it.

You would need to:

run a query
edit 1 file
edit 4 templates
upload 2 files
add a frontend redirect phrase
create a dedicated calendar for sports and remember its id. You will need to replace mine (which is 4) with yours.
add some custom fields to that calendar
The first two fields are mandatory and must be named Home and Away if you change that, then you would need to change all templates.


This takes into consideration the dateline_from and prediction will automatically be closed at that time.

To see the full scope of the system http://www.haitiwebs.com/index.php?page=soccer and click on a calendar date to see predictions.

TIP: If you need jerseys images for NFL football teams or other American sports, look for the vbux addon for sports which has a bunch of them

P.S. I also use it with the Events Forums hack. If anyone wants that, I'll post the changes I made in there.

to make it cross browser compliant, change

document.getElementById('button'+ form.eventid.value +'').innerHTML = '<a href="predictions.php?do=remove&eventid='+ form.eventid.value +'">Remove</a>'
into

fetch_object('button'+ form.eventid.value +'').innerHTML = '<a
href="predictions.php?do=remove&eventid='+ form.eventid.value +'">Remove</a>';

Download

This modification is archived, downloads are still allowed.

File Type: %1$s predictions.zip (8.7 KB, 502 downloads)

Screenshots

Click image for larger version
Name:	1.jpg
Views:	2337
Size:	20.6 KB
ID:	54841   Click image for larger version
Name:	2.jpg
Views:	1371
Size:	20.4 KB
ID:	54842   Click image for larger version
Name:	3.jpg
Views:	1256
Size:	21.4 KB
ID:	54843   Click image for larger version
Name:	4.jpg
Views:	1768
Size:	59.6 KB
ID:	54844  


vblts.ru supports vBulletin®, 2022-2024