From mediawiki.org
MediaWiki extensions manual
OOjs UI icon advanced-invert.svg
Release status: stable
Implementation Parser extension , Tag
Description Beginners Introduction to an TAG Hook
Author(s) Jan Boer (jackqboxtalk)
Latest version 1.0 (2016-10-05)
MediaWiki 1.25.5
PHP 5.5.36
Database changes No
Composer qbox4u/mediawiki-github
License GNU General Public License 2.0 or later
Release notes

Check usage and version matrix.

QBox ABC Information template:

This page contains Jack QBox php Extension (lessons)

The Extension HalloWorld is intended to provide an real first easy learning entry for inexperienced newcomers about how to create an Mediawiki Extension.


Perform the following actions
  • Create an New Mediawiki page called MY FIRST PHP TAG inside your QBox4u QNAP
  • Insert the following Text
    <TAG1 arg1="xxx" arg2="xxx">
    Hallo world
  • Save the page


You can see that the displayed page is only showing

<TAG1 arg1="xxx" arg2="xxx">
Hallo world


The reason for this, is that we need to install inside the QBox4u QNAP an interface between MediaWiki

and the text inside the page


  • Open the QBox4u QNAP folder where the main MediaWiki Application resides
  • Locate the folder extensions
  • Create inside the folder extensions an new folder called HalloWorld
  • Copy HalloWorld.php into the subfolderextensions/HalloWorld
  • Copy LICENSE into the subfolder extensions/HalloWorld
  • Return to the QBox4u QNAP folder where the main MediaWiki Application resides
  • Copy the file LocalSettings.php to LocalSettings_org.php
  • Add the following line at the bottom inside the file LocalSettings.php
 require_once( "$IP/extensions/HalloWorld/HalloWorld.php");

Pre Check[edit]

SpecialPages Version
Verify that the Extension:HalloWorld is active
  • Select in your mediawiki Special Pages
  • Select Version
  • allocate Other
When everything is correct, you must see THIS  


Amazing, we have something totally different now in our screen

Using one of the above two methods will give you an quick start with your

own developments to create an dedicated personal PHP application

Allocate therefore inside HalloWorld.php the following lines

From here you can create your own PHP Application 
You only need to remember that the additional data you like to display resides inside $html_body 

See also[edit]