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: 12
Joined: Fri Jun 19, 2015 8:58 pm

Live Scoreboard not working

#1

Post by chuckie365 » Fri Sep 07, 2018 12:30 am

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

#2

Post by Smokey Jones » Fri Sep 07, 2018 10:11 am

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

#3

Post by jhronesz » Sun Sep 09, 2018 8:10 am

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: 45
Joined: Tue Oct 15, 2013 3:19 pm
Contact:

Re: Live Scoreboard not working

#4

Post by Russaholic » Sun Sep 09, 2018 6:24 pm

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: 4
Joined: Tue Sep 11, 2018 7:50 am

Re: Live Scoreboard not working

#5

Post by baldy51497 » Tue Sep 11, 2018 7:57 am

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

#6

Post by GiantsFan » Tue Sep 11, 2018 10:49 am

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: 3
Joined: Tue Sep 11, 2018 4:50 pm

Re: Live Scoreboard not working

#7

Post by NHfootballpool » Tue Sep 11, 2018 9:14 pm

the update seemed to work for me, thanks for posting

kingmullet
Posts: 58
Joined: Thu Sep 05, 2013 3:21 pm

Re: Live Scoreboard not working

#8

Post by kingmullet » Wed Sep 12, 2018 1:34 pm

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

#9

Post by Smokey Jones » Wed Sep 12, 2018 5:57 pm

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

#10

Post by mspslb » Wed Sep 12, 2018 9:14 pm

Changes worked well for me. Thanks for the assist!

User avatar
Stutgrtguy
Posts: 161
Joined: Sun Oct 20, 2013 3:54 pm
Location: Colorado

Re: Live Scoreboard not working

#11

Post by Stutgrtguy » Thu Sep 13, 2018 8:31 pm

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

#12

Post by jhronesz » Sat Sep 15, 2018 5:55 am

Works for me. Thank you!!!!!!

chuckie365
Posts: 12
Joined: Fri Jun 19, 2015 8:58 pm

Re: Live Scoreboard not working

#13

Post by chuckie365 » Sun Sep 16, 2018 4:31 pm

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

#14

Post by mspslb » 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.

mspslb
Posts: 17
Joined: Thu Sep 04, 2014 6:50 pm

Re: Live Scoreboard not working

#15

Post by mspslb » Sun Sep 16, 2018 4:38 pm

@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

#16

Post by mspslb » Sun Sep 16, 2018 5:10 pm

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

#17

Post by Smokey Jones » Mon Sep 17, 2018 2:56 pm

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: 161
Joined: Sun Oct 20, 2013 3:54 pm
Location: Colorado

Re: Live Scoreboard not working

#18

Post by Stutgrtguy » Thu Sep 20, 2018 3:40 pm

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: 45
Joined: Tue Oct 15, 2013 3:19 pm
Contact:

Re: Live Scoreboard not working

#19

Post by Russaholic » Thu Nov 01, 2018 8:09 pm

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

#20

Post by fbonani » Sat Aug 17, 2019 4:49 pm

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: 45
Joined: Tue Oct 15, 2013 3:19 pm
Contact:

Re: Live Scoreboard not working

#21

Post by Russaholic » Fri Sep 13, 2019 8:29 pm

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

#22

Post by fbonani » Fri Sep 13, 2019 8:45 pm

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

#23

Post by goose » Thu Aug 20, 2020 10:18 am

Does anyone have the new url for scores? Looks like the old one stopped working.

User avatar
Stutgrtguy
Posts: 161
Joined: Sun Oct 20, 2013 3:54 pm
Location: Colorado

Re: Live Scoreboard not working

#24

Post by Stutgrtguy » Thu Aug 20, 2020 3:14 pm

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: 161
Joined: Sun Oct 20, 2013 3:54 pm
Location: Colorado

Re: Live Scoreboard not working

#25

Post by Stutgrtguy » Wed Sep 09, 2020 4:02 pm

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

Post Reply