{"id":15017703,"url":"https://github.com/professionalwiki/network","last_synced_at":"2025-04-06T12:09:00.740Z","repository":{"id":42989875,"uuid":"269477306","full_name":"ProfessionalWiki/Network","owner":"ProfessionalWiki","description":"MediaWiki extension for adding interactive network visualizations to your wiki pages","archived":false,"fork":false,"pushed_at":"2025-03-31T12:10:55.000Z","size":2451,"stargazers_count":29,"open_issues_count":14,"forks_count":9,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-06T12:08:54.695Z","etag":null,"topics":["mediawiki","mediawiki-extension","network","network-graph","open-data","visualization"],"latest_commit_sha":null,"homepage":"https://professional.wiki/en/extension/network","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ProfessionalWiki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"JeroenDeDauw","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2020-06-04T22:21:49.000Z","updated_at":"2025-03-31T12:10:58.000Z","dependencies_parsed_at":"2023-12-18T13:31:09.741Z","dependency_job_id":"fa845f1b-6e93-47c0-b974-070a73ae36b8","html_url":"https://github.com/ProfessionalWiki/Network","commit_stats":{"total_commits":275,"total_committers":10,"mean_commits":27.5,"dds":0.3854545454545455,"last_synced_commit":"a6945c2089e14da42c8bb3612a8e866b262de18f"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProfessionalWiki%2FNetwork","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProfessionalWiki%2FNetwork/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProfessionalWiki%2FNetwork/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProfessionalWiki%2FNetwork/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ProfessionalWiki","download_url":"https://codeload.github.com/ProfessionalWiki/Network/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247478323,"owners_count":20945266,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mediawiki","mediawiki-extension","network","network-graph","open-data","visualization"],"created_at":"2024-09-24T19:50:52.809Z","updated_at":"2025-04-06T12:09:00.722Z","avatar_url":"https://github.com/ProfessionalWiki.png","language":"JavaScript","funding_links":["https://github.com/sponsors/JeroenDeDauw"],"categories":[],"sub_categories":[],"readme":"# Network\n\n[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/ProfessionalWiki/Network/ci.yml?branch=master)](https://github.com/ProfessionalWiki/Network/actions?query=workflow%3ACI)\n[![Latest Stable Version](https://poser.pugx.org/professional-wiki/network/v/stable)](https://packagist.org/packages/professional-wiki/network)\n[![Download count](https://poser.pugx.org/professional-wiki/network/downloads)](https://packagist.org/packages/professional-wiki/network)\n[![License](https://poser.pugx.org/professional-wiki/network/license)](LICENSE)\n\nThe **Network** extension allows visualizing connections between wiki pages via an interactive network graph.\n\nIt was created by [Professional Wiki](https://professional.wiki/) and funded by\n[KDZ - Centre for Public Administration Research](https://www.kdz.eu/).\n\n\u003ca href=\"https://raw.githubusercontent.com/ProfessionalWiki/Network/master/.github/network.png\"\u003e\u003cimg src=\".github/network.png\" width=\"350px\" title=\"View image\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://www.youtube.com/watch?v=iI1zJ8ma474\u0026feature=youtu.be\u0026t=1\"\u003e\u003cimg src=\".github/youtube.png\" width=\"350px\" title=\"Play video\" /\u003e\u003c/a\u003e\n\n- [Platform requirements](#platform-requirements)\n- [Installation](#installation)\n- [Usage](#usage)\n  * [Parameters](#parameters)\n  * [Layout CSS](#layout-css)\n  * [Examples](#examples)\n    + [Options parameter](#options-parameter)\n    + [Using templates](#using-templates)\n- [PHP Configuration](#php-configuration)\n- [Limitations](#limitations)\n- [Contribution and support](#contribution-and-support)\n- [Development](#development)\n- [License](#license)\n- [Release notes](#release-notes)\n\n## Platform requirements\n\n* PHP 7.4 or later (tested up to PHP 8.4)\n* MediaWiki 1.39.x or later (tested up to 1.43.x)\n\nSee the [release notes](#release-notes) for more information on the different versions of Network.\n\n## Installation\n\nThe recommended way to install Network is using [Composer](https://getcomposer.org) with\n[MediaWiki's built-in support for Composer](https://professional.wiki/en/articles/installing-mediawiki-extensions-with-composer).\n\nOn the commandline, go to your wikis root directory. Then run these two commands:\n\n```shell script\nCOMPOSER=composer.local.json composer require --no-update professional-wiki/network:~2.0\ncomposer update professional-wiki/network --no-dev -o\n```\n\nThen enable the extension by adding the following to the bottom of your wikis `LocalSettings.php` file:\n\n```php\nwfLoadExtension( 'Network' );\n```\n\nYou can verify the extension was enabled successfully by opening your wikis Special:Version page in your browser.\n\nFinally, please consider [sponsoring the project].\n\n## Usage\n\nMinimal example\n\n```\n{{#network:}}\n```\n\nExample with parameters\n\n```\n{{#network:Page1 | Page2 | Page3\n | class = col-lg-3 mt-0\n | exclude = Main Page ; Sitemap\n}}\n```\n\n### Parameters\n\n\u003ctable\u003e\n    \u003ctr\u003e\n        \u003cth\u003e\u003c/th\u003e\n        \u003cth\u003eDefault\u003c/th\u003e\n        \u003cth\u003eExample value\u003c/th\u003e\n        \u003cth\u003eDescription\u003c/th\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003cth\u003e(page or pages)\u003c/th\u003e\n        \u003ctd\u003e\u003ci\u003eThe current page\u003c/i\u003e\u003c/td\u003e\n        \u003ctd\u003eMyPage\u003c/td\u003e\n        \u003ctd\u003eThe name of the page to show connections for. Can be specified multiple times. The parameter name is optional. Templates are supported\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003cth\u003eclass\u003c/th\u003e\n        \u003ctd\u003e\u003c/td\u003e\n        \u003ctd\u003ecol-lg-3 mt-0\u003c/td\u003e\n        \u003ctd\u003eExtra css class(es) to add to the network graph\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003cth\u003eexclude\u003c/th\u003e\n        \u003ctd\u003e\u003c/td\u003e\n        \u003ctd\u003eSitemap ; Main Page\u003c/td\u003e\n        \u003ctd\u003ePages to exclude from the network graph, separated by semicolon\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003cth\u003eexcludedNamespaces\u003c/th\u003e\n        \u003ctd\u003e\u003c/td\u003e\n        \u003ctd\u003e2, 4, 8, 12\u003c/td\u003e\n        \u003ctd\u003eNamespaces to exclude from the network graph by namespace number, separated by comma\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003cth\u003eoptions\u003c/th\u003e\n        \u003ctd\u003e\u003c/td\u003e\n        \u003ctd\u003e{ \"nodes\": { \"shape\": \"box\" } }\u003c/td\u003e\n        \u003ctd\u003e\n            \u003ca href=\"https://visjs.github.io/vis-network/docs/network/#options\"\u003evis.js options\u003c/a\u003e in JSON.\n            Option names and text values both need to be surrounded with double quotes.\n            Single quotes will not work. Tailing commas also do not work. Two curly brackets closes the parser function,\n            so if you are putting the JSON directly in the parser function rather than using a template, put a tailing space\n            or new line after each closing bracket.\n        \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003cth\u003eenableDisplayTitle\u003c/th\u003e\n        \u003ctd\u003etrue\u003c/td\u003e\n        \u003ctd\u003efalse\u003c/td\u003e\n        \u003ctd\u003e\n            Should the \u003ca href=\"https://www.mediawiki.org/wiki/Help:Magic_words#DISPLAYTITLE\"\u003edisplay title\u003c/a\u003e rather than\n\t    the page title be displayed as a node's label?\n\t    Overrides the value of the \u003ccode\u003e$wgPageNetworkEnableDisplayTitle\u003c/code\u003e configuration variable.\n        \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003cth\u003elabelMaxLength\u003c/th\u003e\n        \u003ctd\u003e20\u003c/td\u003e\n        \u003ctd\u003e30\u003c/td\u003e\n        \u003ctd\u003e\n            The text length of a node's label. If the node label must be truncated, an ellipsis (\u0026#8230;) will appended.\n            A value of 0 indicates that the text length is not limited.\n\t    Overrides the value of the \u003ccode\u003e$wgPageNetworkLabelMaxLength\u003c/code\u003e configuration variable.\n        \u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n\nThere is also an includable special page, Special:Network, that can be used to construct graphs interactively. The\nspecial page presents a form that can be filled in with the same parameters listed above and submitted to render a\ngraph. The special page can also be included in other pages for the same results as the parser function with the\nfollowing modifications: the pages must be provided in a single `pages` parameter, and all values for the `pages` and\n`exclude` parameters must be separated by newlines. For example,\n\n```\n{{Special:Network\n |pages=Page1\n Page2\n Page3\n | class = col-lg-3 mt-0\n | exclude = Main Page\n Sitemap\n}}\n```\n\n### Layout CSS\n\nThe network graphs are located in a div with class `network-visualization`. The default css for this class is\n\n```css\n.network-visualization {\n    width: 100%;\n    height: 600px;\n}\n```\n\nYou can add extra CSS in [MediaWiki:Common.css]. You can also add extra classes to the div via the `class` parameter.\n\n### Node Icons\n\nBy default, nodes are represented by [OOUI icons](https://doc.wikimedia.org/oojs-ui/master/demos/?page=icons\u0026theme=wikimediaui). This is specified in the node\nor group options as (excerpted from the full options):\n\n```json\n\"nodes\": {\n    \"shape\": \"image\"\n},\n\"groups\": {\n    \"bluelink\": {\n        \"image\": \"resources/lib/ooui/themes/wikimediaui/images/icons/article-rtl-progressive.svg\"\n    },\n    \"redlink\": {\n        \"image\": \"resources/lib/ooui/themes/wikimediaui/images/icons/articleNotFound-ltr.svg\"\n    },\n    \"externallink\": {\n        \"image\": \"resources/lib/ooui/themes/wikimediaui/images/icons/linkExternal-ltr-progressive.svg\"\n    }\n}\n```\n\nIf version 5.1 or later of the [Title Icon](https://mediawiki.org/wiki/Extension:Title_Icon) extension is installed and\na page rendered in the graph has at least one title icon defined, one of those title icons will be used for that node's\nicon. If there are multiple title icons defined for the page, one will be selected in the order in which they were\nparsed on the page.\n\n### Examples\n\n#### Options parameter\n\nArray of [vis.js options](https://visjs.github.io/vis-network/docs/network/#options)\n\n```\n{{#network:Page1 | Page2 | Page3\n | options=\n{\n    \"autoResize\": true,\n    \"nodes\": {\n        \"color\": \"lightblue\",\n        \"shape\": \"box\",\n        \"borderWidth\": 3,\n        \"font\": { \"color\": \"red\", \"size\": 17 }\n    }\n}\n}}\n```\n\nWrong: `\"font.color\": \"red\"`, right: `\"font\": { \"color\": \"red\" }`, also right: `\"font\": \"14 px arial red\"`\n\n#### Using templates\n\n```\n{{#network: {{NetworkPages}}\n | class = col-lg-3 mt-0\n | options= {{NetworkOptions}}\n}}\n```\n\nWhere `NetworkPages` contains `Page1 | Page2 | Page3` and `NetworkOptions` contains `{ \"nodes\": { \"shape\": \"box\" } } `\n\n## PHP Configuration\n\nThe default value of all parameters can be changed by placing configuration in \"LocalSettings.php\".\nThese configuration settings are available:\n\n* `$wgPageNetworkOptions` – options passed directly to the graph visualization library\n* `$wgPageNetworkExcludeTalkPages` - indicates if talk pages should be excluded\n* `$wgPageNetworkExcludedNamespaces` - IDs of namespaces to exclude\n* `$wgPageNetworkEnableDisplayTitle` - indicates if display title should be used for node labels by default\n* `$wgPageNetworkLabelMaxLength` - default maximum length for node labels\n\nDefault values of these configuration settings can be found in \"extension.json\". Do not change \"extension.json\".\n\n**$wgPageNetworkOptions**\n\nArray of [vis.js options](https://visjs.github.io/vis-network/docs/network/#options). Can be (partially) overridden per network via the `options` parameter\n\nExample:\n\n```php\n$wgPageNetworkOptions = [\n    'clickToUse' =\u003e true,\n    'nodes' =\u003e [\n        'borderWidth' =\u003e 1,\n        'borderWidthSelected' =\u003e 2,\n        'shape' =\u003e 'box',\n    ],\n];\n```\n\nPredefined style groups exist to represent links to existing pages (group \"bluelink\"), links to missing pages\n(group \"redlink\"), and links to external web pages (group \"externallink\"). Styling of those groups can be\noverridden site-wide using `$wgPageNetworkOptions` or per graph using the options parameter described above.\n\nNote: to change the width or height, use CSS, not the network options.\n\n**$wgPageNetworkExcludeTalkPages**\n\nPossible values: `true`, `false`\n\nDefault value: `true` (talk pages get excluded)\n\n**$wgPageNetworkExcludedNamespaces**\n\nList of IDs of namespaces of which all pages should be excluded.\n\nDefault value: `[ 2, 4, 8, 12 ]` (excluding `User`, `Project`, `MediaWiki` and `Help`)\n\nExamples: \n\nExclude the User and Project namespaces:\n`$wgPageNetworkExcludedNamespaces = [ NS_USER, NS_PROJECT ];`\n\nKeep the default exclusions and also exclude the Talk namespace:\n`$wgPageNetworkExcludedNamespaces[] = NS_TALK;`\n\nSee also: https://www.mediawiki.org/wiki/Manual:Namespace#Built-in_namespaces\n\n**$wgPageNetworkEnableDisplayTitle**\n\nBy default, should the display title rather than the page title be displayed as a node's label?\nThis can be overridden on a per-graph basis using the `enableDisplayTitle` parameter to #network.\n\nPossible values: `true`, `false`\n\nDefault value: `true` (use display title for node labels)\n\n**$wgPageNetworkLabelMaxLength**\n\nThe default text length of a node's label. If the node label must be truncated, an ellipsis (\u0026#8230;) will appended.\nA value of 0 indicates that the text length is not limited.\nThis can be overridden on a per-graph basis using the `labelMaxLength` parameter to #network.\n\nPossible values: 0 or a positive integer value\n\nDefault value: 20\n\n**$wgRegisterInternalExternals**\nBy default, MediaWiki does not consider links using external link syntax that point to pages in the wiki to be\ninternal links. To make them show up as internal links on the network graph, you need to set\n`$wgRegisterInternalExternals` to `true` in \"LocalSettings.php\". If pages already exist in your wiki when that\nsetting is changed, you will need to run the `refreshLinks.php` MediaWiki maintenance script for the change to\nbe recognized.\n\n## Performance / caching\n\nThis extension bypasses the MediaWiki page cache. This means that your network graphs will always be up to date,\nwithout needing to purge the page cache.\n\n## Limitations\n\n* Styling or grouping per category or namespace is not supported\n\nPull requests to remove those limitations are welcome.\n\nYou can also contact [Professional.Wiki](https://professional.wiki/)\nfor [Professional MediaWiki development](https://professional.wiki/en/mediawiki-development) services.\n\n## Contribution and support\n\nIf you want to contribute work to the project please subscribe to the developers mailing list and\nhave a look at the contribution guideline.\n\n* [File an issue](https://github.com/ProfessionalWiki/Network/issues)\n* [Submit a pull request](https://github.com/ProfessionalWiki/Network/pulls)\n* Ask a question on [the mailing list](https://www.semantic-mediawiki.org/wiki/Mailing_list)\n\n[Professional MediaWiki support](https://professional.wiki/en/support) is available via\n[Professional.Wiki](https://professional.wiki/).\n\n## Development\n\nTests, style checks and static analysis can be run via Make. You can execute these commands on the command line\nin the `extensions/Network` directory:\n\n* `make ci` - run everything\n* `make cs` - run style checks\n* `make test` - run the tests\n\nFor more details see the `Makefile`.\n\nThe JavaScript tests can only be run by going to the [`Special:JavaScriptTest` page][JS tests].\n\n## License\n\n[GNU General Public License v2.0 or later (GPL-2.0-or-later)](/COPYING).\n\n## Professional Support and Development\n\n[Professional.Wiki] provides commercial [MediaWiki development], [managed wiki hosting] and [MediaWiki support].\n\n## Release notes\n\n### Version 3.0.0\n\nRelease date TDB\n\n* Raised minimum MediaWiki version from 1.31 to 1.39\n\n### Version 2.0.1\n\nReleased on December 9th, 2023.\n\n* Fixed handling of redirects (thanks @thomas-topway-it)\n\n### Version 2.0.0\n\nReleased on July 11th, 2021.\n\n* Added optional support for using display title for nodes' labels. (thanks @cicalese)\n* Added configurable maximum length for node labels. (thanks @cicalese)\n* Added tooltips to nodes. (thanks @cicalese)\n* Made styling of nodes representing links to existing pages and links to\n  missing pages configurable by adding vis.js groups named \"bluelink\" and\n  \"redlink\". (thanks @cicalese)\n* Added support for OOUI icons. (thanks @cicalese)\n* Added support for external links. (thanks @cicalese)\n\n### Version 1.4.0\n\nReleased on January 9, 2021.\n\n* Upgraded viz-network from 8.3.2 to 8.5.5\n\n### Version 1.3.0\n\nReleased on September 8, 2020.\n\n* Added WAI compliance by adding an aria-label attribute to the network canvas\n\n### Version 1.2.1\n\nReleased on September 7, 2020.\n\n* Added compatibility with MediaWiki 1.31\n\n### Version 1.2.0\n\nReleased on September 7, 2020.\n\n* Upgraded viz-network from 7.6 to 8.3\n\n### Version 1.1.1\n\nReleased on September 7, 2020.\n\n* Made code more robust against invalid titles\n\n### Version 1.1.0\n\nReleased on August 30, 2020.\n\n* Added `$wgPageNetworkExcludeTalkPages` option\n* Added `$wgPageNetworkExcludedNamespaces` option\n* Improved node repulsion physics\n\n### Version 1.0.0\n\nReleased on August 11, 2020.\n\nInitial release\n\n[MediaWiki:Common.css]: https://www.mediawiki.org/wiki/Manual:Interface/Stylesheets\n[JS tests]: https://www.mediawiki.org/wiki/Manual:JavaScript_unit_testing\n[sponsoring the project]: https://github.com/sponsors/JeroenDeDauw\n[Professional.Wiki]: https://professional.wiki\n[MediaWiki development]: https://professional.wiki/en/mediawiki-development\n[managed wiki hosting]: https://professional.wiki/en/hosting\n[MediaWiki support]: https://professional.wiki/en/support\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprofessionalwiki%2Fnetwork","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprofessionalwiki%2Fnetwork","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprofessionalwiki%2Fnetwork/lists"}