PHPackages                             tentwentyfour/blockdiag-mediawiki-extension - 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. [API Development](/categories/api)
4. /
5. tentwentyfour/blockdiag-mediawiki-extension

ActiveMediawiki-extension[API Development](/categories/api)

tentwentyfour/blockdiag-mediawiki-extension
===========================================

Blockdiag wrapper for Mediawiki

1.1.0(9y ago)037[1 issues](https://github.com/tentwentyfour/blockdiag-mediawiki-extension/issues)Apache-2.0PHPPHP &gt;=5.4

Since Aug 22Pushed 9y ago8 watchersCompare

[ Source](https://github.com/tentwentyfour/blockdiag-mediawiki-extension)[ Packagist](https://packagist.org/packages/tentwentyfour/blockdiag-mediawiki-extension)[ Docs](https://github.com/tentwentyfour/blockdiag-mediawiki-extension)[ RSS](/packages/tentwentyfour-blockdiag-mediawiki-extension/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (4)Used By (0)

Blockdiag MediaWiki Extension
=============================

[](#blockdiag-mediawiki-extension)

Since version 1.1.0, this extension provides two services:

1. a [ParserHook](#Using_the_ParserHook) to be used when manually specifying blockdiag DSL
2. a [ResultPrinter](#Using_the_Semantic_Result_Printer) for [SemanticMediaWiki](https://www.semantic-mediawiki.org/wiki/Semantic_MediaWiki). (*Currently this only supports the `nwdiag` format.*)

Requirements
------------

[](#requirements)

- [blockdiag](http://blockdiag.com/en/) (and/or seqdiag, actdiag, nwdiag)
- mediawiki &gt;= 1.25.0

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

[](#installation)

1. Simply run the following command inside your mediawiki doc-root:

```
    $ composer require tentwentyfour/blockdiag-mediawiki-extension

```

2. Then add this line to the end of your LocalSettings.php :

```
    wfLoadExtension('BlockdiagMediawiki');

```

3. (Optional) If you installed your blockdiag package somewhere else than the default, you may tell the plugin where to find the binaries:

```
    $wgBlockdiagPath = '/usr/bin/';      // default is /usr/local/bin/

```

Using the ParserHook
====================

[](#using-the-parserhook)

```

{
    A -> B -> C
         B -> D -> E
}

```

[![Blockdiag example](/contrib/example.png?raw=true "Blockdiag example")](/contrib/example.png?raw=true)

If you want to use other \*diag tools, simply specify their name before the leading opening brace: "{", e.g. `seqdiag {` or `nwdiag {`.

```

seqdiag {
    A -> B;
         B -> C;
}

```

[![Seqdiag example](/contrib/seqdiag.png?raw=true "Seqdiag example")](/contrib/seqdiag.png?raw=true)

```

nwdiag {
inet [shape = cloud];
inet -- router;
network dmz {
      router;
      address = "210.x.x.x/24"
      group web {
          web01 [address = "210.x.x.1, 10.42.100.1"];
          web02 [address = "210.x.x.2"];
      }
  }
  network internal {
      address = "172.x.x.x/24";

      web01 [address = "172.x.x.1"];
      web02 [address = "172.x.x.2"];
      db01;
      db02;
  }
}

```

[![Nwdiag example](/contrib/nwdiag.png?raw=true "Nwdiag example")](/contrib/nwdiag.png?raw=true)

Please note that the Blockdiag extension will cache your images so that they don't have to be re-rendered on each page-load. If you need your diagram to be re-rendered, you need to referesh or edit the page or disable caching for the page.

Using the Semantic Result Printer
=================================

[](#using-the-semantic-result-printer)

If you have Semantic Mediawiki installed, you can use this extension as a result printer as well, generating diagrams directly from your semantic queries.

Requirements
------------

[](#requirements-1)

- [Semantic Mediawiki](https://www.semantic-mediawiki.org/wiki/Semantic_MediaWiki)
- [Semantic Result Format](https://www.semantic-mediawiki.org/wiki/Semantic_Result_Formats)

Templates
---------

[](#templates)

The following templates are given as an example only and present the bare minimum of properties required for the result printer to give you sensible results. Note that you can adjust the style and properties as you wish, as long as you make sure your `{{#ask:}}` query returns IP addresses and fully qualified domain names (fqdn) for the selected nodes.

We have omitted forms and property details. Semantic Forms will simplify the creation of your Server and Tunnel entries.

### Server Template

[](#server-template)

```

{| class="wikitable" style="width: 30em; font-size: 90%; border: 1px solid #aaaaaa; background-color: #f9f9f9; color: black; margin-bottom: 0.5em; margin-left: 1em; padding: 0.2em; float: right; clear: right; text-align:left;"
! style="text-align: left; background-color:#ccccff;" colspan="2" |{{PAGENAME}}
|-
! Fully Qualified Domain Name:
| [[Has fqdn::{{{fqdn|}}}]]
|-
! Tunneled IPs:
| {{{tipv4|}}} {{{tipv6|}}}
|-
! Uses VPN tunnel:
| {{#arraymap:{{{tunnel|}}}|,|x|[[Uses VPN tunnel::x]]}}
|}

{{#set:
Has tunnel IPv4={{{tipv4|}}}
}}
[[Category:Server]]

```

### Tunnel Template

[](#tunnel-template)

```
{| class="wikitable"
! colspan="2" | {{PAGENAME}}
|-
! Purpose
|  [[Has purpose::{{{purpose|}}}]]
|-
! Subnet
|  [[Has subnet::{{{subnet|}}}]]
|-
! Server
|  [[Has server::{{{server|}}}]]
|-
! Port
|  [[Has VPN port::{{{port|}}}]]
|-
! Hosts connected through this tunnel
| {{#ask:[[Uses VPN tunnel::{{SUBJECTPAGENAME}}]]|format=list|?Has tunnel IPv4=}}
|}
[[Category:Tunnel]]

```

Example query
-------------

[](#example-query)

E.g. on a page that is named after one of your OpenVPN configurations, you could use a query like the following one:

```
{{#ask:
 [[Uses VPN tunnel::{{PAGENAME}}]]
 |format=nwdiag
 |domain=servers.mydomain.tld
 |gateway=gateway.hypervisor
 |sort=Has tunnel IPv4
 |?Has tunnel IPv4=ipv4
 |?Has fqdn=fqdn
}}

```

The `gateway` parameter is optional.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 50% 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 ~3 days

Total

3

Last Release

3550d ago

PHP version history (2 changes)1.0.0PHP ~5.3

1.0.1PHP &gt;=5.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/6440c9af3ba24931748051967b16ecc2fb7f7c7e0a741b6b25c3449277b4b7b9?d=identicon)[kwisatz](/maintainers/kwisatz)

---

Top Contributors

[![kwisatz](https://avatars.githubusercontent.com/u/237949?v=4)](https://github.com/kwisatz "kwisatz (16 commits)")[![gillesmag](https://avatars.githubusercontent.com/u/664445?v=4)](https://github.com/gillesmag "gillesmag (14 commits)")[![kjmkznr](https://avatars.githubusercontent.com/u/85144?v=4)](https://github.com/kjmkznr "kjmkznr (1 commits)")[![sunnyone](https://avatars.githubusercontent.com/u/818870?v=4)](https://github.com/sunnyone "sunnyone (1 commits)")

---

Tags

mediawikidiagram

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/tentwentyfour-blockdiag-mediawiki-extension/health.svg)

```
[![Health](https://phpackages.com/badges/tentwentyfour-blockdiag-mediawiki-extension/health.svg)](https://phpackages.com/packages/tentwentyfour-blockdiag-mediawiki-extension)
```

###  Alternatives

[addwiki/mediawiki-api-base

Simple MediaWiki API library

37149.7k12](/packages/addwiki-mediawiki-api-base)[addwiki/mediawiki-api

A MediaWiki API library

43106.3k7](/packages/addwiki-mediawiki-api)[starcitizentools/citizen-skin

A beautiful, usable, responsive MediaWiki skin with in-depth extension support. Originally developed for the Star Citizen Wiki.

3164.5k](/packages/starcitizentools-citizen-skin)[addwiki/wikibase-api

Wikibase API library

254.7k3](/packages/addwiki-wikibase-api)[mediawiki/translate

The only standard solution to translate any kind of text with an avant-garde web interface within MediaWiki, including your documentation and software

457.9k](/packages/mediawiki-translate)[professional-wiki/network

MediaWiki extension for adding interactive network visualizations to your wiki pages

3211.9k](/packages/professional-wiki-network)

PHPackages © 2026

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