Page MenuHomePhabricator

Proposal for new special page: list of random links
Open, LowestPublicFeature

Description

Author: mediazilla

Description:
I'm a Wikipedia addict, and I lose a lot of time on their Special:Random. It seems to me that a special page that populates itself with
random links would be much more useful and efficient, so I'm requesting one. Please see http://en.wikipedia.org/wiki/User:Melchoir/Random_links_proposal for more information and (hopefully) discussion.


Version: unspecified
Severity: enhancement
URL: http://en.wikipedia.org/wiki/User:Melchoir/Random_links_proposal

Details

Reference
bz4028

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 8:58 PM
bzimport set Reference to bz4028.

stephen.bain wrote:

Patch that describes the changes required to implement this feature request.

Attached:

stephen.bain wrote:

This file implements the special page.

Attached:

stephen.bain wrote:

Extension rather than inbuilt version of the other files.

Per advice:
http://mail.wikipedia.org/pipermail/wikitech-l/2005-December/032890.html
changed this into extension format. All that's external to this file is the
line in LocalSettings.php.

Attached:

Not really sure what the benefit of this would be...?

If you want to hit a bunch of random articles, just click several times on the random link and open them
in a row of tabs...

mediazilla wrote:

Brion Vibber, my first motivation is speed. When I proposed this special page, Wikipedia was abominably slow, and Special:Random
could take a minute just to begin displaying. Well, Special:Random is now down to a typical load time of a second, which isn't bad.
Of course, I'm sure there will be slow periods in the future...

Anyway, a list of random links would always be more efficient for finding particular kinds of links. Maybe you're interested in
seeking out orphans, or uncategorized articles, or articles from a particular topic. Existing special pages and categories only go so
far. There are some articles that can only be reached through random searches, and if you're looking for something with 1%
abundance, you don't want to have to open 100 tabs! The proposed special page is a fast, compact, and well-organized way of
getting to those hard-to-reach spots. By comparison, Special:Random is just entertainment.

Michael.Keppler wrote:

There are some bugs. Those are 2 different variables:

global $wgMessageCache;
...
$wfMessageCache->addMessages( $messages );

The messages array construction is often written as
x=array(key1 => value1,

 key2 => value2,
...)

which seems easier to be read and understand than a block of assignments.

For the part where you create the "out" string, you should better use MediaWiki
functions to create the links instead of duplicating code there. For instance
you might create a Title object for each article and ask that for its textual
link representation (but there may be ever shorter ways, don't know). That way
you don't need to consider things like "is main namespace or not".

...
SpecialPage::addPage( new ExampleSpecialPage );
...
This is a non existing class.

And another thought: In the end your class seems to be a database query listing
its results. Eventually it might be a good idea to have your class be derived
from PageQueryPage, so it would better integrate with the other database query
special pages. But I can't say that for sure, it's only an idea.

jayvdb set Security to None.
Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 11:02 AM