Automating our club Web site

I’m hoping some of you computer gurus out there can help me with our club Web site (morgantownchess.org). I’m trying to automate updating the club roster to include the latest ratings from USCF.

Has anyone tried to do this before? If so, how have you done it? I was envisioning some kind of script or PHP page that draws the ratings from USChess Web site once a month or so and puts them into an XML document. Then the club roster can use draw the new ratings from the updated XML page. I can’t quite figure out how to get them off of the USCF Web site without some kind of database connection. I suppose it might be possible for PHP to load the individual ratings pages and scan them for the latest rating. But that might be beyond my programming capability. Anyway, let me know if you’ve found a solution.

Thanks!

If I was doing it, Eric, I’d probably write a PHP script that opens a ‘thin client’ MSA query for each member of your club.

There is some information on this, but not an example in PHP, on the MSA home page, msa.uschess.org

I use to have a page on our site that I took down because it got out of date member wise. But on that page along with their club status etc were links from their names if they were USCF members. This was done by simply applying a hyperlink to their name to their USCF page which is basically like the following. uschess.org/msa/MbrDtlMain.php?11315844

The uschess.org/msa/MbrDtlMain.php? always stays the same. The only thing that changes is the players USCF ID number.

Once you have set up your hyperlink you never have to update it.

Wayne, I cannot guarantee that the URL for the MSA page will remain constant as the website evolves, so there may come a time when either method, yours or mine, may no longer work.

I am somewhat more inclined to think that the ‘msa.uschess.org’ shortcut will continue to work than one which starts with ‘www.uschess.org/msa’, because I have more control over the former.

Eventually we would like to change all the current content from using ‘main.uschess.org’ to using ‘www.uschess.org’ and take all the out-of-date stuff on ‘www.uschess.org’ and put it somewhere else for archival purposes, but that’s still in the ‘talking about’ stage.

However, both URLs should get you to the same place for now.

This is true but it would be a simple matter to change your hyperlinks if you had to. It isn’t like it would be happening everyday. On the other hand what I am suggesting isn’t exactly what was being looked for. I think Eric probably wants a page that updates itself and looks basically like the following.
Wayne USCF 1660
Jimmy USCF 1640
Mickey USCF 1700 etc

He could probably create something like this using the ability to create lists to download MSA data and then turn that list into a webpage. It just wouldn’t be quite that automatic.

Assume that someone has a list of USCF IDs of club members.

It wouldn’t be that hard to write a PHP program that queries MSA for the current published rating for each of those players using the ‘thin client’ web interface described on the MSA home page.

Running that once a month (a day or two after the 1st Friday of the month) would result in an up-to-date list of the current published ratings of all those players.

I suppose they might want to track each player’s current rating as well as what that rating will become on the 1st of the next month so that they have both the published rating that TDs are supposed to used this month as well as what they should use for events that start next month.

Thanks for the great information.

I am looking for something that will show the player’s name followed by their rating. I’m also hoping to be able to use the resulting XML document to grab information for tournament results. Of course I’ll have to make a static page or something so that the ratings don’t change on the tournament results sections, but anyway.

I’ll check out the “thin client” page. It might be simple enough that I can grab just the information I’m looking for. By the way what do you mean here:

I noticed on the MSA page that you can look up more than one USCF ID number. Is that what you’re talking about?

Update: It appears that the thin client (at least the one at uschess.org/msa/thin3.php?13627390) only contains the ratings from December, not the latest rating from February. Is there another page that might contain the newer rating?

That’s because as of today, 2/20/08, your December 2007 rating is still your most recent published rating, which is the rating that TDs should use for a tournament that begins TODAY (unless they have announced otherwise in their advance publicity.)

If you want to see your published rating from some other point in time, you need to add the date you’re interested in, such as this:

msa.uschess.org/thin3.php?13627390;2008-03-01

Starting with that assumption I wrote a PHP page that uses the thin client to read current published ratings. Once a month it updates the ratings and drops inactive players from the list. I sent the page to my local club to be published. Feedback is positive, but there is also concern about the maintenance of adding new members every month.

Would it be possible to create another thin client (thin4.php) that lists all member IDs that have played in tournaments by a given affiliate ID in the past year? It would then be feasible to have a self-updating rated list for a club. I would be happy to share the php page with interested clubs.

It’s possible, but for some affiliates the list could be rather long. (Consider how many people play in USCF national events each year, which are under the USCF’s affiliate ID.) That would seem to me to violate the ‘thin client’ precept of returning a minimal amount of data.

There’s also a bit of potential for the misuse of such a tool. Suppose that two rival affiliates want to bar players who have played in events held by the OTHER affiliate from preferred status in their own events. (It’s happened more than once.)

I don’t think this one will make it to the top of the wish list soon, certainly not without further thought as to other possible problems with it.

I had considered that certain affiliates that run large tournaments would not find this useful. It didn’t cross my mind that it would be mis-used, but that is a valid concern. Thanks anyway for looking at the idea.

Having thought about it overnight, the best place for this may be as part of the TD/Affiliate Support Area, so that affiliate can request the information, but only for players in events rated under their affiliate ID.

My local club has not posted the page, so I put it on my non-chess website. I also included a link to download the file with instructions on how to use this file for other clubs. The file is available to interested clubs at:

Edited to removed link; that page is no longer supported.

Mike Nolan,

Will you please enable one of the thin clients to return the current unofficial rating? Many people in our club play rated games every week. The official published rating is updated once a month and it is delayed. I would like to have the rated club roster on the website reflect the previous week’s results.

Thank you in advance for considering this request.

I am reluctant to do that because USCF policy is that official published ratings should be used for events, not unofficial ratings.

Also, that number can change throughout the day, and what the thin client tool would get from the database may not be what MSA currently has, since MSA is updated several times a day and may not always have the same current unofficial rating that internal records have.

Moreover, when a new event is added, it is initially placed at the end of the list, thus becoming the ‘most recent event’ for that player, but when the next rerate is run (currently on Tuesdays), that event is placed into chronological order and may no longer be the player’s ‘most recent event’. And if you query the USCF database during the middle of a rating or rerate cycle, the ‘most recent event’ is even harder to pin down.

TDs who use unofficial ratings for events do so at their own peril and must notify the players what ratings they’re using. They should also be prepared to deal with questions or problems arising from using unofficial ratings.

Suppose you’re running an event on Saturday. Early Friday evening you look up everybody’s current unofficial rating with a thin client tool.

Later that same evening one of the players in the event also looks up his current unofficial rating on MSA.

When he gets to your tournament site on Saturday morning, the rating you show for him is the one you looked up Friday evening. However, the rating he saw is different, and to make matters even more confusing the current rating that MSA now shows is different from either of those two numbers.

If this difference happens to place him just below the break rather than just above it (or vice versa), it will have a major impact on his pairings for the event.

The advantage of using published ratings is that everyone is literally on the same page.

I expect TDs to use official ratings for events, as they should. The purpose behind my request is not to create a reference list for official ratings, but to provide more frequent updates as I try to pass a player or avoid being passed on an unofficial club list. The unofficial rating is arguably just as accessible as the official rating on MSA, but TDs know not to use it for events.

I think they can use them, but they need state in advance that they are doing so.

What TDs “know” and what they “do” often differ. Mike Nolan’s post outlines the Pandora’s box of problems that “instant” unofficial ratings would create.

One time when I ran my summer tournament, the mother of one player was visibly upset that her son was listed as ‘unrated’ on the pairing sheet. At the time I think he had an unpublished rating based on 3 games plus another recently rated event that was rated after the cutoff for the most recent ratings list.

When that player received a medal in the Unrated group (I think he would have finished 5th in his ratings group, with no medal), the mother seemed far less upset.

That happened to me when I first learned to play chess 12 years ago.
I entered a High School scholastic and did poorly.
The chief TD’s (who is a good friend of mine, now) mother passed away and he didn’t get the rating report in for a month.
I went to my next tournament 5 weeks later and was listed as unrated.
I got the 1st place unrated trophy. Lucky me (o:

Since there was no such thing as rerates back then so the latter tournament was rated first.
I was provisional so the ratings wash out, I believe.
Its funny to think about though.