Download the PHP package mediawiki/alink without Composer

On this page you can find all versions of the php package mediawiki/alink. 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 alink

Alink

MediaWiki extension (type: parserhook) that provides two parser functions for rendering raw HTML <a> and <img> tags with full attribute control.

Installation

  1. Clone or extract into extensions/Alink/.
  2. Add to LocalSettings.php:

Parser functions

#alink — anchor tag

Allowed attributes: href, rel, target, class, id, content, name, itemprop, and any data-* attribute.

Flags (no = sign):

Flag Effect
nourlencode Skip urlencode() on the page name (useful for query strings with special characters)
noprefix Strip namespace prefix from auto-generated link text

Link text is the bare argument (no =). If omitted, falls back to the href value; with noprefix, falls back to the page title without namespace.

Internal vs external links: if href starts with http://, https://, or ftp://, the value is used as-is. Otherwise it is treated as a wiki page name and resolved through $wgArticlePath.

Examples

External link:

Internal wiki page:

Internal link with special characters in query string (skip URL encoding):

Internal link, display title without namespace:

With data-* attribute:


#aimg — image tag

Allowed attributes: src, rel, title, alt, class, id, content, itemprop, and any data-* attribute.

If src does not start with a recognized protocol, it is treated as a MediaWiki file name and resolved to its full URL via wfFindFile(). If the file does not exist in the wiki, src is left unchanged.

Examples

External image:

Wiki-hosted file:


Development

Install dependencies:

Lint (syntax check + executable-bit check):

Fix executable bits:

PHP CodeSniffer (requires mediawiki/mediawiki-codesniffer installed separately):

There are no automated unit tests. Manual testing requires a running MediaWiki instance with the extension loaded.

Notes


All versions of alink with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4.3
composer/installers Version 1.*,>=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 mediawiki/alink contains the following files

Loading the files please wait ...