Last modified: 2014-02-12 23:38:19 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 4028 - Proposal for new special page: list of random links
Proposal for new special page: list of random links
Status: ASSIGNED
Product: MediaWiki extensions
Classification: Unclassified
Extensions requests (Other open bugs)
unspecified
All All
: Lowest enhancement with 2 votes (vote)
: ---
Assigned To: Stephen Bain
http://en.wikipedia.org/wiki/User:Mel...
: patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-11-19 01:00 UTC by mediazilla
Modified: 2014-02-12 23:38 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Patch that describes the changes required to implement this feature request. (1.86 KB, patch)
2005-12-05 06:11 UTC, Stephen Bain
Details
This file implements the special page. (10.00 KB, text/plain)
2005-12-05 06:16 UTC, Stephen Bain
Details
Extension rather than inbuilt version of the other files. (10.90 KB, text/plain)
2005-12-05 23:17 UTC, Stephen Bain
Details

Description mediazilla 2005-11-19 01:00:15 UTC
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.
Comment 1 Stephen Bain 2005-12-05 06:11:41 UTC
Created attachment 1135 [details]
Patch that describes the changes required to implement this feature request.
Comment 2 Stephen Bain 2005-12-05 06:16:46 UTC
Created attachment 1136 [details]
This file implements the special page.
Comment 3 Stephen Bain 2005-12-05 23:17:05 UTC
Created attachment 1140 [details]
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.
Comment 4 Brion Vibber 2005-12-05 23:20:51 UTC
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...
Comment 5 mediazilla 2005-12-06 05:54:18 UTC
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.
Comment 6 Michael Keppler 2005-12-06 07:51:34 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links