Extension:ViewFiles

The ViewFiles allows users to view the contents of a limited set of text files. If you plan on displaying PHP files with this, you may want to install Extension:SyntaxHighlight GeSHi as well. Don't forget, if you're going to use this to display files such as LocalSettings.php that contain sensitive data, you'll want to get that data out of webroot before exposing those files to the world.

Installation

 * Download the latest version and save it to your computer
 * Create a folder in the extensions folder named ViewFiles
 * Move the files to the extensions/ViewFiles/ folder
 * Edit LocalSettings.php in the root of your MediaWiki installation, and add the following line near the bottom:

Configuration
The only required configuration setting is $wgViewFilesList.

$wgViewFilesIntro
What to begin the page with; e.g.

$wgViewFilesBegin
What to begin each file listing with; defaults to: $wgViewFilesBegin = ' '. "\n";

$wgViewFilesList
Create a list of files and their paths, e.g.: