Jump to content

Template talk:Random item

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Auto-detect range

[edit]

Wouldn't it be easier to auto-detect the number of parameters rather than requiring its manual entry? (not watching, please {{ping}}) czar 02:34, 28 December 2019 (UTC)[reply]

Requested move 2 March 2022

[edit]
The following is a closed discussion of a requested move. Please do not modify it. Subsequent comments should be made in a new section on the talk page. Editors desiring to contest the closing decision should consider a move review after discussing it on the closer's talk page. No further edits should be made to this discussion.

The result of the move request was: Not moved. (non-admin closure) Turnagra (talk) 08:57, 2 April 2022 (UTC)[reply]


Template:Random itemTemplate:Random{{Random item}} invokes Module:Random, whereas {{Random}}, which is a shortcut redirect to {{Random number}}, does not invoke it. Per numerous past moves, this template must be moved to match the name of module it invokes. ---CX Zoom(he/him) (let's talk|contribs) 07:44, 2 March 2022 (UTC) — Relisting. 🐶 EpicPupper (he/him | talk) 18:49, 9 March 2022 (UTC)[reply]

Oppose. While {{Random item}} invokes the module, it specifically invokes the item() function. Module:Random also has a number function which {{Random number}} could be changed to use (haven't tested so no idea what the difference is). I would however support making {{Random}} either a template disambiguation page or a wrapper of the module that also accepts the function as a parameter. Gonnym (talk) 09:22, 4 March 2022 (UTC)[reply]
The discussion above is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.

Currently Template:Random image redirects here. I plan to turn that into a separate template is basically the same but properly records file usage with MediaWiki. This will allow bots and other tools to know that all the images are being used on that page and not just the one that happens to be showing at the current moment. My main motivation is that commons:User:KrinkleBot will be able to autoprotect all images when they're being seleted randomly like was done in Wikipedia:Today's featured article/September 19, 2022.

The necessary Lua code is in the sandbox and you can see that it works as expected in my sandbox and with this Quarry. All of the images are registered as being used (e.g. if you look at the file description page on Commons they'll show up), but no image is ever displayed. Legoktm (talk) 19:34, 15 October 2022 (UTC)[reply]