Template talk:Ukroadsmall

Latest comment: 5 years ago by Imzadi1979 in topic Expensive function calls

Road marker

edit

It may be possible to replace this template with {{Road marker}} as used at WP:WikiProject Indian roads. That template shares a single image between all signs with the same background, even though the text differs. For the UK, this would reduce the image count from hundreds to about a dozen. Producing a sign for a new road would become a simple matter of writing a short wikitext - no waiting for a new graphic to be uploaded! The example on the right is produced by {{Road marker|UK A2|A 99}} ("2" indicates a background of suitable width for a two-digit number.) The font used is currently Bitstream Vera Sans, which resembles Indian signs, but I'm sure Meta:SVG fonts has public domain fonts more akin to Transport Medium and Motorway for UK use. Suggestions welcome. Certes (talk) 15:48, 30 July 2009 (UTC)Reply

Expensive function calls

edit

Some recent changes at {{Ukroadsmall}} or {{Ukroadsmall-svg}} have probably been responsible for "Lua error: too many expensive function calls" in the following.

I haven't looked, but I guess that the changes introduced a template which tests for the existence of various icons to decide which should be displayed. Unless something clever can be done with the above articles, a fix will be needed. Even on pages which currently show no error, having a lot of expensive function calls can greatly slow down the editing process so serious thought needs to be given to reverting the recent changes. Imzadi1979 and others: Any thoughts? Johnuniq (talk) 07:52, 27 May 2019 (UTC)Reply

Currently, the Lua module does perform a check to see if an SVG graphics exists. If it doesn't, it defaults to the old PNG option. There should be enough of the SVGs in existence now to negate the need for the check. We'll likely discover that some SVGs need to be created, but there's a bot on Commons that could do that expeditiously. Imzadi 1979  13:55, 27 May 2019 (UTC)Reply
And done. Imzadi 1979  14:03, 27 May 2019 (UTC)Reply
  NODES
Note 1
Project 6