Download the PHP package professional-wiki/network without Composer

On this page you can find all versions of the php package professional-wiki/network. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package network

Network

GitHub Workflow Status Latest Stable Version Download count

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

It was created by Professional.Wiki and funded by KDZ - Centre for Public Administration Research.

Platform requirements

See the release notes for more information on the different versions of Network.

Installation

The recommended way to install Network is using Composer with MediaWiki's built-in support for Composer.

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

Then enable the extension by adding the following to the bottom of your wikis LocalSettings.php file:

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

Finally, please consider sponsoring the project.

Usage

Minimal example

Example with 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 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 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,

Layout CSS

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

You can add extra CSS in MediaWiki:Common.css. You can also add extra classes to the div via the class parameter.

Node Icons

By default, nodes are represented by OOUI icons. This is specified in the node or group options as (excerpted from the full options):

If version 5.1 or later of the 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.

Configuration

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

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

$wgPageNetworkOptions

Array of vis.js options. Can be (partially) overridden per network via the options parameter

Example:

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

$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.

Examples

Options parameter

Array of vis.js options

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

Using templates

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

Performance / caching

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

Pull requests to remove those limitations are welcome.

You can also contact Professional.Wiki for Professional MediaWiki development services.

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.

Professional MediaWiki support is available via Professional.Wiki.

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:

For more details see the Makefile.

The JavaScript tests can only be run by going to the Special:JavaScriptTest page.

License

GNU General Public License v2.0 or later (GPL-2.0-or-later).

Professional Support and Development

Professional.Wiki provides commercial MediaWiki development, managed wiki hosting and MediaWiki support.

Release notes

Version 2.0.1

Released on December 9th, 2023.

Version 2.0.0

Released on July 11th, 2021.

Version 1.4.0

Released on January 9, 2021.

Version 1.3.0

Released on September 8, 2020.

Version 1.2.1

Released on September 7, 2020.

Version 1.2.0

Released on September 7, 2020.

Version 1.1.1

Released on September 7, 2020.

Version 1.1.0

Released on August 30, 2020.

Version 1.0.0

Released on August 11, 2020.

Initial release


All versions of network with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3
composer/installers Version ^2|^1.0.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package professional-wiki/network contains the following files

Loading the files please wait ....