Live Scoreboard not working

Post here to discuss topics relate to the 4.x version for the ASP Football Pool software program. All support topics should go here.
chuckie365
Posts: 14
Joined: Fri Jun 19, 2015 8:58 pm

Live Scoreboard not working

Post by chuckie365 »

It looks like the NFL has discontinued support of the original scoreboard api

http://www.nfl.com/liveupdate/scorestrip/ss.xml

Anybody know how to resolve this problem in the scoreboard.js file to make it work again?

thanks!
User avatar
Smokey Jones
Posts: 13
Joined: Fri Sep 07, 2018 10:08 am
Location: TN
Contact:

Re: Live Scoreboard not working

Post by Smokey Jones »

I discovered that last night as well. From what I can tell, the NFL has gone to an API at http://www.nfl.com/liveupdate/scores/scores.json but I have no idea how to code for that. I think it's going to take a complete rewrite of the socreboard.js file.
jhronesz
Posts: 43
Joined: Sat Aug 31, 2013 4:20 pm

Re: Live Scoreboard not working

Post by jhronesz »

The current link is an XML link. http://www.nfl.com/ajax/scorestrip?seas ... REG&week=1 contains the same data, but doesn't end in XML. I am not sure if anyone knows how we could incorporate this link into the site. Pasting it into the code doesn't work, probably because it doesn't end in .xml. Adding .xml to the end of the link makes the link not work.
User avatar
Russaholic
Posts: 58
Joined: Tue Oct 15, 2013 3:19 pm
Contact:

Re: Live Scoreboard not working

Post by Russaholic »

Thanks for posting about this. I was trying to figure it out on my own and was getting frustrated. You saved me from further distress.
baldy51497
Posts: 7
Joined: Tue Sep 11, 2018 7:50 am

Re: Live Scoreboard not working

Post by baldy51497 »

Forgive my coding ignorance, I am just a HS Math teacher doing this for my work pool. However, I used the url that jhronesz posted. It worked, I just had to change the script line 26 from "?random=... to "&random=... since we were just increasing the number of variables being passed to the server and not starting it.

However, how are we going to make this url use a dynamic week number? Or, how are we going to get the week number variable from the site into this script?
GiantsFan
Posts: 3
Joined: Tue Sep 11, 2018 10:24 am

Re: Live Scoreboard not working

Post by GiantsFan »

UPDATE 9/17: Don't use this anymore. They fixed the original XML file, so this isn't necessary.

I believe I figured this out.. need to add one new line to common.asp to get the current week from the pool, and change 3 lines in scoreboard.js to change to the new URL and append the week value. I've made a lot of custom changes to my code, so i can't go with line numbers. Hopefully by providing old and new, that should be enough.

Note: This might break during postseason since I'm not sure how the week number will be formatted, so this might be revisited in January.

includes/common.asp
Old

Code: Select all

if ENABLE_SCORES_ADDON then
	Response.Write(vbTab & "<script type=""text/javascript"" src=""scripts/scoreboard.js""></script>" & vbCrLf)
end if
New

Code: Select all

if ENABLE_SCORES_ADDON then
	Response.Write(vbTab & "<script type=""text/javascript"">var currentSBWeek =" & getCurrentWeek() & ";</script>" & vbCrLf) 
	Response.Write(vbTab & "<script type=""text/javascript"" src=""scripts/scoreboard.js""></script>" & vbCrLf)
end if
scripts/scoreboard.js
Old

Code: Select all

var isPlayoffs = false;
var scoresUrl = "http://www.nfl.com/liveupdate/scorestrip/ss.xml";
if (isPlayoffs)
	scoresUrl = "http://www.nfl.com/liveupdate/scorestrip/postseason/ss.xml";
New

Code: Select all

var isPlayoffs = false;
var scoresUrl = "http://www.nfl.com/ajax/scorestrip?season=2018&seasonType=REG&week=" + currentSBWeek;
if (isPlayoffs)
	scoresUrl = "http://www.nfl.com/ajax/scorestrip?season=2018&seasonType=POST&week=" + currentSBWeek;
Old

Code: Select all

xhr.queryString = "url=" + escape(scoresUrl + "?random=" + Math.floor(Math.random() * 10000000));
New

Code: Select all

xhr.queryString = "url=" + escape(scoresUrl + "&random=" + Math.floor(Math.random() * 10000000));
Last edited by GiantsFan on Mon Sep 17, 2018 8:35 am, edited 1 time in total.
NHfootballpool
Posts: 4
Joined: Tue Sep 11, 2018 4:50 pm

Re: Live Scoreboard not working

Post by NHfootballpool »

the update seemed to work for me, thanks for posting
kingmullet
Posts: 59
Joined: Thu Sep 05, 2013 3:21 pm

Re: Live Scoreboard not working

Post by kingmullet »

I made all the changes, but not getting the updated scores
User avatar
Smokey Jones
Posts: 13
Joined: Fri Sep 07, 2018 10:08 am
Location: TN
Contact:

Re: Live Scoreboard not working

Post by Smokey Jones »

GiantsFan wrote: Tue Sep 11, 2018 10:49 am I believe I figured this out..
You, Sir, are AWESOME!!!! Thanks for figuring this out!!
mspslb
Posts: 17
Joined: Thu Sep 04, 2014 6:50 pm

Re: Live Scoreboard not working

Post by mspslb »

Changes worked well for me. Thanks for the assist!
User avatar
Stutgrtguy
Posts: 167
Joined: Sun Oct 20, 2013 3:54 pm
Location: Colorado

Re: Live Scoreboard not working

Post by Stutgrtguy »

GiantsFan wrote: Tue Sep 11, 2018 10:49 am I believe I figured this out.. need to add one new line to common.asp to get the current week from the pool, and change 3 lines in scoreboard.js to change to the new URL and append the week value. I've made a lot of custom changes to my code, so i can't go with line numbers. Hopefully by providing old and new, that should be enough.

Note: This might break during postseason since I'm not sure how the week number will be formatted, so this might be revisited in January.

includes/common.asp
Old

Code: Select all

if ENABLE_SCORES_ADDON then
	Response.Write(vbTab & "<script type=""text/javascript"" src=""scripts/scoreboard.js""></script>" & vbCrLf)
end if
New

Code: Select all

if ENABLE_SCORES_ADDON then
	Response.Write(vbTab & "<script type=""text/javascript"">var currentSBWeek =" & getCurrentWeek() & ";</script>" & vbCrLf) 
	Response.Write(vbTab & "<script type=""text/javascript"" src=""scripts/scoreboard.js""></script>" & vbCrLf)
end if
scripts/scoreboard.js
Old

Code: Select all

var isPlayoffs = false;
var scoresUrl = "http://www.nfl.com/liveupdate/scorestrip/ss.xml";
if (isPlayoffs)
	scoresUrl = "http://www.nfl.com/liveupdate/scorestrip/postseason/ss.xml";
New

Code: Select all

var isPlayoffs = false;
var scoresUrl = "http://www.nfl.com/ajax/scorestrip?season=2018&seasonType=REG&week=" + currentSBWeek;
if (isPlayoffs)
	scoresUrl = "http://www.nfl.com/ajax/scorestrip?season=2018&seasonType=POST&week=" + currentSBWeek;
Old

Code: Select all

xhr.queryString = "url=" + escape(scoresUrl + "?random=" + Math.floor(Math.random() * 10000000));
New

Code: Select all

xhr.queryString = "url=" + escape(scoresUrl + "&random=" + Math.floor(Math.random() * 10000000));
WORKED!
Thanks!
jhronesz
Posts: 43
Joined: Sat Aug 31, 2013 4:20 pm

Re: Live Scoreboard not working

Post by jhronesz »

Works for me. Thank you!!!!!!
chuckie365
Posts: 14
Joined: Fri Jun 19, 2015 8:58 pm

Re: Live Scoreboard not working

Post by chuckie365 »

Is it working now for everyone?...mine isn't updating scores on Sunday. Thanks!
mspslb
Posts: 17
Joined: Thu Sep 04, 2014 6:50 pm

Re: Live Scoreboard not working

Post by mspslb »

Anyone have their Help/Rules pages stop working after implementing this change? I can go back and forth with only changing common.asp code and always get the same results. If I comment out the new lines and uncomment the old, it works. If I comment out the old and uncomment the new, it breaks. Doesn't matter which version of the scoreboard.js file that is active. I have been digging through this all day and can't find what in the helpRules.asp page is blowing up.
mspslb
Posts: 17
Joined: Thu Sep 04, 2014 6:50 pm

Re: Live Scoreboard not working

Post by mspslb »

@Chuckie365 - having that issue as well. Games show up correctly, but no scores since the THursday night game.
mspslb
Posts: 17
Joined: Thu Sep 04, 2014 6:50 pm

Re: Live Scoreboard not working

Post by mspslb »

After turning my attention to the new feed not getting updates, I found that the file was not being updated today - no issue with the pool site/code. Checking further, I found that the original link was now working again. I have reverted all of the changes for now. Both the pool rules and the live scoreboard are working at this point.
User avatar
Smokey Jones
Posts: 13
Joined: Fri Sep 07, 2018 10:08 am
Location: TN
Contact:

Re: Live Scoreboard not working

Post by Smokey Jones »

mspslb wrote: Sun Sep 16, 2018 5:10 pm I have reverted all of the changes for now. Both the pool rules and the live scoreboard are working at this point.
I reverted as well and all is working as it did last season. While the updated code above resolved the issue, the link that it uses doesn't provide a live game feed, therefore scores weren't updating at regular intervals.
User avatar
Stutgrtguy
Posts: 167
Joined: Sun Oct 20, 2013 3:54 pm
Location: Colorado

Re: Live Scoreboard not working

Post by Stutgrtguy »

mspslb wrote: Sun Sep 16, 2018 4:36 pm Anyone have their Help/Rules pages stop working after implementing this change? I can go back and forth with only changing common.asp code and always get the same results. If I comment out the new lines and uncomment the old, it works. If I comment out the old and uncomment the new, it breaks. Doesn't matter which version of the scoreboard.js file that is active. I have been digging through this all day and can't find what in the helpRules.asp page is blowing up.
Yep ran into this as well, I reverted, back and oddly enough the scoreboard started working? I'm at a loss....strange
User avatar
Russaholic
Posts: 58
Joined: Tue Oct 15, 2013 3:19 pm
Contact:

Re: Live Scoreboard not working

Post by Russaholic »

I didn't have the same luck when reverting back. Let me know if someone is able to find a fix because the scoreboard isn't worth much if it isn't live.
User avatar
fbonani
Posts: 50
Joined: Thu Aug 15, 2019 12:07 pm

Re: Live Scoreboard not working

Post by fbonani »

I've been trying to figure out how the live scoreboard works. I know that it depends on the scoreboard.js file in the scripts folder and the scoreboard.css file in the styles folder, but what triggers the scoreboard to show. Which file actually generates the scoreboard.
User avatar
Russaholic
Posts: 58
Joined: Tue Oct 15, 2013 3:19 pm
Contact:

Re: Live Scoreboard not working

Post by Russaholic »

Fbonani,

You can turn the scoreboard on/off in the includes/config.asp file around line 243.

Code: Select all

'Enable live scoreboard and scores loader flag.
const ENABLE_SCORES_ADDON = true
User avatar
fbonani
Posts: 50
Joined: Thu Aug 15, 2019 12:07 pm

Re: Live Scoreboard not working

Post by fbonani »

Thanks, it took me a while but I finally figured out that needed to be turned on in order for the autoscore to work. I should have posted that the problem had been resolved. My apologies.
goose
Posts: 1
Joined: Thu Aug 20, 2020 10:10 am

Re: Live Scoreboard not working

Post by goose »

Does anyone have the new url for scores? Looks like the old one stopped working.
User avatar
Stutgrtguy
Posts: 167
Joined: Sun Oct 20, 2013 3:54 pm
Location: Colorado

Re: Live Scoreboard not working

Post by Stutgrtguy »

Holy freakin crap on a crispy cringle cut french fry....I so hate 2020....its the gift that keeps on giving.

I hadnt noticed till you pointed it out....

Im sorry I don't, just one more thing to look into this year
User avatar
Stutgrtguy
Posts: 167
Joined: Sun Oct 20, 2013 3:54 pm
Location: Colorado

Re: Live Scoreboard not working

Post by Stutgrtguy »

You all realise what this means right? I may be wrong but I'm thinkin we will have to input scores manually...
Post Reply