Template:Ubxdisplay/random/doc
{{Documentation subpage}}
Usage
{{Template shortcut|ubxrand}}
This template uses {{tl|Ubxdisplay}} to display a random userbox from a given selection.
The template can accept up to 32 parameters. If you use 2, 4, 8, 16, 24, or 32 userboxen you do not need to specify a number. Otherwise use |num=X
, where X is the number of boxes in the selection pool. You can also provide |nt=yes
to suppress the "ubxrand · view ubx · random ubx" line.
Templates that require parameters (such as {{tl|User Wikipedian For}}) are currently unsupported. A workaround is to create a user subpage that calls the template with the necessary parameters. You should also probably avoid using categorizing userboxen as your userpage categories would then be constantly changing. A workaround is to hard-code the categories.
Example output
will render:
{{Ubxdisplay/random|User:Xenocidic/Stormy|User:Xenocidic/Pirate|User:Xenocidic/Escher|User:Xenocidic/Loathing}}
You may also use "Ubxrand" for short -
{{Ubxrand|num=3|nt=yes
|1=User:Xenocidic/Stormy
|2=User:Xenocidic/Pirate
|3=User:Xenocidic/Escher
}}
{{Ubxrand|num=3|nt=yes
|1=User:Xenocidic/Stormy
|2=User:Xenocidic/Pirate
|3=User:Xenocidic/Escher
}}
{{divhide|Default template shell with 32 parameters}}
{{Ubxdisplay/random
|1= User:Xenocidic/Stormy
|2= ...
|3=
|4=
|5=
|6=
|7=
|8=
|9=
|10=
|11=
|12=
|13=
|14=
|15=
|16=
|17=
|18=
|19=
|20=
|21=
|22=
|23=
|24=
|25=
|26=
|27=
|28=
|29=
|30=
|31=
|32=
}}
{{divhide|end}}
Notes
Randomization algorithm was shamelessly lifted from [https://en.wikipedia.org/w/index.php?title=User:MZMcBride&oldid=293182152 MZMcBride's user page].
Category:Userbox arrangement templates
Category:User namespace templates
}}