Extension talk:RandomPages

Bug #1
Hello, I installed your extension, and found quickly a bug (well, not really a bug, but something to be modified) :

Line 71 of RandomPages.php :

The table "page" might not exist, depending on the installation table prefix, set at the time of initial configuration. For exemple, my table corresponding to "page" was in fact called "wm_page".

I edited the source code and now it works fine! :-) Here are the modifications (line 71 and 72) :

--Fish1203 13:02, 9 February 2008 (UTC)

Thanks for the heads-up, it's fixed now in 0.2. You can drop bugs/feature requests at http://www.locknet.ro/contact, development it's done on http://gitorious.org/projects/randompages

Wiki text output
Hi, how can I change the output so I can enter wiki text in the extension, e.g. ? --Subfader 15:58, 6 November 2008 (UTC)

Any way to transclude a single random page using this extension?
I tried to modify this extension in a way that it only returns one article title without the A HREF stuff, hoping I could transclude a random page content like this:

But this simply outputs a text string like , not transcluding its contents. Are there any plans to enhance this extension to become a RandomPageContent extension? --Ulf Dunkel (talk) 17:36, 11 January 2021 (UTC)


 * I now have adjusted the source file RandomPagesHooks.php in a way that limit=1 only returns the pure title name. Transcluding the output of my template in any article like " " only creates a pure text string, not the expected transcluded page content. You can check this here on my wiki: https://en.intactiwiki.org/wiki/Template:RandomArticle
 * What am I doing wrong? -- Ulf Dunkel (talk) 14:28, 7 March 2022 (UTC)

I've been searching for precisely that for a several weeks now (only on spare time, not 24/24 ^-^), to no avail. I want to transclude a random page section in the Hoshikaze 2250 project's wiki's welcome page. The ultimate achievement could be to take them from a special category where we could list all pages properly edited for transclusion. --Mutos (talk) 05:25, 12 July 2022 (UTC)


 * Made the same adjustment as Ulf :
 * if ($limit=1) {
 * foreach ( $rs as $row ) {
 * $title = Title::makeTitleSafe( $row->page_namespace, $row->page_title );
 * $buff = htmlspecialchars( $title->getPrefixedText );
 * }
 * } else {
 * [original code]
 * }
 * Just printing the result Mutos (talk) 06:10, 12 July 2022 (UTC)
 * There was also an extra div returned that I had to take out. But that was not the point... Mutos (talk) 06:14, 12 July 2022 (UTC)