Page MenuHomePhabricator

Present list of random articles from multiple/recursive categories
Open, LowPublic

Description

+++ This bug was initially created as a clone of Bug #44278 +++

In short: implement the feature https://tools.wmflabs.org/erwin85/randomarticle.php

Rationale: self-evident. Many wikis use this tool or equivalents as integral part of their workflow (or they did when Toolserver was more stable), see some examples at https://www.mediawiki.org/?oldid=632517

Implementation: probably a system message like [[MediaWiki:Sidebar]]; each bullet point would be a kind of task, with a title defined either on the page itself or by another system message, its sub-bullets would be category names; the special page picks N random pages from the defined categories for each kind of task and regenerates on refresh.

Open questions: whether to allow recursion (obviously preferred) or not; caching.


The GettingStarted extension apparently has some code that can be recycled for this:

(From bug 44278 comment #6)

I'd still say looking at
CategoryRoulette , RedisCategorySync, et al. is the closest thing to a robust
system for generating random tasks from categories.

See also T27931.

Details

Reference
bz46918

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 1:15 AM
bzimport set Reference to bz46918.
bzimport added a subscriber: Unknown Object (MLST).

Ah, note that the originally proposed implementation was about a special page configured via a MediaWiki message, but perhaps the easiest thing to do would be e.g. extend CategoryTree or a syntax like that.

  • Bug 44278 has been marked as a duplicate of this bug. ***

swalling wrote:

Is this resolved now that https://gerrit.wikimedia.org/r/#/c/71997/ (Add Special:RandomInCategory) has been merged? Or is it significantly different than bug 25931?

(In reply to comment #3)

Is this resolved now that https://gerrit.wikimedia.org/r/#/c/71997/ (Add
Special:RandomInCategory) has been merged? Or is it significantly different
than bug 25931?

This bug asks for a list of links (not a redirect), also from multiple categories, ideally with subcategories and namespaces handling as erwin's tool.

The idea to use a list, perhaps even included in a nice pace editable on wiki, came from the original hope to have this in GettingStarted, but that extension went in another direction, so if someone prefers to build upon the redirect feature of Special:RandomInCategory that would be fine – when all the above is implemented we'd have the MediaWiki equivalent of erwin's tool.

swalling wrote:

(In reply to comment #4)

(In reply to comment #3)

Is this resolved now that https://gerrit.wikimedia.org/r/#/c/71997/ (Add
Special:RandomInCategory) has been merged? Or is it significantly different
than bug 25931?

This bug asks for a list of links (not a redirect), also from multiple
categories, ideally with subcategories and namespaces handling as erwin's
tool.

The idea to use a list, perhaps even included in a nice pace editable on
wiki,
came from the original hope to have this in GettingStarted, but that
extension
went in another direction, so if someone prefers to build upon the redirect
feature of Special:RandomInCategory that would be fine – when all the above
is
implemented we'd have the MediaWiki equivalent of erwin's tool.

In the long term, we do want to build our CategoryRoulette function in to a simple API for accessing tasks, but it's likely not going to be suitable for application to any category. In discussion on the Special:RandomInCategory patch, it was agreed that the next immediate step for that is to do something with an API method, not dependent on a Special page. That likely will help serve the use case you're thinking of.

Xaosflux renamed this task from Present list of random articles from one or more categories to Present list of random articles multiple/recursive categories.Apr 22 2020, 2:13 PM
Dinoguy1000 renamed this task from Present list of random articles multiple/recursive categories to Present list of random articles from multiple/recursive categories.Apr 22 2020, 7:42 PM