PDA

View Full Version : Calendar Enhancements - Sports predictions


Lionel
19 Oct 2006, 01:54
First of all, a big thank you to nico_swd (http://www.vbulletin.org/forum/member.php?u=121446) 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 click here (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>';

kemo1991
19 Oct 2006, 03:33
nice for my nfl predictions.

phpdevrus
19 Oct 2006, 04:20
hmmm nice you should instead tweak vbookie to make this an installable product :-) but nice.

Hornstar
19 Oct 2006, 06:26
This has great potential, I may be able to do something quite good with this. Thanks.

Lionel
19 Oct 2006, 11:46
hmmm nice you should instead tweak vbookie to make this an installable product :-) but nice.

I use vbookie together with that also. and this cannot be a product no matter what. It is located at the foreach loop of the custom fields.

jackceltic1888
19 Oct 2006, 11:54
Yes has great potential, but dont think I will be installing it just yet.

Hopefully somebody can improve the idea, with a conrol panel ect...


Well done!

Lionel
19 Oct 2006, 12:05
with vbookie.

It's really too bad I did not make a control panel to input scores results. But you have to realize that with my system, with just one click, I get score results, game report with scorers, minutes scored, who get yellow/red cards, members winners, overall competition stats etc... etc...

Greek Wizard
19 Oct 2006, 14:19
Yes has great potential, but dont think I will be installing it just yet.

Hopefully somebody can improve the idea, with a conrol panel ect...


Well done!

I concur.

I will watch for this in the future.

ChavMagnet
19 Oct 2006, 18:46
v.nice thank you

Rat1972
26 Oct 2006, 21:54
For me it will be wonderfull if this hack (with controlpanel and everything) will be made. Maybe one of the coders, will do this, if not too bad ;)

Lionel
26 Oct 2006, 21:56
Everything is more involved if you mean like on my site. But with control panel should not be too difficult at all. I just finished adding the winners list and the vbbux payout

S S0DEN
27 Oct 2006, 01:34
Can someone please make this hack a little easier to install?

adiboy.net
28 Oct 2006, 03:27
Can someone please make this into a prediction league?

Lionel
28 Oct 2006, 03:32
you mean something like this (http://www.haitiwebs.com/index.php?page=soccer) and like that (http://www.haitiwebs.com/haitianforums/soccerteams.php) or that (http://www.haitiwebs.com/haitianforums/league/index.php?opt=schedule) ? :cool:

if there is enough interest, I could do something close to it.

Rat1972
28 Oct 2006, 14:21
I am very intrested. :-)

lepresident
26 Nov 2006, 17:52
Idem, i 'm very intrested.

tschai
13 Dec 2006, 11:17
you mean something like this (http://www.haitiwebs.com/index.php?page=soccer) and like that (http://www.haitiwebs.com/haitianforums/soccerteams.php) or that (http://www.haitiwebs.com/haitianforums/league/index.php?opt=schedule) ? :cool:

if there is enough interest, I could do something close to it.

VERY VERY MUCH INTERRESTED...:rolleyes:...

Now I'm kinda forced to have another mainsite next to my forum, just because there's no decent (Soccer) Prediction League for vBulletin.
Your site looks perfect, though. Maybe I can get this thing to work on my site anyway...

Thanks in advance...*hint*

iranthavan
15 Dec 2006, 01:48
If it can be for others games like cricket too it will be rocking :)

Lionel
15 Dec 2006, 13:22
VERY VERY MUCH INTERRESTED...:rolleyes:

Now I'm kinda forced to have another mainsite next to my forum, just because there's no decent (Soccer) Prediction League for vBulletin.
Your site looks perfect, though. Maybe I can get this thing to work on my site anyway...

Thanks in advance...*hint*

the basis for it is the database structure of ccleague that I modified for vbulletin plus created some modules.

Littlerocket
18 Dec 2006, 20:17
This would be great if it was something non-techy people like me could install. It's exactly what I'd love for my site.

fishhub
25 Dec 2006, 18:08
can this work for 3.5.4? TIA

cipciop
25 Dec 2006, 22:37
I don't find this string in calendar.php :

asort($custom[options]);

I'm use vbulletin 3.6.4

wIrEs
30 Dec 2006, 09:07
well, just by reading at the topic thread many ideas came to mind, first of them was, NICEE!, then after reading users posts, i realized it didnt had much i want.. NHL game predictions or even just to display scores, like have each team games from the team calendar for a given year and display the page for each team on the forums, somewhere, then get final scores from NHL.com. I go too far some times, it only takes a dream and people behind to make it happen...

SportsZone
30 Dec 2006, 11:26
I would like to see this hack be made too :D

*bookmarks thread*

SportsZone
31 Dec 2006, 12:37
Thinking about it, it would be great if this was integrated with vBookie, so members can bet on the predictions too. If only I knew how to code!

mcyates
01 Jan 2007, 23:00
yes would be great.

Lionel
01 Jan 2007, 23:07
If you use the forums events hack, then whatever you have in calendar displays in showthread where you can have vbookie.

iahead
03 Jan 2007, 13:55
Somebody help in developing the mod further a bit

this mod will be awesome

peterpigman
03 Jan 2007, 14:40
I would love a one for the premiership, i run a predictions league but it is all done by ourselves. Something like that would be awesome

Foxsake
04 Jan 2007, 09:22
I run a soccer site and this would be awesome, if i can integrate with vbookie that would be fantastic.
Will be watching this one and hoping......good luck;)

Lionel
04 Jan 2007, 09:53
Well some good news. I just started to include non championship games (which are not part of my main system), which means that I will need to develop an independent interface for inputing those lone games scores.

taumau
04 Jan 2007, 15:47
VERY VERY much interested in this MOD! :rolleyes:

Littlerocket
17 Jan 2007, 00:49
Well some good news. I just started to include non championship games (which are not part of my main system), which means that I will need to develop an independent interface for inputing those lone games scores.

Sounds great Lionel.

taumau
22 Jan 2007, 11:50
Well some good news. I just started to include non championship games (which are not part of my main system), which means that I will need to develop an independent interface for inputing those lone games scores.

How is it coming?

parabat
26 Jan 2007, 13:13
Well some good news. I just started to include non championship games (which are not part of my main system), which means that I will need to develop an independent interface for inputing those lone games scores.

Yip, looking forward to your handy work Lionel :) :up:

-PB

Zia
26 Jan 2007, 18:58
Ahha..
this is really good idea indeed..

really interested..if its for international(leagues/WC..ect etc) soccer & cricket(ODI,Test,WC.ect etc) too...
logivally Jersy cant be shown...but country name is just fine..

could it be done?

*clicks install for hering good news

Lionel
26 Jan 2007, 20:52
Had to put it in the backburner, championship is over, with my country the champ :-)

Zia
27 Jan 2007, 08:03
umm if u need some base idea....what needed to be add..Plz
see this

vbSoccer (http://www.vbulletin.org/forum/showthread.php?t=114846&highlight=vbSoccer)


This for ur idea what could be added :)

thnx..waiting to hear from u

MsRachel
18 Apr 2007, 08:51
This would be great if it was something non-techy people like me could install. It's exactly what I'd love for my site.


I agree..i dont know much about php so i cant install this...im searching through ALL posts (if you cant tell by the person above me, the date)..i looooooooooove this..this is the first ive seen in 3.6 (unless i passed it somewhere?) ..is anyone working on this..? Kuddos to all the developers..:up:

Lionel
18 Apr 2007, 14:01
you guys could look into this (http://www.predictionfootball.com/Home.html)

with a tiny bit of work, you could integrate it (http://www.haitiwebs.com/forums/predictionleague/) with vbulletin

skorzguy
19 Apr 2007, 03:54
This is a cool idea for a mod. American Football would be awesome.

Lionel
19 Apr 2007, 05:45
30 years in America and I still don't understand that game where everybody spends half their time bending, and why they call it football :confused:

gwhooooey
24 May 2007, 01:24
you guys could look into this (http://www.predictionfootball.com/Home.html)

with a tiny bit of work, you could integrate it (http://www.haitiwebs.com/forums/predictionleague/) with vbulletin
How exactly?

Lionel
24 May 2007, 04:48
you've got to understand php and mysql, i can't support that... if you do, i can hint you this: alter table user and add the missing fields from predictions... that will instantly make all your vb users predictions users and then you will have to do all appropriate edits in predictions.... if you don't understand them, don't attempt, i will not be able to support that, at least for now.

ehsanix
24 May 2007, 10:16
yuuuuuuu

gwhooooey
24 May 2007, 12:39
you've got to understand php and mysql, i can't support that... if you do, i can hint you this: alter table user and add the missing fields from predictions... that will instantly make all your vb users predictions users and then you will have to do all appropriate edits in predictions.... if you don't understand them, don't attempt, i will not be able to support that, at least for now.
Well I'm gonna be starting a football forum over the weekend, so that's why i'm interested in it... I haven't actually downloaded the footyprediction thing yet but I could do the mysql bits... just not sure what i'd have to do in regards to the php.

Invalid ID
24 May 2007, 19:09
Great.. can you please make it for Cricket?

Coleccromos
08 Jun 2007, 23:04
I am interested in this application for my forum and my users. I don't have very clear as it works I am Spanish and my English is not very good
I will continue investigating as making work him, at the moment it discharges it

SBlueman
10 Jun 2007, 22:12
Does this work with any cash or points mod?

iran-egold
12 Jun 2007, 21:20
I do below steps:

1) run a query (predictions.sql)

2) edit 1 file (calendar.php)

3) edit 4 templates
- calendar_edit
- calendar_edit_customfield
- calendar_showeventsbit
- calendar_showeventsbit_customfield

4) upload 2 files
- ...forum\clientscript\ajaxpredict.js
- ...forum\predictions.php

But, I dont know how do other steps:

5) add a frontend redirect phrase (how)

6) create a dedicated calendar for sports and remember its id. You will need to replace mine (which is 4) with yours.

7) 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.

Plz help and guide me for steps 5,6,7.
If I have mistake in steps 1..4, inform me plz.

tanx

Lionel
12 Jun 2007, 21:34
But, I dont know how do other steps:

5) add a frontend redirect phrase (how)

6) create a dedicated calendar for sports and remember its id. You will need to replace mine (which is 4) with yours.

7) 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.

Plz help and guide me for steps 5,6,7.
If I have mistake in steps 1..4, inform me plz.

tanx

these are done in vb admincp

5- it's in language below styles and templates
6-another vb function to add new calendars
7-further customize the newly created calendar.

Refer to vb documentation for all 3 steps.

Coleccromos
13 Jun 2007, 20:24
I don't find this string in calendar.php :



I'm use vbulletin 3.6.4


Me neither encounter this it lines and I use the version 3.6.4

iran-egold
13 Jun 2007, 20:53
Plz explain usage of this product step by step and clearly again.

u suppose we are beginer in VB.

Tanx

iran-egold
14 Jun 2007, 20:41
this error occured for me:

Database error in vBulletin 3.6.0:

Invalid SQL:
select id,team1_score,team2_score from cclp_schedule_scores WHERE

eventid='2';

MySQL Error : Table 'forum.cclp_schedule_scores' doesn't exist
Error Number : 1146
Date : Thursday, June 14th 2007 @ 10:04:16 PM

Plz help me.

Lahoria
14 Jun 2007, 22:03
nice done, i 'm very intrested : but

what is the diffrentce between this and vbookie ?

v12kid
15 Jun 2007, 02:21
would this work for basketball and american football?

deafluckyirish
16 Jun 2007, 13:04
I am interesting to have this kind of prediction for sports. I am trying to set up sports league for my website and forum.

If anyone want to help me. PM me.

Thanks,

Coleccromos
09 Jul 2007, 21:05
Me for but that attempt it I am not able to make it work

Fac1
11 Jul 2007, 04:30
Nice mod. Would it be possible to add college basketball to this? I'd be willing to help out.

SilverBoy
15 Aug 2007, 02:41
Iam intresting in integrating vb with prediction league script Lionel, I have prediction league on my site, but I wish to rewrite the script like a complete plugin for vb, but badly Iam new with plugins system (I was using vb3.0.x for along time) so I don't know from where I have to start.

If some body have a good documentation on programing product's and plugins maybe the dream plugin will be rise.

orkyn
21 Aug 2007, 18:43
^ agreed I'll be waiting for this plug in...

music legend
26 Aug 2007, 19:43
me to

cloyal
01 Sep 2007, 17:19
Would love to see this for the NFL, I would do it but as it sits right now I just don't have the time.

parabat
07 Sep 2007, 01:15
So Lionel, we have your permission to hack and use your scripts to create a mod???
Your script looks for a template called "soccer_palmares"
Can you please give me an idea of what this template looks like?
-PB

Lionel
07 Sep 2007, 01:19
sure... soccer palmares should not be in there

Digma
21 Oct 2007, 14:45
I see that the same people are still after the same thing as 2 years ago. You would almost think that with this kind of attention someone would have seen the 'gap in the market'. ;)

Good to see some progression compared to last years! :)

As like you, I am still looking for a prediction league integration for vB.

Lionel
27 Oct 2007, 12:30
OK. I got the message. I will be putting out a script, but it will be commercial.

parabat
27 Oct 2007, 12:59
OK. I got the message. I will be putting out a script, but it will be commercial.

WOOOHOOO!!!! Nice one Lionel :up:

-PB

Coleccromos
27 Oct 2007, 17:16
Thank you Serious lionel an entire detail on the other hand

Lionel
27 Oct 2007, 17:22
My site is geared towards soccer and is very, very involved. I'll have to make it universal so it could accomodate any sports.

Coleccromos
27 Oct 2007, 17:59
To my for example interests me a lot, a lot of east pluging but after a lot of time I have not been able to start it in my forum.

My forum is also of soccer players' letters and I take time looking for a system or of fantastic league or as this pluging

Lionel
28 Oct 2007, 14:20
To my for example interests me a lot, a lot of east pluging but after a lot of time I have not been able to start it in my forum.

My forum is also of soccer players' letters and I take time looking for a system or of fantastic league or as this pluging

There are some great leagues scripts out there. For example predictions league. There used to be ccleague pro etc ....

this league script (http://www.orlandocastillo.com/portfolio/) is one of the basis for my soccer section. Thta's the one I use for data input which also updates this prediction script. It's free and is a league type.

For my national soccer team, I use this paid script (http://www.tpl-design.com/tplsoccerstats/)

And for my members predictions league (different from calendar but also interacting with it and fully integrated with vb) I use this free one (http://www.predictionfootball.com/Home.html)

Coleccromos
28 Oct 2007, 15:15
There are some great leagues scripts out there. For example predictions league. There used to be ccleague pro etc ....

this league script (http://www.orlandocastillo.com/portfolio/) is one of the basis for my soccer section. Thta's the one I use for data input which also updates this prediction script. It's free and is a league type.

For my national soccer team, I use this paid script (http://www.tpl-design.com/tplsoccerstats/)

And for my members predictions league (different from calendar but also interacting with it and fully integrated with vb) I use this free one (http://www.predictionfootball.com/Home.html)


:eek::eek: Lionel Thank you for this information.

I download me the predicition league, the one finishes connection, but the integration for vb where I can find it

Lionel
28 Oct 2007, 15:22
:eek::eek: Lionel Thank you for this information.

I download me the predicition league, the one finishes connection, but the integration for vb where I can find it

Nowhere. I did it myself for my site :-)

Coleccromos
28 Oct 2007, 16:06
Nowhere. I did it myself for my site :-)

Ups! you that she knows how to make this type of things.

I for the moment have to try to make it or to expect the disinterested publication from somebody.

Thank you lionel, I will continue investigating

CLF
27 Feb 2008, 01:19
Does anyone know if there's something like this for NFL, NBA, MLB?
This would be great if there was a product.

Lionel
27 Feb 2008, 03:56
Look at my signature. I am about to release vBsports, for any sports. Will have standings, stats, predictions, fantasy and plenty more.

Gersfan
27 Feb 2008, 18:37
I'm massively interested in this prediction league thing....

It would be absolutely brilliant If you could get the whole one Mod that had this, predictions, league, stats etc... Maybe even work with Vbookie..?

What's VBSPORTS?

CLF
27 Feb 2008, 19:27
Look at my signature. I am about to release vBsports, for any sports. Will have standings, stats, predictions, fantasy and plenty more.

Looking forward to it :)
Soon?

Lionel
27 Feb 2008, 20:46
Follow my signature and somewhere you'll find a link to a preview....

Gersfan
27 Feb 2008, 21:00
http://web.mlsnet.com/index.jsp

I found this but I'm still pretty lost what the Product is and does lol? Though very excited ha

CLF
28 Feb 2008, 06:35
Follow my signature and somewhere you'll find a link to a preview....

I get that part but do you know how soon? Month, two...

double_d
28 Feb 2008, 09:31
i really want this
and willing to pay for it depending on how much of coarse
but would like it before the NRL season starts in australia

daniel d

Lionel
28 Feb 2008, 10:38
It will be announced on my site

merk_aus
07 Mar 2008, 11:19
ok so we will all wait for u do u know how much for it?!? I am definatly willing to pay

ShadMan
14 Mar 2008, 01:59
Me need! Me need! (Waiting with money in hand)

Lionel
14 Mar 2008, 02:02
Subscribe on my site for announcement. I will not post here ;)

chubzilla
31 Mar 2008, 05:30
i will be all over this as I run a sports discussion forum

CLF
26 May 2008, 06:17
I guess you gave up on this vBSports project. Oh well... :confused::(

Lionel
26 May 2008, 13:13
Not at all. I had to stop for a while so I build a cart system and a support system for my site. Now that both are done ... I should be able to knock this down. It's 90% done.

gamerscms
27 May 2008, 14:46
Not at all. I had to stop for a while so I build a cart system and a support system for my site. Now that both are done ... I should be able to knock this down. It's 90% done.

would be really cool to see this as we use vbookie at the moment for betting on our xbox forza GP :P

Lionel
27 May 2008, 14:52
I've just started to transfer it to my live development. In one day or two, it will be on the demo section of my site.

stickskills
28 May 2008, 01:37
Looking forward to the demo being put up, kinda interested in this. :)

Lionel
28 May 2008, 01:41
looks like it will be up in the next 30 minutes :-)

CLF
02 Jun 2008, 19:34
looks like it will be up in the next 30 minutes :-)

I don't see it. Is it up? :confused:

Lionel
02 Jun 2008, 19:41
yes, but I don't want to give a link to it here. Ask all your questions over there

CLF
02 Jun 2008, 21:09
yes, but I don't want to give a link to it here. Ask all your questions over there

Where, man? I don't see it. Ask where?

Lionel
02 Jun 2008, 21:14
I don't want to post a link to my mods here.
I don't want to discuss my mods here
Feel free to register at my site (in my signature) and ask all questions you want.

CLF
04 Jun 2008, 03:42
I registered and posted there. Let me know. Thank you.

A M I R
13 Aug 2008, 07:31
I don't find this string in calendar.php :

asort($custom[options]);

derbi
04 Feb 2010, 00:57
do you will update this mod to vbulletin 4?

Gamelobby
27 Sep 2010, 07:08
How is this working in 3.8 ??