[Mediawiki-l] basic usage of wgOut?

Hugh Prior mediawiki at localpin.com
Mon Jun 12 16:55:40 UTC 2006


I cannot seem to get wgOut working to display basic "echo" type of info.  I 
have created an extremely minimalist piece of code to test it.  The code 
just displays a completely blank page.  Any ideas?  Thanks.

http://localhost/chainki%20dev/wikilink/test_wgOut.php
<?php
$rootPath = "../";

define( 'MEDIAWIKI', true );
require_once("../includes/Defines.php");
require_once("../LocalSettings.php");
require_once("../includes/DefaultSettings.php");
require_once("../includes/Setup.php");

global $wgOut;  // This line shouldn't be necessary

$wgOut->addWikiText("This should appear on the screen");

$wgOut->output();

?>

My reading on wgOut comes from:
http://meta.wikimedia.org/wiki/Writing_a_new_special_page#OutputPage_.24wgOut 






More information about the MediaWiki-l mailing list