Recent Widgets


Register for DashboardWidgets

Recent Forums Posts

Partners


iCompositions

MacDesktops.net

RSS Showcase
RSS Comments
RSS Forums

This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. Posted in: Widget Requests

MLB Scores Widget Request...

Author Message
adam1185



Joined: 11 Apr 2005
Posts: 1

Posted: Mon Apr 11, 2005 - 11:47 pm    Post subject: MLB Scores Widget Request... Reply with quote

Who's up to the task of creating a MLB widget so people can check the up to date scores...?

Thanks
View user's profile Send private message Send e-mail Widgets
ryebrye



Joined: 14 Apr 2005
Posts: 8
Location: Provo, UT

Posted: Thu Apr 14, 2005 - 10:30 am    Post subject: I've done a bit of work, but nothing substantial Reply with quote

I wanted the same thing - only I was going to just build a Red Sox module Razz

From what I've found, the best place to get the XML feed would be from ESPN's scoreboard page. Very well written HTML and javascript on that page - and it would probably be fairly easy for someone who knew what they were doing to play around with that feed.

here's what I mean...

Here's a snippet of JavaScript from the page, on how it gets its scores:
Code:

function fetchDoc()
{
   try {
      currentRequest = null;

      handleCasterMessage("nothing  ", "doing fetch Now");
      var rand = "&" + Math.floor(Math.random()*10000000);
      if (window.XMLHttpRequest)
      {
         currentRequest = new XMLHttpRequest();
         currentRequest.onreadystatechange = processStateChange;
         currentRequest.open("GET", updateURL, true);
         currentRequest.send(null);
      } else if (window.ActiveXObject)
      {
         currentRequest = new ActiveXObject("Microsoft.XMLHTTP");
         currentRequest.onreadystatechange = processStateChange;
         currentRequest.open("GET", updateURL, true);
         currentRequest.send();
      }
   } catch(e) { showmessage(e.message); }
}


Hmm... look familiar? There are a lot of methods in the page that grab data from the XML feed and update things. It would be easy to take their feed and lift it out and make a scoreboard widget with it.

I don't know enough to do it, however, and I'm in the middle of finals right now. If nobody has read this post and jumped on it in a week I will take a stab at figuring this stuff out.

Check out:
http://sports.espn.go.com/mlb/scoreboard
And view the source to see what I mean.

I looked at all the other scoreboard pages, and they didn't look very nice to work with.
View user's profile Send private message Send e-mail Visit poster's website AIM Address Widgets
ryebrye



Joined: 14 Apr 2005
Posts: 8
Location: Provo, UT

Posted: Mon Apr 25, 2005 - 3:46 pm    Post subject: Basic tutorial maybe? Reply with quote

Does anyone have a basic tutorial to teach me how to do this myself? I'm familiar with programming concepts, and with html/css and I'm also pretty handy with graphic design stuff... but it's been a while since I've done any JavaScript...
View user's profile Send private message Send e-mail Visit poster's website AIM Address Widgets
stukdog



Joined: 25 Apr 2005
Posts: 11

Posted: Tue Apr 26, 2005 - 5:32 pm    Post subject: Reply with quote

Sports scores is a great idea!!! Maybe some way to pick a sport then a team and just have it real simple and stackable
View user's profile Send private message Send e-mail AIM Address Widgets
ryebrye



Joined: 14 Apr 2005
Posts: 8
Location: Provo, UT

Posted: Mon May 09, 2005 - 12:06 pm    Post subject: Scoreboard widget - still requesting :P Reply with quote

I know that it wouldn't be all that difficult to get the data. ESPN would be the best source. I copied their file to my local computer, changed a few parameters - and was able to have it grab the data from their server when hosted via my apache here... so they allow outside feeds to steal their data (as of now) - if you put an ESPN logo on the widget somewhere they probably wouldn't care.

I'm willing to do some legwork on this one - but I'm not the most experienced programmer in this arena.

Ryan
View user's profile Send private message Send e-mail Visit poster's website AIM Address Widgets
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.

 
Powered by phpBB © 2001, 2002 phpBB Group