[Mediawiki-l] Embed Special:Random

Michael Schmarck michael.schmarck at habmalnefrage.de
Tue Mar 18 13:57:39 UTC 2008


Helmut Schneider <jumper99 at gmx.de> wrote:

> <zehetner at 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

What page is empty? The one at meta.wikimedia.org? It displays just
fine for me.

As you seem to be having problems accessing the page, let me quote
the content for you:

| Embedded Special Pages
| 
| The default install of MediaWiki allows you to embed only selected
| special pages. (See Help:Special_pages#Miscellaneous.) To include 
| an otherwise "unembedable" special page, you must edit the $mList 
| array in the file includes/SpecialPage.php. Each entry is in the 
| format    
| 
| 'Pagename' => array( 'PageType', 'Pagename')
| 
| The possible values for PageType are SpecialPage, UnlistedSpecialPage, 
| and IncludableSpecialPage. 
| 
| Find the entry for the page you want to embed and change the PageType 
| to IncludableSpecialPage. You will now be able to include/embed the 
| special page using the include syntax: {{Special:Pagename}}.  
| 
|     Note: changing an UnlistedSpecialPage will show it in 
|     Special:Specialpages. (Can this array be changed to allow 
|     multiple page types?)    

Michael




More information about the MediaWiki-l mailing list