Event naming conventions

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Event naming conventions

paul frost
I'm an orienteering club website developer and trying to write some template code that can automatically generate the links to results pages and RouteGadget. The urls are so long and complicated and there doesn't appear to be anywhere that whoever is adding the content to the website can copy that link from.

I've read the post Direct link to leaderboard but would like some more clarity.

Looking at the event listing in the app there are differences in how it looks.
There is the event name,  and underneath in lighter text and italic there are variations on the name above.
Sometimes they are identical but usually they they have:
PXAC, PXAS, PXAC PZ, PXAS ScoreV60, PXAS PZ ScoreQ40 on the end or somewhere in the middle. For example:
Main title: Dess Festival  2019 v3 PZ
Italic: Dess Festival PXAS Score45 2019 v3 PZ

Main: Birkrigg Score45  LOC
Italic: Birkrigg Score45 PXAS Score45 LOC

I've searched through the help pages and I can't find a reference or guidance on naming structure/convention.

Having no consitancy in the naming convention makes it hard to create links automatically.

As a competitor, on my phone, having the two titles makes it hard to scan down the page and work out the subtle differences when there are similar named events.
www.pfweb.co.uk
Reply | Threaded
Open this post in threaded view
|

Re: Event naming conventions

MichaelRaz
Hi Paul,

Not completely sure on what your looking at for your final goal but I will try to provide some input (as I was the main contributor to the "Direct link to Leaderboard" thread you mentioned.

https://maprunners.weebly.com/event-types.html is a good start point to better understand the types of events, hence some of the naming conventions required in the event names that are submitted when setting up a new one as administrator.  This is also the source of the two names you see in the app.  The top, most bold name has the various codes parsed out although I have noticed at least one bug (just looking at my events so may not still be the case - I'll note this in a moment). Your Birkrigg example shows this except you missed typed the second Score in the italic version - ScoreV45.  So the second line is the actual (assigned by the admin who submitted it) name which includes the codes PXAS and ScoreV45:
Birkrigg Score45 PXAS ScoreV45 LOC  
These codes are parsed out to produce the "friendly" name:
Birkrigg Score45  LOC

I noticed in a couple of my events where I used uppercase SCOREV60 where this was not parsed out in the friendly name - so likely missed because all uppercase?.  Also I noticed that the PZ code (Pin required) remains in the friendly name but I suspect this is as expected since this lets users know quickly that they need to have a PIN to run this (don't bother downloading and driving all the way out to a site only to discover you can't run it).  It could be argued that this is not obvious to everyone and could be replaced with "PIN Needed" - perhaps a feature request.

As I noted at the start I'm not sure how/where you plan on pulling data so the best I can tell you is the two types of results URLs are based on the long event name (as described in the mentioned thread). The differentiation is between a point to point (PXAC) and Scatter type event (PXAS):

ScoreResults_Birkrigg Score45 PXAS ScoreV45 LOC.csv
CombinedResults_Pilgrims Hatch Long PXAC.csv

As the admin guy for my club I put up all the events and maintain a spreadsheet that automatically combines the name into the url for results that I can include in the website when I post the new event.  This whole thing has become even easier as the MapRun Admin console now provides the results URL when a new event is uploaded (as well as a downloadable QR code) so I can now just copy/paste.  I have not tried coding generically taking an event name and doing looking for the PXAC or PXAS and building the corresponding results URL - I suspect it would work but may have some exceptions??

Regarding your last line: As far as overall naming conventions other than the required codes and bits and pieces mentioned in the link above, I don't see how successful it would be trying to impose something more standardized across all the clubs world wide. I do wish I had been more consistent when I started using Maprun for my club but I didn't! Perhaps some suggestions would be handy but not sure how useful - it becomes more a club thing. Not to ignore your suggestion that having two titles make it hard to work out, I don't personally find it an issue and could be useful if two friendly names are too similar - although that may be more because I'm familiar with the meaning/layout of the actual name with the codes.

The RouteGadget link is much trickier as it requires the Event ID which is not generally easily made available outside of the initial event set-up where it is provided or from the the admin console.  Also obtainable from within a web results page with some digging - nothing I know about however to pull this in any general way - someone else may know something or correct me.  Again, from my perspective this is not an issue as I set up up the events and the web - doing generically is obviously harder!
Reply | Threaded
Open this post in threaded view
|

Re: Event naming conventions

paul frost
Thanks Michael,

I don't have an admin account so don't know how it all looks there.
I've been including MapRun events into the clubs event listings page on the sites I've built recently. So I've been copy pasting the event names and links from the old site. I've set up data fields in the CMS to store the content. To make it easeier for people to find a suitable event and then find the chosen MapRun on their phone I thought it would be helpful to list:
MarRun Directory path: eg. UK/Essex/
Filename: eg. Braintree Bocking
Course Type: eg. Line
Number of Controls: eg. 13
Length or Time: eg. 6km
Map download: link to PDF
Results: eg. http://www.p.fne.com.au/rg/cgi-bin/SelectResultFileForSplitsBrowserFiltered.cgi?act=fileToSplitsBrowser&eventName=CombinedResults_Braintree%20Bocking%20PXAC.csv
Tracks: eg.http://www.p.fne.com.au/rg/cgi-bin/reitti.cgi?act=map&id=9437

You can see the result here https://www.stragglers.info/anytime/braintree-bocking

But when I came to do similar on my own clubs website there weren't the existing links to copy. We have MapRuns that were setup by the Scottish central admin person but the Scottish Orienteering website list of MapRuns doesn't include any links to results or RG. So I was trying to work out how to make the link up fromm what I knew.

I also suspect that many website content editors/managers are not the MapRun administrator, so they don't have access to the MapRun control panel. So how would they be able to work out what the link to results and RG is? That's why I thought that I would automatate the link creation from what I thought was the unique filename.
But it seems that the filename (if that is the correct term) used when creating a new event is not what it seems. The allowing of empty spaces in filenames is usually avoided in web files and the URL is created automatically by converting all capitals to lower case and inserting dashes to replace spaces.

In my websites I force a consistant naming for events. I have a data field for the Name or Venue of the event and and another for the date, then I append the date to the Venue to make sure that there can't be 2 URLs the same and then save it in a url correct format eg. colchester-2022-05-15.

I guess the problem is that because there is no single unique date for a MapRun event the title/filename needs to include all the technical junk that makes it unique and defines it.
In hindsight it might have been best to generate a unique ID (like in RG) at the beginning and then collect all the component parts that define the event in seperate data fields referenced to that ID and then build the links to results etc. behind the scenes using the data from the referenced ID. Rather than having every component part out there in the very long url, and made even more complicated by the fact that there are spaces, which aren't allowed, so there are loads of %20 repeated all through it.

I use the Craft CMS, and every title, text-content, image or document is in it's own database table and has a unique ID, then the relationships between all those things is stored in another table which can then be joined together as required by whatever part of the app or website needs it.
www.pfweb.co.uk
Reply | Threaded
Open this post in threaded view
|

Re: Event naming conventions

MichaelRaz
Hi Paul,

I can't argue with you on how things might have been done differently with the event production but I suspect it all made sense way back in the early days of the product and not sure anyone expected the large scale growth.  Suspect it would be very difficult to do major changes now and retain backwards compatibility - but outside my skill and knowledge.  In one application I used I did handle the space %20 issue before processing but it doesn't really seem to matter (although I agree it makes for messy URLs).

I also see the issues with going back to populate a web page with existing events without easy access to the initial information.  It is all much easier when you are the one setting up the events.  No different from the standard issue we all likely have making sure the people who actually design the courses  provide the correct information.  

One other thing that is new and could be handy to add into your information is, when setting up a new event, another piece of information that is provided is a url and QR code to link specifically to the event.  For example a user can scan the QR code from their phone  and MapRun6 will open up and load that specific event.  Although the URL is based on the eventID it does include a ?Auth parameter that I do not know what it is based on.



Perhaps a good feature request to submit is where an admin can download a list of all his/her events and associated information at one time?  This is available to the admin (Event- Display MapRun Link for Event) one event at a time currently.  As a complete list it might be easier to back track and add previous events into a web page through some transforming code.  This still requires the admin people to feed it to you.
Reply | Threaded
Open this post in threaded view
|

Re: Event naming conventions

Peter Effeney
Administrator
In reply to this post by paul frost
Paul,

The event name in MapRun is the full name including any codes like PXAS, PXAC etc.

These names are globally unique and are used to link events and results together.

In some places within listings of events, we have a "Short Name" which is simply the authoritative event name with all of the codes removed to reduce the clutter. These names are not guaranteed to be unique. I don't recommend using short names as a linkage point for event listings or results.

The URL of the results for a particular event is a simple concatenation of a base URL, the type of result (Combined (for splits) or Score) and the full name of the event with .csv appended.

If you are wanting to provide a listing of MapRun Events in a club website or be able to provide a map of the events, there is an API available for this purpose. Contact support@maprun.net for further info.

Peter