Lots of server based work for Canalplan

We’ve been doing quite a bit of work behind the scenes on Canalplan, a lot of it has been related to caching data for search engines.

Canalplan gets a LOT of hits from the likes of Google, Bing etc. and we were using quite a lot of resources delivering pages to them. So we put together a system so that search engines (and only search engines) are served a static version of the page from a stored HTML file. If there isn’t a static file when the search engine requests the page then its generated for them. When data for a page changes the stored page is deleted from the cache.

As it takes less resources to serve a static HTML file as pache can deliver it directly and we don’t need to spin up a canalplan process it means that everything runs faster for the search engines AND those precious resources can be used to deliver data to real users.

We also implemented a similar process for the boat index which saves executing the php and making database connections for each cached page.

An update

We’ve been neglecting this blog for far too long.

There has been a huge amount of work done on both the Canalplan AC website and the Canalplan Plugin for WordPress.

A few months ago we took over the day to day running of Jim Shead’s Boat Index which involved moving the data over to our server and rebuilding the query pages so that they fitted in with the rest of the Canalplan Website. That integration also allowed us to add features to both the Boat Index and also to Canalplan such as tagging boats in photos and also the first steps of a boat tracking system.

Most of the work with the Canalplan Plugin for wordpress has been addition of minor new features such as being able to include links to Canalplan “Features” in your posts and lots of bug fixing in the Route importing code. The big new feature was replacing the “Where am I” widget which used to use Google Latitude with a version that uses Backitude which also links to the boat tracking feature in the main canalplan site so you can update both your blog location and your location on Canalplan in a single go.

The Canalplan Plugin : Configuration Part One

In which we cover the various menus that the plugin has and what each one does. We also cover the initial configuration and general settings for the plugin. Future posts will cover more of the configuration and how to use the route importing features.

It’s time for the second post about the Canalplan Plugin for WordPress. The first post covered the way you can use the plugin short codes to embed links to Canalplan Gazetteer entries and Canalplan maps into your posts and gave a basic introductions to some of the features of the plugin.

This one will cover the general configuration of the plugin so its probably going to be a little boring in places but hopefully not too much.

Overview

Once the plugin has been downloaded and activated you should see a new menu in the WordPress Admin menu – this menu (CanalPlan AC) has a set of submenus which allow you to set up various parts of the plugin :

General Options
This sets up various general options for the Canalplan plugin such as the Distance Format and your Canalplan AC link code

Home Mooring
This allows you to set your home mooring location and give it a customised name

Favourite Locations
This allows you to set up some favourite locations and give them customised names.

Google Map Options
This allows you to set up the various options to do with how Google Maps are displayed.

Diagnostics / Version Information
Provides information and diagnostics – You’ll need to refer to this page if you’ve got problems.

I’ve actually skipped three sub menus because they’re associated with interaction with Canalplan AC at a much deeper level which will be covered in a subsequent post :

Import a route from CanalPlan AC
This is the starting point for importing a route from Canalplan AC and creating a set of blog posts for the imported route

Manage Imported Routes
Once you’ve imported a route you might need to make adjustments to the daily totals – this page allows you to do that

Bulk Link Notifier
During normal use the Canalplan AC website will learn about links from you blog back to it’s gazetteer. However if you’ve just added a set of posts you might want to let Canalplan AC know about all the links.

Now we can get onto each of the sub menus in detail :

General Options

This page contains a few things that really need to be set up before you can use the Canalplan Plugin in any meaningful way.

Canalplan Data

Before you can do anything with the Canalplan Plugin you need to get a copy of some data from the live Canalplan AC website. When the plugin is first installed there is no data there and you will be presented with the folowing screen:

Click on the Get Data button and wait a few minutes…. The plugin needs to go to the Canalplan website and pull down a subset of its database. The download is approx 1.8MB (the main Canalplan database is 225MB) so hopefully it shouldn’t take too long. One thing that is very important to remember is that the data pulled down by the plugin can be up to 24 hours old as it is built once a day from the live database so if you’ve just added a place it wont appear in your plugin if you immediately refresh the data.

Once the data has downloaded the screen will refresh and you’ll be presented with the following:

Notice that there is no button to allow you to download the data again. The plugin will not display the download button until at least 24 hours have passed at which time it will display it again.. the following screen shot is from a system that had not updated its Canalplan data for quite some time:

At the moment the plugin doesn’t automatically run an update on a fixed schedule but its something that I might look at adding if there is enough demand.

Note for Networked blog users : As the plugin only uses 1 set of tables per network then any blog that runs a data update for their blog actually runs the data update for all the blogs in the network.

Distance Format

Traditionally canal distances are measured in Miles and Furlongs but rather than force that on everyone the plugin allows you to set the default measurement unit that is used when the plugin is displaying distances as part of its trip blogging features :

The distance formats supported are:

  • Decimal Kilometres (3.8 kilometres)
  • Kilometres and Metres (3 kilometres and 798 metres)
  • Decimal miles (2.3 miles)
  • Miles and Yards (2 miles and 634 yards)
  • Miles and Furlongs (2 miles , 2 ¾ flg)

It is possible to change the distance format on a route by route basis so if you usually blogged about trips in the UK but then wanted to blog about a trip in France then you could change the distance format for that specific set of blog posts.

Canalplan Key

One of the features of the Canalplan plugin is its deep linking between your blog and the Canalplan Website. This is done silently in the background and involves using a Key to uniquely identify links from your site. This option shows you what your current key is, the blog url and the title of the blog it is associated with. If you have not previously set the key then the Plugin goes out to Canalplan and negotiates a key and prompts you to save it:

Once you have done that then the key is valid until you need to change it:

If you change your blog URL or title, or if you need to change your key for other reasons, then you can click on the Reset Canalplan Key and a new key will be issued to you

Note for Networked blog users : The key is unique to your blog so each blog in a network has its own key.

Route Page Slug

This is, as with the distance format option, related to the route blogging features of the Canalplan plugin. If you don’t intend to use the route blogging features of the plugin then you don’t need to worry about this.

The idea is that you have a single page in your blog which contains links to each of the trips you’ve blogged, and each of those trips contains a link to the individual posts for that trip. For this to work you need to have a specific page set up for this, and this option allows you to set what that page should be. In single blog (i.e non networked) mode this page slug is not initially set:

Once you’ve set a page slug the plugin will tell you what page it expects to find :

In the above example we’ve set the trips page slug to be trips.. so we would need to make sure that the page existed and that it contains the text {BLOGGEDROUTES}

Note for Networked blog users : To allow the “root” blog in a network to have a single page to display all the trips that have been blogged about in the network the slug is set centrally by the network administrator so you will not get the option to change it in your blog. Instead this option will display something like:

In the next post we’ll cover the next steps you need to carry out to get the most out of the Canalplan Plugin for simple blogging. Using the Trip importer and the route blogging features will be covered in its own post.