Wiktionary talk:Random page

Return to "Random page" page.

OverviewEdit

There are various methods of getting a random page in Wiktionary:

  • Using the Mediawiki native function for getting a random page. However, the set of entries from which one is chosen ranges over all the languages. The native function: Special:Random.
  • Using a dedicated function at the toolserver, per language. See the links per language in this project page; for instance: English. Accessible using {{random language|English}}.
  • Using the native function constrained to a namespace, like in Special:Random/Wikisaurus.
  • Using the bookmarklet posted in one of the sections below to pick a random page from a category.

"Excepting recent changes, the text on that site appears below."Edit

Do we really need a copy of the text here?—msh210 19:45, 17 December 2008 (UTC)

Note that the text here has been unchanged since, at least, June of 2007, but is not the same as the one on the Web site. If no one objects pretty soon, I'll remove the text from here.—msh210 19:49, 17 December 2008 (UTC)
Done.—msh210 07:43, 26 December 2008 (UTC)

Links to random functions don't work. FWIW I am looking for a function that will return xml with the random word and a definition.

Bookmarklet to pick a random element of a categoryEdit

The following bookmarklet will load a random entry from a category. If used on a category page, it uses that category; otherwise it uses the first category that the current page is in.

javascript:void((function () {function rltr(n) { if (n>0) {return 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'[Math.floor(Math.random()*52)]+rltr(n-1);} else {return ""}; }; function prc() { if (req.readyState==4 && req.status==200) { var q=req.responseXML.documentElement.getElementsByTagName("cm"); document.location="/wiki/"+q[0].getAttribute("title"); } }; req=new XMLHttpRequest(); req.onreadystatechange=prc; req.open("GET", document.location.protocol + "//"+document.location.host + "/w/api.php?action=query&list=categorymembers&cmtitle=" + ((document.location.pathname.indexOf("Category") !=-1 ? document.location : document.getElementById("catlinks").firstChild.childNodes[2].firstChild).pathname.replace("/wiki/","")) + "&cmstartsortkey=" + rltr(3) + "&cmlimit=1&format=xml",true); req.send(null)})())

Enjoy! (and please copy it to the various places it should be listed...) JesseW 22:16, 22 May 2009 (UTC)

Inserting direct links from HT's pageEdit

Would anyone have a problem with inserting the links from Hippietrail's page http://toolserver.org/~hippietrail/randompage.fcgi?langs direction onto the project page? Or is it too experimental? It looks like that page is generated after every dump (is it created dynamically on each page load?). In case there's weird things in the current version, we could just hard-code random page links for the known languages. We could put the top40 at the top, and alphabetize the rest. --Bequw¢τ 03:48, 7 July 2009 (UTC)

  • You can add all the random-per-language links you want.
  • Or you could just go to WT:PREFS and switch on "For each language section add interwiki and random links." — hippietrail 00:29, 27 July 2009 (UTC)
I am also intrested in giving a direct link to a single language that is marathi.Presently it does not seem to work. this would be usefull fuction to lot of people with Marathi Language background.
I suppose all other people who want to study various languages will also benefit.
A wikipedian has given a Java script code , I would be interested to know exactly how to use where to use and as second openion to confirm if that code is safe enough security point of view.
Mahitgar 05:26, 24 July 2009 (UTC)

Doesn't WorkEdit

No matter how much I try to use any of the links on here, it belches out a 500 error. I have tried it dozens of times, and it's only ever worked twice. The first time, I was shocked because it had been months since I first encountered the problem and it had, minutes earlier, failed. Each time, it gave me this information: Request host: toolserver.org Request path: GET /~hippietrail/randompage.fcgi 129.171.233.77 01:22, 24 October 2010 (UTC) Scratch that, it randomly works now, just not for the language I want (mandarin) :/

Not sure that we can do anything about this. Is there a contact point for toolserver.org? Equinox 01:25, 24 October 2010 (UTC)
I've fixed this at last. In the future file a bug report on Jira or Bugzilla so that us Wiktionary dev types can track issues. — hippietrail 15:29, 18 February 2011 (UTC)

doesnt workEdit

79.183.15.191 15:25, 23 March 2013 (UTC)

WFMEdit

This has always and currently works for me, so I'm going to remove the notice that it doesn't work. If it doesn't work, it's a client-side issue. TortoiseWrath (talk) 02:16, 22 May 2013 (UTC)

I'd suggest checking, again. I'm with the others (see below). --Jackson Peebles (talk) 04:59, 14 July 2013 (UTC)

"403: User account expired"Edit

The random page by languagae does not work anymore... :( Jagwar (talk) 20:30, 5 June 2013 (UTC)

Same here.95.91.250.139 19:45, 16 June 2013 (UTC)
Same. --Jackson Peebles (talk) 05:01, 14 July 2013 (UTC)
Wiktionary is aware. Don't hold your breath for it to be fixed, though. I don't know how to fix it, and the people who might know how to fix it are for the most part very busy and/or incommunicado in countries with little internet access. :/ - -sche (discuss) 06:10, 14 July 2013 (UTC)
MediaWiki:Sidebar. Just remove the link. DTLHS (talk) 06:12, 14 July 2013 (UTC)
Yeah, but that only stops people from clicking on it and being disappointed that it doesn't work...I'd rather make it work again.
PS, all of this goes to show that we need to re-sysop you so that you can fix these things yourself. :b - -sche (discuss) 06:16, 14 July 2013 (UTC)
Last modified on 17 July 2013, at 00:26