Motorway Services Online

Retrieved from "https://motorwayservices.uk"

Template:User map

This template allows users to list where they've been. You can either create a page called Map:YOUR USERNAME or add it to your user page (at User:YOUR USERNAME). Use the code: {{User map|LIST OF SERVICES}}, separating each one with a broken bar (¦ - ALT+0166), for example: {{User map|Abington¦Birch¦Stafford (South)}}

Take note of the following points:

  • Each service area name must be written as it appears in the database, including Tot Hill (A34).
  • The broken bar (¦) is used because of the way MediaWiki processes template variables.
  • Services which are in Category:Not Signed will be ignored.
  • Other services will appear on the map, but only motorway services will count towards any figures.
  • |country=IE can be added to switch the template to Irish mode.

This script runs a DPL query with the results rendered as a map. It ignores Category:Not Signed and Category:No Map. It adds to the map every page it can find with a title matching what was entered, in other words, it simply says |titlematch = Abington¦Birch¦Stafford (South)

At the start, it calculates a percentage score by looking at all the qualifying motorway services entered, and dividing that by the number of qualifying motorway services on the site. It has to run that query twice: secondly to get the answer, but firstly to test if it will cause an error.

If a second variable is provided, it will list all of the qualifying services entered, and then all of the qualifying motorway services remaining.

This template automatically generates a map of the service areas selected. It's used by users to create map.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
List of service areas selected1

Each service area must have its page exactly match the name in the database, and be separated by a broken vertical bar.

Example
Keele¦Scotch Corner¦Stafford (South)
Contentrequired
Breakdown2

Enter 'yes' to get a breakdown of which service areas are and aren't included.

Default
false
Example
yes
Booleanoptional
Countrycountry

Enter which country's database we are searching.

Default
UK
Example
IE or UK
Stringoptional