Live Scoreboard not working
-
- Posts: 14
- Joined: Fri Jun 19, 2015 8:58 pm
Live Scoreboard not working
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!
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!
- Smokey Jones
- Posts: 13
- Joined: Fri Sep 07, 2018 10:08 am
- Location: TN
- Contact:
Re: Live Scoreboard not working
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.
Re: Live Scoreboard not working
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.
- Russaholic
- Posts: 58
- Joined: Tue Oct 15, 2013 3:19 pm
- Contact:
Re: Live Scoreboard not working
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.
-
- Posts: 7
- Joined: Tue Sep 11, 2018 7:50 am
Re: Live Scoreboard not working
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?
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?
Re: Live Scoreboard not working
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
New
scripts/scoreboard.js
Old
New
Old
New
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
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
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";
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;
Code: Select all
xhr.queryString = "url=" + escape(scoresUrl + "?random=" + Math.floor(Math.random() * 10000000));
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.
-
- Posts: 4
- Joined: Tue Sep 11, 2018 4:50 pm
Re: Live Scoreboard not working
the update seemed to work for me, thanks for posting
-
- Posts: 59
- Joined: Thu Sep 05, 2013 3:21 pm
Re: Live Scoreboard not working
I made all the changes, but not getting the updated scores
- Smokey Jones
- Posts: 13
- Joined: Fri Sep 07, 2018 10:08 am
- Location: TN
- Contact:
Re: Live Scoreboard not working
Changes worked well for me. Thanks for the assist!
- Stutgrtguy
- Posts: 167
- Joined: Sun Oct 20, 2013 3:54 pm
- Location: Colorado
Re: Live Scoreboard not working
WORKED!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
OldNewCode: Select all
if ENABLE_SCORES_ADDON then Response.Write(vbTab & "<script type=""text/javascript"" src=""scripts/scoreboard.js""></script>" & vbCrLf) end if
scripts/scoreboard.jsCode: 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
OldNewCode: 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";
OldCode: 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;
NewCode: Select all
xhr.queryString = "url=" + escape(scoresUrl + "?random=" + Math.floor(Math.random() * 10000000));
Code: Select all
xhr.queryString = "url=" + escape(scoresUrl + "&random=" + Math.floor(Math.random() * 10000000));
Thanks!
Re: Live Scoreboard not working
Works for me. Thank you!!!!!!
-
- Posts: 14
- Joined: Fri Jun 19, 2015 8:58 pm
Re: Live Scoreboard not working
Is it working now for everyone?...mine isn't updating scores on Sunday. Thanks!
Re: Live Scoreboard not working
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.
Re: Live Scoreboard not working
@Chuckie365 - having that issue as well. Games show up correctly, but no scores since the THursday night game.
Re: Live Scoreboard not working
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.
- Smokey Jones
- Posts: 13
- Joined: Fri Sep 07, 2018 10:08 am
- Location: TN
- Contact:
Re: Live Scoreboard not working
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.
- Stutgrtguy
- Posts: 167
- Joined: Sun Oct 20, 2013 3:54 pm
- Location: Colorado
Re: Live Scoreboard not working
Yep ran into this as well, I reverted, back and oddly enough the scoreboard started working? I'm at a loss....strangemspslb 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.
- Russaholic
- Posts: 58
- Joined: Tue Oct 15, 2013 3:19 pm
- Contact:
Re: Live Scoreboard not working
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.
Re: Live Scoreboard not working
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.
- Russaholic
- Posts: 58
- Joined: Tue Oct 15, 2013 3:19 pm
- Contact:
Re: Live Scoreboard not working
Fbonani,
You can turn the scoreboard on/off in the includes/config.asp file around line 243.
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
Re: Live Scoreboard not working
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.
Re: Live Scoreboard not working
Does anyone have the new url for scores? Looks like the old one stopped working.
- Stutgrtguy
- Posts: 167
- Joined: Sun Oct 20, 2013 3:54 pm
- Location: Colorado
Re: Live Scoreboard not working
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
I hadnt noticed till you pointed it out....
Im sorry I don't, just one more thing to look into this year
- Stutgrtguy
- Posts: 167
- Joined: Sun Oct 20, 2013 3:54 pm
- Location: Colorado
Re: Live Scoreboard not working
You all realise what this means right? I may be wrong but I'm thinkin we will have to input scores manually...