I continued with the new ‘map-first’ front-end for the Iona project this week, adding in an option to reset the map to the default view on the ‘Home’ section adding the scale of the map to the bottom left. I then spent quite a bit of time working on a first version of the ‘Browse’ option. Pressing on the ‘Browse’ accordion header now displays a drop-down list through which you can select what type of browse you want to do. This defaults to ‘Current place-name’ and displays the letters that place-names begin with together with a count of the number of places beginning with each letter. The browse accordion replicates all that is found on the browse pages of the place-names resources I’ve previously developed (e.g. https://berwickshire-placenames.glasgow.ac.uk/place-names/?p=browse), but is much more efficient with the use of space. Pressing on a letter updates the map markers to only show those of places beginning with the letter, as the following screenshot demonstrates (with a pop-up open):
I haven’t implemented the automatic zooming to show all markers yet, and selected display options such as categorisation are not yet remembered, but I will be adding these features in. The other browse options are also all fully functioning, although ‘Parish’ might not be much use as currently every place-name is found in the same parish. ‘Source’ has a lot of data, but the area scrolls so I think it works ok. The screenshot below shows a browse for sources with ‘Admiralty Chart no. 2617’ selected:
I also implemented the quick search this week, which as with the other place-name resources searches current names, historical forms and elements. The screenshot below shows a search for ‘cnoc’, zoomed in on the north of the island with labels turned on:
Note that in addition to pressing the ‘reset map’ button on the ‘Home’ section if you’ve performed a quick search and want to reset things you can just delete the text from the searchbox and press the search button. I hope to be able to continue with this next week. The big things remaining are the advanced search, the full place-name record popup and also what to do about the elements glossary. There are lots of smaller things still to do too, such as allowing specific views to be bookmarked, shared and cited.
I spent most of the remainder of the week preparing the sites on our internally hosted server for an upgrade to PHP8. This involved getting PHP8 working on my local PC and then setting up each site locally with errors turned on in order to test each script. I’ve also been taking the opportunity to deal with any warnings and notices, plus upgrading jQuery where applicable. The only fatal issue I’ve encountered so far has been the use of the ‘usort’ function with a Boolen return value, which is deprecated in PHP 8 (see https://stackoverflow.com/questions/65382799/what-happened-in-php8-0-0-to-break-usort-intstrlenastrlenb). This has affected a few sites. Other than that I’ve not found anything that breaks in PHP8. I haven’t finished checking all sites yet, but will hopefully finish this tedious but necessary task next week.
Also this week I helped Petra Poncarova with an issue with her project website. She was wanting to add accordions to pages and I found and installed a plugin that works with the Classic WordPress editor (https://en-gb.wordpress.org/plugins/easy-accordion-free/). It’s very easy to use and I added an accordion section to one of the pages on her site to show how it works: https://erskine.glasgow.ac.uk/people/donald-sinclair/.
I also gave some advice to Craig Lamont as he works on the banner for Rhona Brown’s new website, spoke to Thomas Clancy about another new place-names project and arranged to have a new WordPress site set up for a project Gavin Miller is setting up.