Changes

Jump to: navigation, search

User:Graham Phillips 110

164 bytes added, 12:11, 2 June 2017
add random image
{{#time: r|now}}
 
<randomimage size="300" choices="GWR 2303 Fruit Van.jpg|GWR 13154 5 plank Open Goods Wagon.jpg|GWR 2504 Milk Tank Wagon.jpg|GWR 17410 20150320.jpg"></randomimage>
This section creates a link to the immediately preceding and following On This Day pages. To do this, it converts the current page name to a date, then checks the previous day's date for a corresponding page name. If it finds one, it creates the text & link. If not, it goes to the next previous day, and so on for ten days. It then does the same for the following ten days. It will only create one link in each direction, the first one it comes to, and if there are no pages within ten days of the start page, it returns a blank. There's probably a far more elegant and efficient way to do it, but hey ho, this is how bus mechanics write computer code.

Navigation menu