Extension:HtmlFromFile

From mediawiki.org
Jump to navigation Jump to search
Other languages:
English • ‎Türkçe • ‎español • ‎中文 • ‎日本語
MediaWiki extensions manual
OOjs UI icon advanced.svg
HtmlFromFile
Release status: unmaintained
Implementation Tag
Description Includes HTML snippets from files into wiki pages
Author(s) Constantin Berhard (ConnyOnnyOnnytalk)
MediaWiki 1.36 Not formally tested
MediaWiki 1.34 Not formally tested
MediaWiki 1.32 Not formally tested
Database changes No
License Creative Commons Zero v1.0 Universal
Download
$wgHtmlFromFileMappings

Check usage and version matrix.

The HtmlFromFile extension includes some HTML snippet in the rendering of a wiki page. In the wiki markup you add <htmlfromfile>someName</htmlfromfile>. The extension does a lookup for "someName" in the configured mapping array (see below) to get a complete file name and then directly forwards the contents of that file to the viewer's browser.

Installation[edit]

  • Download and place the file(s) in a directory called HtmlFromFile in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    require_once "$IP/extensions/HtmlFromFile/HtmlFromFile.php";
    
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Configuration parameters[edit]

$wgHtmlFromFileMappings
Array which maps short names for in-wiki usage to actual file names where the content is

See also[edit]