Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Random old school

Template page
Revision as of 23:22, 21 October 2013 by CzechOut (talk | contribs) (This version of randomisation taken from https://en.wikipedia.org/w/index.php?title=Template:Random_number&action=edit&oldid=62771306, a 2005-6 version of the template which doesn't depend on {{#time:U}})
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Instructions for {{Random old school}}
{{Random old school}} is a randomisation template which comes from a point in the development of wikipedia:template:random number before it depended on {{#time:U}}. To you, the user, it should still function much like {{random}}, so those instructions are included below.

Remember, however, that the instructions below are written for {{random}} and therefore you will have to substitute {{random}} with {{random old school}}. Also, there are currently, as of 23:33, October 21, 2013 (UTC), bugs with {{random}} that prevent it from randomising properly. Therefore, you may not see the example below change on page load.

This example, however, should randomly display a number between one and 52 for you:

18

{{random}} generates a random number, at least to the extent that non-mathematicians will be happy with the term "random", through simple markup. The number can be from 1 to whatever number you choose, up to 1000.

Syntax is straightforward:

{{random|1000}} = 805

This number will change every time the page loads.

Though this simple aspect is enough to power any number of functions — such as determining which random, numbered subpage to call on a page, the template does have additional sophistication, detailed at template:random on Wikipedia.

Example of calling forth a page[[edit source]]

If you type the following, you will get a different quote of the week on every page load:

{{qotw/{{#expr:{{random|52}} + 1}}}}
Test it out by reloading this page several times. What you get below will be different on almost every page, though with a sample size of only 52, you're bound to get some repeats. The reason is because there are 53 pages in the following format:
{{qotw/n}}
However, there is no {{tlx|qotw/0}}. Thus by adding 1 to the randomly selected number between 0 and 52, we ensure the choice will be between the numbers 1 and 53.
Eighth Doctor: I don't generally travel alone. Usually I have one or more companions.
Asha Qureshi: Oh like assistants?
Eighth Doctor: More like . . . friends.
"Juliet Walsh": So what happened to the last one? Couldn't they hack they pace?
Eighth Doctor: "My last one" is off on travels of her own. And she set the bar pretty high for you lot. I've relied on my companions for help, advice, an alternative perspective and general camaraderie. I've relied on their skills, knowledge, bravery and sense of morality. You need to be self-motivated, as we'll often have to split up to get things done faster. But also capable of working harmoniously with me and anybody else who might join us in my TARDIS. That's my time and space machine, incidentally.
Asha Qureshi: Oh, yes, it says that in the pack.
Eighth Doctor: What I don't want is selfishness, close-mindedness, disloyalty. That's why I've asked you four here today: to find out which of you has what it takes. Any questions?
AUDIO: Situation Vacant


Cookies help us deliver our services. By using our services, you agree to our use of cookies.