vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Calendar Enhancements - Sports predictions (https://vborg.vbsupport.ru/showthread.php?t=129428)

Lionel 10-18-2006 10:00 PM

Sports predictions
 
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 click here 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

Quote:

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

Quote:

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

kemo1991 10-19-2006 01:33 AM

nice for my nfl predictions.

phpdevrus 10-19-2006 02:20 AM

hmmm nice you should instead tweak vbookie to make this an installable product :-) but nice.

Hornstar 10-19-2006 04:26 AM

This has great potential, I may be able to do something quite good with this. Thanks.

Lionel 10-19-2006 09:46 AM

Quote:

Originally Posted by phpdevrus
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 10-19-2006 09:54 AM

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 10-19-2006 10:05 AM

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 10-19-2006 12:19 PM

Quote:

Originally Posted by jackceltic1888
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 10-19-2006 04:46 PM

v.nice thank you

Rat1972 10-26-2006 07:54 PM

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 10-26-2006 07:56 PM

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 10-26-2006 11:34 PM

Can someone please make this hack a little easier to install?

adiboy.net 10-28-2006 01:27 AM

Can someone please make this into a prediction league?

Lionel 10-28-2006 01:32 AM

you mean something like this and like that or that ? :cool:

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

Rat1972 10-28-2006 12:21 PM

I am very intrested. :-)

lepresident 11-26-2006 03:52 PM

Idem, i 'm very intrested.

tschai 12-13-2006 09:17 AM

Quote:

Originally Posted by Lionel (Post 1105914)
you mean something like this and like that or that ? :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 12-14-2006 11:48 PM

If it can be for others games like cricket too it will be rocking :)

Lionel 12-15-2006 11:22 AM

Quote:

Originally Posted by Renes4 (Post 1137654)
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 12-18-2006 06:17 PM

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 12-25-2006 04:08 PM

can this work for 3.5.4? TIA

cipciop 12-25-2006 08:37 PM

I don't find this string in calendar.php :

Quote:

asort($custom[options]);
I'm use vbulletin 3.6.4

wIrEs 12-30-2006 07:07 AM

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 12-30-2006 09:26 AM

I would like to see this hack be made too :D

*bookmarks thread*

SportsZone 12-31-2006 10:37 AM

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-01-2007 09:00 PM

yes would be great.

Lionel 01-01-2007 09:07 PM

If you use the forums events hack, then whatever you have in calendar displays in showthread where you can have vbookie.

iahead 01-03-2007 11:55 AM

Somebody help in developing the mod further a bit

this mod will be awesome

peterpigman 01-03-2007 12:40 PM

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 01-04-2007 07:22 AM

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 01-04-2007 07:53 AM

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 01-04-2007 01:47 PM

VERY VERY much interested in this MOD! :rolleyes:

Littlerocket 01-16-2007 10:49 PM

Quote:

Originally Posted by Lionel (Post 1150463)
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 01-22-2007 09:50 AM

Quote:

Originally Posted by Lionel (Post 1150463)
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 01-26-2007 11:13 AM

Quote:

Originally Posted by Lionel (Post 1150463)
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 01-26-2007 04:58 PM

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 01-26-2007 06:52 PM

Had to put it in the backburner, championship is over, with my country the champ :-)

Zia 01-27-2007 06:03 AM

umm if u need some base idea....what needed to be add..Plz
see this

vbSoccer


This for ur idea what could be added :)

thnx..waiting to hear from u

MsRachel 04-18-2007 06:51 AM

Quote:

Originally Posted by Littlerocket (Post 1141109)
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 04-18-2007 12:01 PM

you guys could look into this

with a tiny bit of work, you could integrate it with vbulletin


All times are GMT. The time now is 03:31 PM.

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

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03760 seconds
  • Memory Usage 1,819KB
  • 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
  • (11)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (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