Week Beginning 13th November 2017

I mostly split my time this week between three projects: The Dictionary of the Scots Language, SPADE and SCOSYA.  For DSL I managed to complete the initial migration of the DSL website to WordPress and all pages and functionality have now been transferred over.  Here’s what’s in place so far:

  1. I have created a WordPress theme replicating the DSL website interface
  2. I have updated the ‘compact’ menu that gets displayed on narrow screens so that it looks more attractive
  3. I have replaced the existing PNG icon files with scalable Font Awesome icons, which look a lot better on high resolution screens like iPads. In addition I’ve added a magnifying glass icon to search buttons.
  4. I have created WordPress widgets for the boxes on the front page, which can be editable via the WordPress Admin interface. DSL quick search displays the quick search box.  DSL welcome text contains the HTML of the welcome box, which can be edited.  DSL word of the day is what you’d expect, and DSL announcement text and social media links contain the HTML of these boxes, which can also be edited.  I decided against tying the ‘announcement’ section into the ‘news’ posts as I figured it would be better to manually control the contents here rather than always have it updating to reflect the most recent news item.  Any of the widgets can be dragged and dropped into the front page widget areas and the order of them can also be changed.  My DSL widgets can also be added to the standard sidebar widget area too, and I added the ‘word of the day’ feature to this area for now.
  5. The ‘core’ dictionary pages are not part of WordPress but ‘hook’ into WordPress to grab the current theme and to format the header and footer of the page. So, for example, the ‘Advanced search’ page and the ‘entry’ page are not found anywhere in the WordPress admin interface, but if you add a new page to the site menu then these non-Wordpress pages will automatically reflect these changes.
  6. I created a ‘News’ page as the ‘blog’ page and content can be added to this or edited by using the ‘Posts’ menu in the admin interface. Currently all news items get listed on one page and you can’t click through to individual news items, but I might change this.
  7. All other pages are WordPress pages, and can be edited (or new ones created) via the ‘Pages’ menu in the admin interface. I have migrated all of the DSL pages across, as some of these are rather structurally complicated due to there being lots of custom HTML involved.
  8. I have created one additional SLD page: ‘About SLD’. I copied the contents from the page on the current SLD site – just highlighted the text in my browser and pasted it in and the formatting and links carried over.  I did this mainly to show the SLD people how such pages can be migrated across.
  9. I created two page templates that are available when you create or edit a page. These can be selected in the ‘page attributes’ section on the right of the page.  The default template is used for the main DSL pages and it is full width – it doesn’t feature the WordPress sidebar with widgets in it.  The other template is called ‘With Sidebar’ and it allows you to create pages that display the sidebar.  The sidebar will feature any widgets added to it via the ‘widgets’ menu.  It took a bit of time to figure out how to create multiple page templates but once I figured it out it’s actually really simple:  You just make a new version of the index.php page and call it something else (e.g. index-2col.php) and then add text like the following at the very top of the file: <?php /* Template Name: With Sidebar */ ?>.  Then you can make whatever changes you want to the page design (e.g. changing the number of columns) and the user can select this template via the ‘page attributes’ section.  I needed to update which template file some of my structural elements were found in, so that I could include or exclude my side column, but with these changes in place the different layout options all worked perfectly.

I emailed Thomas and Ann at SLD about the new version of the site and they are going to play around with it for a while and get back to me.  I think I’ve finished work on this rather more swiftly than they were expecting so it may be a while before any further work is done on this.

For the SPADE project I met up with Rachel again and we spent a morning continuing to work on the Polyglot server.  Following some helpful advice from the team in Montreal we managed to make some good progress this week with running some sample texts through the Polyglot system.  Rachel had picked out six audio files and accompanying text grid files from the ‘sounds of the city’ project and we prepared these to be run through the system, and updated the system config files so it knew where to find the files, and where to place the outputs.  With it all set up we ran the script for extracting sibilant data, and it began processing the files.  This took some time but progress was looking good, until we received an error message stating that PRAAT had encountered errors when processing consonants.  As the error message said ‘please forward the details to the developers’ we did just that.  We received some further replies but as of yet we’ve not managed to get the script to work and we’ll need to return to this next week.  Progress is being made, at least.

For SCOSYA I finally managed to return to updating the Atlas interface.  The Atlas uses the Leaflet.js mapping library, and when I first put the Atlas together the current stable version was 0.7.  It’s now up to version 1.2 and I’ve upgraded the library to this version.  As there are some fairly major differences between versions it’s taken me some time to get things working, but it’s been worth doing.  With the previous version the tooltip hover-overs had to be implemented by a further library, but these are now included in the default Leaflet library, and look a bit nicer.  Another advantage is the sidebar will now scroll using the mouse wheel when it’s taller than the page.  I’m also now using a more up to date version of the Leaflet data visualisation toolkit library, which produces the polygon markers.  These things may seem rather minor but making the update will ensure the atlas continues to function for longer.

I’ve also updated the attribute search.  Previously when a code had multiple attributes the code ended up appearing multiple times in the drop-down list.  This gave the impression that selecting one or other of the options would give different results, but that wasn’t the case – e.g.A8 has attributes NPPDoes and NSVA so A8 appeared twice in the list.  But whether you select one or the other the search is still for A8.  I’ve now amalgamated any duplicates.  This actually proved to be more complicated to sort out than I’d expected.  Basically I had to create a new search type in the API to search based on code rather than attribute ID.  I then needed to update the Atlas search to work with this new option.

I’ve also updated the ‘or’ search to get rid of star markers, as requested, and to limit the number of differently sided polygons that are used.  The ‘or’ search still brings back random colours and shapes each time, but I might change this.  I made all of these changes live in the CMS and also the ‘atlas guest’ URL and I’m hoping to start work on the ‘advanced attribute search’ next week.