Results

Revision as of 08:56, 12 May 2019 by 162.158.34.217 (talk) (Created page with "From: Trevor Kirkham <[email protected]><br> Date: Thu, 2 May 2019 at 09:49<br> Subject: New automated official results<br> To: Steve Jones <[email protected]><br> Cc...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

From: Trevor Kirkham <[email protected]>
Date: Thu, 2 May 2019 at 09:49
Subject: New automated official results
To: Steve Jones <[email protected]>
Cc: Cathy Wynne <[email protected]>, James Smythe <[email protected]>


Hi Steve

You may have heard about the new system that creates the Official Results document after the regatta. It's part of the live Regatta Results system (regattaresults.org.uk). We tested it after the first regatta and Cathy used it for the regatta just gone.

When the Official Results document has been created it is automatically uploaded to the Current Year page and the Official Results document for 27/28 April was created this way and is now already live on the canoeracing/sprint website.

This works by the document being automatically uploaded to a new folder on canoeracing/sprint called 'officialresults'. The code on the Current Year page, for the Official Results line only, has been changed to:

[wbcr_php_snippet id="13975" regatta_id="XXX"]


wbcr_php_snippet is a php plugin.

id="13975" is simply the identifier for the code snippet I have written that finds and displays the official results.

regatta_id = "XXX" is the code for the regatta in question. XXX is the number of the regatta. For 27/28 April, the regatta id is 113. For 1/2 June the regatta id is 114, for 29/30 June the regatta id is 115, and so on.

I have put all the relevant lines in for 2019.

When you create the page for 2020 you can copy and paste as you have been doing and just change the regatta_id. The first regatta in 2020 will be 117 and you'll need to replace the official results line with [wbcr_php_snippet id="13975" regatta_id="117"] because we didn't introduce this new system for the first regatta of 2019. Then just change the regatta ids in the remainder to 118, 119, etc.

Incidentally, you don't need to comment out this new official results line because the code snippet checks if the file exists and won't display the icon if it doesn't.

The only thing is, even though publishing the Official Results document is automated, someone still needs to broadcast on Facebook to tell everyone. Perhaps this is something Cathy will do after she has pressed the 'Publish to Web' button.

If there is a need to publish a newer version then Cathy still does this automatically by amending the data held in the Regatta Results system and republishing the document. The earlier version is overwritten by the new version so there's no need for v2 in the file name. In other words, there's nothing you need to do. Cathy will keep an archive of hard copies of the versions on her PC.

You will no longer upload or see the Official Results document in the Media library as it is now saved elsewhere (in the separate 'officialresults' folder).

Hope this makes sense. Have a look at the Current Year code and get beck to me with any questions.

Kind regards
Trevor