Thursday, May 29, 2008

Refactoring of code

Just taken the decision to try to refactor the stats site using Code Ignitor. This should make things easier to maintain and develop - as well as facilitating the adding of nifty JavaScript and Ajax effects. This was something that was proving to be very difficult with the current way the site is programmed.

Tuesday, April 29, 2008

JavaScript, AJAX

Finished the Open University module on client-side scripting now, so I'm now a fully qualified JavaScript coder. Sort of. So, over the next few weeks, I'll be experimenting with adding some nifty JavaScript and Ajax effects to the site. I've plumped for using Prototype and Rico.

Wednesday, December 26, 2007

NFL Style weekly scoreboard

I've put together a NFL-style weekly scoreboard which shows each game's boxscore together with the best rushing, passing and receiving performances. The page originally looked terrible in Internet Explorer, but after debugging the generated XHTML and CSS, the page looks OK now. Thanks to the XHTML and CSS validators for tracking down the bugs - this just shows how important valid XHTML is when trying to get Internet Explorer to display things how you think it should.

Anyway, the page can be seen at the FWL weekly summary page.

Labels: , ,

Thursday, November 29, 2007

Game Reply version 1

I've now got a basic game-replay facility working on the site (see http://www.battyeweb.org.uk/fwl/gameparser.php?play=1). This displays such things as quarter, time-left, who is in possession, down and distance, and the current score, together with the play descriptions from the FBPro log file.

Before a game can be replayed in this way, its log file has to be converted to an XML file - this is done using a Visual Basic program running inside Excel. Then, PHP takes over and parses the XML file and produces the html for the web page.

I'd like to convert this to an AJAX-style page, so that the whole page does not have to refreshed after every play. I'd also like to include in-game team and individual stats - this can be done quite easily by interrogating the XML file using Xquery or XSLT. Put it on the list of things to do!

Thursday, November 8, 2007

Adding little bits, learning more

The PHP scripts that make up the stats pages have now been packaged and distributed to two other on-line leagues. One of the leagues now has a whittled-down version on their pages . Hooray! The other league is having trouble getting everything to work - hang on in there! The main problems have come from the league owners having newer versions of Sundby's GAMESTAT program.

I've updated the scoring-summary pages so that the names in the individual stats pages are now linked to the players' own page. I'll try to add the same functionality to all pages as and when.

I'm still working on the game-reply page. I'm now thinking of using AJAX, XML and XSLT to do this. I'm going to use XSLT to generate individual game stats from the XML game-log, which will update as the game progresses. This could cause a few headaches. Time to learn some JavaScript, or whatever it is called today.

Tuesday, September 11, 2007

Time for a Make Over?

Well, the new NFL season is upon us, and the scoreboards over on NFL.com look rather nice (Current NFL scoreboard). Maybe the old FWL site should be updated to look at bit more like this, with scores by quarters and statistical leaders for each game. It might also involve using some graphical logos for each team, which shouldn't be a problem except for the "imaginary" teams.

Tuesday, August 14, 2007

Sortable Tables

Not being much of a JavaScript type of person, finding a nice routine to generate sortable tables on brainjar was a relief. So, another thing to add to the list of things to do is to create a nice php class to generate sortable tables and then update all the scripts to use the class.