PHPackages                             professional-wiki/network - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. professional-wiki/network

ActiveMediawiki-extension[Utility &amp; Helpers](/categories/utility)

professional-wiki/network
=========================

MediaWiki extension for adding interactive network visualizations to your wiki pages

4.0.1(2mo ago)3211.9k10[13 issues](https://github.com/ProfessionalWiki/Network/issues)[2 PRs](https://github.com/ProfessionalWiki/Network/pulls)GPL-2.0-or-laterJavaScriptPHP &gt;=8.1CI passing

Since Jun 15Pushed 2mo ago9 watchersCompare

[ Source](https://github.com/ProfessionalWiki/Network)[ Packagist](https://packagist.org/packages/professional-wiki/network)[ Docs](https://professional.wiki/en/extension/network)[ GitHub Sponsors](https://github.com/JeroenDeDauw)[ RSS](/packages/professional-wiki-network/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (8)Versions (20)Used By (0)

Network
=======

[](#network)

[![GitHub Workflow Status](https://camo.githubusercontent.com/413b58492017e2f380fa14f8785fcd9a41e153afd0f09c9ef80803ace2b785bb/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f50726f66657373696f6e616c57696b692f4e6574776f726b2f63692e796d6c3f6272616e63683d6d6173746572)](https://github.com/ProfessionalWiki/Network/actions?query=workflow%3ACI)[![Latest Stable Version](https://camo.githubusercontent.com/96d36ccbafe9b73d78e306d6da658d2aee39b7adc59e774dade64f4ff72656b1/68747470733a2f2f706f7365722e707567782e6f72672f70726f66657373696f6e616c2d77696b692f6e6574776f726b2f762f737461626c65)](https://packagist.org/packages/professional-wiki/network)[![Download count](https://camo.githubusercontent.com/560ff0430fb302ea33dfb731df0c7717ba8548b0dc8cf7d34ce38d3a027f17dc/68747470733a2f2f706f7365722e707567782e6f72672f70726f66657373696f6e616c2d77696b692f6e6574776f726b2f646f776e6c6f616473)](https://packagist.org/packages/professional-wiki/network)[![License](https://camo.githubusercontent.com/7acb648a5f529ed65939a2d8c1456b6df4108431053bb7286756ec7ce3f8bbfe/68747470733a2f2f706f7365722e707567782e6f72672f70726f66657373696f6e616c2d77696b692f6e6574776f726b2f6c6963656e7365)](LICENSE)

The **Network** extension allows visualizing connections between wiki pages via an interactive network graph.

It was created by [Professional Wiki](https://professional.wiki) and funded by [KDZ - Centre for Public Administration Research](https://www.kdz.eu/).

[![](.github/network.png "View image")](https://raw.githubusercontent.com/ProfessionalWiki/Network/master/.github/network.png)[![](.github/youtube.png "Play video")](https://www.youtube.com/watch?v=iI1zJ8ma474&feature=youtu.be&t=1)

- [Platform requirements](#platform-requirements)
- [Installation](#installation)
- [Usage](#usage)
    - [Parameters](#parameters)
    - [Layout CSS](#layout-css)
    - [Examples](#examples)
        - [Options parameter](#options-parameter)
        - [Using templates](#using-templates)
- [PHP Configuration](#php-configuration)
- [Limitations](#limitations)
- [Contribution and support](#contribution-and-support)
- [Development](#development)
- [License](#license)
- [Release notes](#release-notes)

Platform requirements
---------------------

[](#platform-requirements)

- PHP 8.1 or later (tested up to PHP 8.4)
- MediaWiki 1.43.x or later (tested up to 1.44.x)

See the [release notes](#release-notes) for more information on the different versions of Network.

Installation
------------

[](#installation)

The recommended way to install Network is using [Composer](https://getcomposer.org) with [MediaWiki's built-in support for Composer](https://professional.wiki/en/articles/installing-mediawiki-extensions-with-composer).

On the commandline, go to your wikis root directory. Then run these two commands:

```
COMPOSER=composer.local.json composer require --no-update professional-wiki/network:~4.0
composer update professional-wiki/network --no-dev -o
```

Then enable the extension by adding the following to the bottom of your wiki's `LocalSettings.php` file:

```
wfLoadExtension( 'Network' );
```

You can verify the extension was enabled successfully by opening your wiki's Special:Version page in your browser.

Finally, please consider [sponsoring the project](https://github.com/sponsors/JeroenDeDauw).

Usage
-----

[](#usage)

Minimal example

```
{{#network:}}

```

Example with parameters

```
{{#network:Page1 | Page2 | Page3
 | class = col-lg-3 mt-0
 | exclude = Main Page ; Sitemap
}}

```

### Parameters

[](#parameters)

   Default Example value Description   (page or pages) *The current page* MyPage The name of the page to show connections for. Can be specified multiple times. The parameter name is optional. Templates are supported   class  col-lg-3 mt-0 Extra css class(es) to add to the network graph   exclude  Sitemap ; Main Page Pages to exclude from the network graph, separated by semicolon   excludedNamespaces  2, 4, 8, 12 Namespaces to exclude from the network graph by namespace number, separated by comma   options  { "nodes": { "shape": "box" } }  [vis.js options](https://visjs.github.io/vis-network/docs/network/#options) in JSON. Option names and text values both need to be surrounded with double quotes. Single quotes will not work. Tailing commas also do not work. Two curly brackets closes the parser function, so if you are putting the JSON directly in the parser function rather than using a template, put a tailing space or new line after each closing bracket.    enableDisplayTitle true false  Should the [display title](https://www.mediawiki.org/wiki/Help:Magic_words#DISPLAYTITLE) rather than the page title be displayed as a node's label? Overrides the value of the `$wgPageNetworkEnableDisplayTitle` configuration variable.    labelMaxLength 20 30  The text length of a node's label. If the node label must be truncated, an ellipsis (…) will appended. A value of 0 indicates that the text length is not limited. Overrides the value of the `$wgPageNetworkLabelMaxLength` configuration variable.  There is also an includable special page, Special:Network, that can be used to construct graphs interactively. The special page presents a form that can be filled in with the same parameters listed above and submitted to render a graph. The special page can also be included in other pages for the same results as the parser function with the following modifications: the pages must be provided in a single `pages` parameter, and all values for the `pages` and `exclude` parameters must be separated by newlines. For example,

```
{{Special:Network
 |pages=Page1
 Page2
 Page3
 | class = col-lg-3 mt-0
 | exclude = Main Page
 Sitemap
}}

```

### Layout CSS

[](#layout-css)

The network graphs are located in a div with class `network-visualization`. The default css for this class is

```
.network-visualization {
    width: 100%;
    height: 600px;
}
```

You can add extra CSS in [MediaWiki:Common.css](https://www.mediawiki.org/wiki/Manual:Interface/Stylesheets). You can also add extra classes to the div via the `class` parameter.

### Node Icons

[](#node-icons)

By default, nodes are represented by [OOUI icons](https://doc.wikimedia.org/oojs-ui/master/demos/?page=icons&theme=wikimediaui). This is specified in the node or group options as (excerpted from the full options):

```
"nodes": {
    "shape": "image"
},
"groups": {
    "bluelink": {
        "image": "resources/lib/ooui/themes/wikimediaui/images/icons/article-rtl-progressive.svg"
    },
    "redlink": {
        "image": "resources/lib/ooui/themes/wikimediaui/images/icons/articleNotFound-ltr.svg"
    },
    "externallink": {
        "image": "resources/lib/ooui/themes/wikimediaui/images/icons/linkExternal-ltr-progressive.svg"
    }
}
```

If version 5.1 or later of the [Title Icon](https://mediawiki.org/wiki/Extension:Title_Icon) extension is installed and a page rendered in the graph has at least one title icon defined, one of those title icons will be used for that node's icon. If there are multiple title icons defined for the page, one will be selected in the order in which they were parsed on the page.

### Examples

[](#examples)

#### Options parameter

[](#options-parameter)

Array of [vis.js options](https://visjs.github.io/vis-network/docs/network/#options)

```
{{#network:Page1 | Page2 | Page3
 | options=
{
    "autoResize": true,
    "nodes": {
        "color": "lightblue",
        "shape": "box",
        "borderWidth": 3,
        "font": { "color": "red", "size": 17 }
    }
}
}}

```

Wrong: `"font.color": "red"`, right: `"font": { "color": "red" }`, also right: `"font": "14 px arial red"`

#### Using templates

[](#using-templates)

```
{{#network: {{NetworkPages}}
 | class = col-lg-3 mt-0
 | options= {{NetworkOptions}}
}}

```

Where `NetworkPages` contains `Page1 | Page2 | Page3` and `NetworkOptions` contains `{ "nodes": { "shape": "box" } } `

PHP Configuration
-----------------

[](#php-configuration)

The default value of all parameters can be changed by placing the configuration in "LocalSettings.php". These configuration settings are available:

- `$wgPageNetworkOptions` – options passed directly to the graph visualization library
- `$wgPageNetworkExcludeTalkPages` - indicates if talk pages should be excluded
- `$wgPageNetworkExcludedNamespaces` - IDs of namespaces to exclude
- `$wgPageNetworkEnableDisplayTitle` - indicates if display title should be used for node labels by default
- `$wgPageNetworkLabelMaxLength` - default maximum length for node labels

The default values of these configuration settings can be found in "extension.json". Do not change "extension.json".

**$wgPageNetworkOptions**

Array of [vis.js options](https://visjs.github.io/vis-network/docs/network/#options). Can be (partially) overridden per network via the `options` parameter

Example:

```
$wgPageNetworkOptions = [
    'clickToUse' => true,
    'nodes' => [
        'borderWidth' => 1,
        'borderWidthSelected' => 2,
        'shape' => 'box',
    ],
];
```

Predefined style groups exist to represent links to existing pages (group "bluelink"), links to missing pages (group "redlink"), and links to external web pages (group "externallink"). Styling of those groups can be overridden site-wide using `$wgPageNetworkOptions` or per graph using the options parameter described above.

Note: to change the width or height, use CSS, not the network options.

**$wgPageNetworkExcludeTalkPages**

Possible values: `true`, `false`

Default value: `true` (talk pages get excluded)

**$wgPageNetworkExcludedNamespaces**

List of IDs of namespaces of which all pages should be excluded.

Default value: `[ 2, 4, 8, 12 ]` (excluding `User`, `Project`, `MediaWiki` and `Help`)

Examples:

Exclude the User and Project namespaces: `$wgPageNetworkExcludedNamespaces = [ NS_USER, NS_PROJECT ];`

Keep the default exclusions and also exclude the Talk namespace: `$wgPageNetworkExcludedNamespaces[] = NS_TALK;`

See also: [https://www.mediawiki.org/wiki/Manual:Namespace#Built-in\_namespaces](https://www.mediawiki.org/wiki/Manual:Namespace#Built-in_namespaces)

**$wgPageNetworkEnableDisplayTitle**

By default, should the display title rather than the page title be displayed as a node's label? This can be overridden on a per-graph basis using the `enableDisplayTitle` parameter to #network.

Possible values: `true`, `false`

Default value: `true` (use display title for node labels)

**$wgPageNetworkLabelMaxLength**

The default text length of a node's label. If the node label must be truncated, an ellipsis (…) will appended. A value of 0 indicates that the text length is not limited. This can be overridden on a per-graph basis using the `labelMaxLength` parameter to #network.

Possible values: 0 or a positive integer value

Default value: 20

**$wgRegisterInternalExternals**By default, MediaWiki does not consider links using external link syntax that point to pages in the wiki to be internal links. To make them show up as internal links on the network graph, you need to set `$wgRegisterInternalExternals` to `true` in "LocalSettings.php". If pages already exist in your wiki when that setting is changed, you will need to run the `refreshLinks.php` MediaWiki maintenance script for the change to be recognized.

Performance/caching
-------------------

[](#performancecaching)

This extension bypasses the MediaWiki page cache. This means that your network graphs will always be up to date, without needing to purge the page cache.

Limitations
-----------

[](#limitations)

- Styling or grouping per category or namespace is not supported

Pull requests to remove those limitations are welcome.

You can also contact [Professional Wiki](https://professional.wiki)for [Professional MediaWiki development](https://professional.wiki/en/mediawiki-development) services.

Contribution and support
------------------------

[](#contribution-and-support)

If you want to contribute work to the project, please subscribe to the developers' mailing list and have a look at the contribution guideline.

- [File an issue](https://github.com/ProfessionalWiki/Network/issues)
- [Submit a pull request](https://github.com/ProfessionalWiki/Network/pulls)
- Ask a question on [the mailing list](https://www.semantic-mediawiki.org/wiki/Mailing_list)

[Professional MediaWiki support](https://professional.wiki/en/support) is available via [Professional Wiki](https://professional.wiki)

Development
-----------

[](#development)

Tests, style checks and static analysis can be run via Make. You can execute these commands on the command line in the `extensions/Network` directory:

- `make ci` - run everything
- `make cs` - run style checks
- `make test` - run the tests

For more details see the `Makefile`.

The JavaScript tests can only be run by going to the [`Special:JavaScriptTest` page](https://www.mediawiki.org/wiki/Manual:JavaScript_unit_testing).

License
-------

[](#license)

[GNU General Public License v2.0 or later (GPL-2.0-or-later)](/COPYING).

Professional Support and Development
------------------------------------

[](#professional-support-and-development)

[Professional Wiki](https://professional.wiki) provides commercial [MediaWiki development](https://professional.wiki/en/mediawiki-development), [managed wiki hosting](https://professional.wiki/en/hosting), and [MediaWiki support](https://professional.wiki/en/support).

Release notes
-------------

[](#release-notes)

### Version 4.0.1

[](#version-401)

Released on March 2nd, 2026.

- Fixed redirects causing a TypeError that broke the entire network visualization (#58, #90)
- Fixed redirect pages showing the redirect source title instead of the resolved target title
- Fixed title icon lookup not resolving through redirects
- Fixed page deduplication cache not persisting across calls, causing redundant API requests
- Translation updates (thanks translatewiki.net and its translator community)

### Version 4.0.0

[](#version-400)

Released on July 24th, 2025.

- Raised the minimum PHP version from 7.4 to 8.1
- Raised the minimum MediaWiki version from 1.39 to 1.43

### Version 3.0.0

[](#version-300)

Released on July 7th, 2025.

- Raised the minimum MediaWiki version from 1.31 to 1.39
- Translation updates for system messages (thanks @translatewiki and its translator community)

### Version 2.0.1

[](#version-201)

Released on December 9th, 2023.

- Fixed handling of redirects (thanks @thomas-topway-it)

### Version 2.0.0

[](#version-200)

Released on July 11th, 2021.

- Added optional support for using display title for nodes' labels. (thanks @cicalese)
- Added configurable maximum length for node labels. (thanks @cicalese)
- Added tooltips to nodes. (thanks @cicalese)
- Made styling of nodes representing links to existing pages and links to missing pages configurable by adding vis.js groups named "bluelink" and "redlink". (thanks @cicalese)
- Added support for OOUI icons. (thanks @cicalese)
- Added support for external links. (thanks @cicalese)

### Version 1.4.0

[](#version-140)

Released on January 9, 2021.

- Upgraded viz-network from 8.3.2 to 8.5.5

### Version 1.3.0

[](#version-130)

Released on September 8, 2020.

- Added WAI compliance by adding an aria-label attribute to the network canvas

### Version 1.2.1

[](#version-121)

Released on September 7, 2020.

- Added compatibility with MediaWiki 1.31

### Version 1.2.0

[](#version-120)

Released on September 7, 2020.

- Upgraded viz-network from 7.6 to 8.3

### Version 1.1.1

[](#version-111)

Released on September 7, 2020.

- Made code more robust against invalid titles

### Version 1.1.0

[](#version-110)

Released on August 30, 2020.

- Added `$wgPageNetworkExcludeTalkPages` option
- Added `$wgPageNetworkExcludedNamespaces` option
- Improved node repulsion physics

### Version 1.0.0

[](#version-100)

Released on August 11, 2020.

Initial release

###  Health Score

56

—

FairBetter than 98% of packages

Maintenance77

Regular maintenance activity

Popularity37

Limited adoption so far

Community23

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 57.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~169 days

Recently: every ~423 days

Total

13

Last Release

78d ago

Major Versions

1.4.0 → 2.0.02021-07-11

2.0.1 → 3.0.02025-07-07

3.0.0 → 4.0.02025-07-24

PHP version history (3 changes)1.0.0PHP &gt;=7.3

3.0.0PHP &gt;=7.4

4.0.0PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/451bd4039d530fed8f9c3da91bfa519233a397d2182cdfdcad700f6cfea19b7f?d=identicon)[Jeroen De Dauw](/maintainers/Jeroen%20De%20Dauw)

![](https://avatars.githubusercontent.com/u/1104078?v=4)[Karsten Hoffmeyer](/maintainers/kghbln)[@kghbln](https://github.com/kghbln)

---

Top Contributors

[![JeroenDeDauw](https://avatars.githubusercontent.com/u/146040?v=4)](https://github.com/JeroenDeDauw "JeroenDeDauw (183 commits)")[![cicalese](https://avatars.githubusercontent.com/u/1015024?v=4)](https://github.com/cicalese "cicalese (60 commits)")[![translatewiki](https://avatars.githubusercontent.com/u/24829418?v=4)](https://github.com/translatewiki "translatewiki (58 commits)")[![alistair3149](https://avatars.githubusercontent.com/u/9260542?v=4)](https://github.com/alistair3149 "alistair3149 (4 commits)")[![kghbln](https://avatars.githubusercontent.com/u/1104078?v=4)](https://github.com/kghbln "kghbln (4 commits)")[![SomeMWDev](https://avatars.githubusercontent.com/u/186634068?v=4)](https://github.com/SomeMWDev "SomeMWDev (4 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (3 commits)")[![Universal-Omega](https://avatars.githubusercontent.com/u/54654040?v=4)](https://github.com/Universal-Omega "Universal-Omega (1 commits)")[![malberts](https://avatars.githubusercontent.com/u/1428594?v=4)](https://github.com/malberts "malberts (1 commits)")[![thomas-topway-it](https://avatars.githubusercontent.com/u/46287689?v=4)](https://github.com/thomas-topway-it "thomas-topway-it (1 commits)")

---

Tags

mediawikimediawiki-extensionnetworknetwork-graphopen-datavisualizationmediawikiinteractivepagesvis.jsnetworkchartgraphdynamiclinksvisualizationforce-directed graphoutgoing linksincoming linkswhat links here

###  Code Quality

Static AnalysisPHPStan, Psalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/professional-wiki-network/health.svg)

```
[![Health](https://phpackages.com/badges/professional-wiki-network/health.svg)](https://phpackages.com/packages/professional-wiki-network)
```

###  Alternatives

[novus/nvd3

A reusable charting library written in d3.js

7.2k207.7k2](/packages/novus-nvd3)[graphp/graph

GraPHP is the mathematical graph/network library written in PHP.

711292.6k3](/packages/graphp-graph)[amenadiel/jpgraph

Composer Friendly, full refactor of JpGraph, library to make graphs and charts

1492.2M7](/packages/amenadiel-jpgraph)[noximo/php-colored-ascii-linechart

Pretty line graphs in your console, html or images

1994.1k](/packages/noximo-php-colored-ascii-linechart)[fab2s/nodalflow

A PHP Nodal WorkFlow

16362.4k1](/packages/fab2s-nodalflow)[professional-wiki/modern-timeline

Adds a modern timeline visualization as Semantic MediaWiki result format

1820.8k1](/packages/professional-wiki-modern-timeline)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
