Search

The Best MediaWiki Extensions

MediaWiki is an extremely extensible CMS due to its architecture and backend technologies. MediaWiki extensions are collections of code and resources that can change the functionality, behavior, or appearance of the entire site or its components. The number of extensions listed on mediawiki.org is over 1,500 and growing.


Common Issues With MediaWiki Extensions

The MediaWiki core is under active development. Some extensions may become incompatible with the new core as breaking changes happen quite often. Some features previously available through extensions may become part of the core and render the extension obsolete.


Extensions need to be maintained and adapted to newer versions of MediaWiki or underlying software such as PHP. Extension maintainers are people: they can be busy, lazy, or focused on other priorities. As a result, extensions can become abandoned, outdated, superseded by other extensions.


Therefore, extensions for your wiki should be chosen carefully, taking into account not only functionality, but also factors such as stability, reliable documentation, and regular maintenance. The right place to check all these aspects is the extension page on mediawiki.org.


What MediaWiki Extension Is The Best One?

Extensions are implementing something. If an extension does its job perfectly, it is the best one for the purpose. The WikiTeq docker image, for example, contains over a hundred handpicked extensions, extensively tested to work with the latest LTS version of MediaWiki.


For the review, we have selected extensions of a completely different scale and scope, all well documented and maintained.


MediaWiki Extensions Improving Your Workflow


Extension: InputBox

By default, MediaWiki does not provide an input or form to create new pages. Instead, pages are primarily created using “red links” in other pages’ text or in search results (we have a separate blog on page creation here). This may puzzle many novice users. The InputBox is designed to fill this gap by providing input for the new page name.

mediawiki inputbox extension create new page example
The code example and the resulting input for page creation.

It also includes creating new sections, pages in different namespaces, subpages. You can even create all of the above with preloaded content. Using inline parameters, you can change introductory texts, button labels, and text entry placeholder, as well as the position and color of input interface elements.


The code example and the rusulting input with the preloaded summary and default text.
The inputbox code example and the resulting input with the preloaded summary and default text.

It is worth noting that the InputBox, in addition to the "create" mode, can work in the "search" mode and allows you to insert a search input in an arbitrary place on the wiki page.

The inputbox search code example and the resulting search input.
The inputbox search code example and the resulting search input.


Extension: Page Forms

The Page Forms extension provides a more sophisticated approach to user-driven input when creating or editing pages. It is designed to work seamlessly with MediaWiki templates and data management extensions such as SemanticMediaWiki and Cargo. Using a simple syntax and a dozen built-in input

types, you can create professional-looking forms without any programming.


Example of MediaWiki Page Forms extension Author” template with a page form
Example of MediaWiki Page Forms extension editing "Author” template with a page form.

The hallmark of PageForms is its ability to validate user input, make fields required or restricted for a given group of users, and automatically populate field values based on namespaces, categories, concepts, and semantic property values. This helps keep your wiki clean and free of user input errors.


Imagine that all the pages in the “Animal Rights” category are created using the “Author Infobox” template. With PageForms, we can create a form for controlled filling of infobox fields and assign it as the default form for the “Animal Rights” category. This setup will add the “Edit with Form” link to any page in the category.


Example of MediaWiki PageForms Extension editing an infobox
The author page linked to its default form provides a link to start editing template data.

When used in combination with Cargo or Semantic Mediawiki, PageForms allows creating forms for querying stored data. We have a blog covering Semantic MediaWiki, Cargo, and Wikibase you can read here.


Extension: Cite

References and citations are very appropriate for encyclopedia articles. Designed as the engine for the Wikipedia project, MediaWiki provides excellent support for references building. Out of the box, you can easily add a footnote using Cite. The syntax provides options for naming, grouping, and reusing links within an article.


MediaWiki Cite Extension example of form for auto-retrieval of reference from Internet.
MediaWiki Cite Extension example of form for auto-retrieval of reference from Internet.

Depending on your needs, the extension can be configured to retrieve citation sources from the cloud using special background services and a set of handy templates and modules. You enter a DOI (ISBN, PMID or other cited work identifier) and the extension will automatically generate the necessary references.


MediaWiki Cite Extension example of a created citation.
MediaWiki Cite Extension example of a created citation. Also, if the Popups extension is present, references can be shown in popups right in place.

Extension: Lingo

Lingo lets you define a list of abbreviations and their definitions on a page and then displays these definitions whenever an abbreviation is hovered over in an article.

MediaWiki Lingo Extension Example of hover function
Hovering over “FHL” will display a baloon explaining what does this abbreviation stand for.

Extension for Improving MediaWiki Search

Extension: AdvancedSearch

The extension provides an advanced parameters form and improves the way namespaces for a search query are selected. AdvancedSearch is a frontend to the CirrusSearch extension that uses Elasticsearch to store a text index and provide faster search results.


MediaWiki AdvancedSearch extension interface example
The AdvancedSearch interface helps communicate with the search index.

Standing on the shoulders of Elasticsearch, the extension allows you to perform full-text search by exact match, include/exclude words, support fuzzy search (with masks), and can even search separately in the page source code or in the displayed text. Results can be sorted by relevance, creation date or modification date.


MediaWiki Extensions that Display Embedded Content

Extension: EmbedVideo

EmbedVideo provides functions for embedding video clips from over 24 popular video sharing services, including YouTube, Vimeo, Twitch, Bing and others.

MediaWiki EmbedVideo extension example of function wrapped into template
MediaWiki EmbedVideo extension example of function wrapped into template

In the simplest case you provide the video URL as the only parameter to the function and the video can be played right on the wiki page. No uploads, no wasted disk space, no copyright complications, just a few optional parameters to play with video dimensions, players and behaviors.


Extension: Maps

Maps is a MediaWiki extension to visualize and work with geographical information. According to the extension page, it is used by NASA and thousands of other wikis.

Mediawiki Maps Extension example of geocoding.
Geocoding the location address produces a single pin.

The extension provides a wide range of settings for working with Leaflet and Google Maps maps, support for layers, custom providers, static maps, clusterization, KML and GeoJSON formats. Maps integrate nicely into Semantic MediaWiki, providing a map output format for semantic queries based on coordinates or other geodata.


The Maps come with the visual map editor that supports pins, lines, shapes, labels, etc. You can draw your map manually or import data in one of the supported formats. The extension offers parser functions for geocoding, coordinate formatting and geospatial operations.

MediaWiki Maps Extension Visual Editor Example
MediaWiki Maps Extension Visual Editor Example

MediaWiki Extensions for Data Management and Manipulation

Extension: Semantic MediaWiki

MediaWiki is primarily a text tool, designed to work with plain text rather than structured, detailed data. The only way to analyze a corpus of articles is to assign each article to one or more categories. It's easy to see all the pages that belong to a category, but the task of selecting pages at the intersection of two or more categories is not trivial in MediaWiki.


You can add some magic and greatly enrich the user experience by introducing Semantic MediaWiki (SMW), which allows you to manage structured data in your wiki and query that data to create dynamic views: tables, timelines, maps, lists, and more.

Semantic MediaWiki query displaying all the colleges in an area.
Semantic MediaWiki query displaying all the colleges in an area.

Thanks to its simple syntax, SMW allows you to create ontologies defining the semantic properties of one of 18 data types, annotate data fragments directly in the text, manage page selection parameters, extract specific data, set rules for its sorting, formatting and pagination.

A set of Semantic MediaWiki filters that allow you to find a program that is right for you.
A set of Semantic MediaWiki filters that allow you to find a program that is right for you.

For example, in SMW it will be possible to query: "Show me a timeline displaying the name and date of birth of all composers born in Europe in the last 200 years." Or more pragmatic one: “Show me a calendar of my incomplete tasks with a due date of next week.”


SMW provides a special page for interactive query building and automatic query code generation. Once created and saved on a wiki page, the query printout will be updated every time the data changes on pages that are annotated elsewhere on the wiki.

Semantic MediaWiki interactive query builder
"Special:Ask” page provides an interactive semantic query builder interface.

Powerful and flexible, SemanticMediaWiki serves as a base for the whole ecosystem of extensions that make use of its data structure. Among the most notable are:

  • SemanticResultFormat