It seems Special:Random just creates a full URL to a random page in the wiki and than redirects (and loads) that URL.
$wgOut->redirect( $title->getFullUrl() );
if one replaces in SpecialRandompage.php that line with
$article = new Article($title); $wgOut->addWikiText($article->getContent());
than it does exactly what you expect: it includes the content of a random page into another page. So maybe you should create a new special page 'Special:Randomcontent'?
Cheers, Gu
Quoting Helmut Schneider jumper99@gmx.de:
zehetner@molgen.mpg.de wrote:
I would like to display a random page on the Main Page. I tried to use {{Special:Random}} and {{Special:Randompage}} which only displays the link to Special:Random[page] but not a page itself. Is it possible to embed Special:Random at all?
http://meta.wikimedia.org/wiki/Help:Embed_page#Embedded_Special_Pages
Unfortunately the page is empty. I tried {{Special:Randompage}} {{Special:Random}} {{Special:Imagelist}} and can see the imagelist, but not a random page (yes, I reloaded many times).
I use 1.11, did I miss anything else?
Thanks, Helmut
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l