|This page is kept for historical interest. Its content is outdated or may be wrong. You may find more up-to-date information at on the www.mediawiki.org website.|
Although some background information is provided only here, this page is outdated relative to the corresponding page on mediawiki.
As of version 1.5, MediaWiki supports user-configuration of the URI schemes (often referred to as "URL protocols") recognised as external links, via a variable called
$wgUrlProtocols which consists of a regular expression of prefixes which are recognised as beginning a link.
The default value is currently
$wgUrlProtocols = 'http:\/\/|https:\/\/|ftp:\/\/|irc:\/\/|gopher:\/\/|news:|mailto:';, which means that strings beginning with the following prefixes are considered valid external links:
https:(normal and secure web pages)
gopher:(the largely historic Gopher protocol)
The Wikimedia websites are currently set to use this default setting.
Suggesting new schemes
Users often suggest, via MediaZilla:, that certain extra schemes be added to this list. The first question you need to consider if making a request is whether you want the change to affect the default setting for all users of the MediaWiki software or just the Wikimedia group of projects. [See Glossary if you're confused about the difference.] Remember that a change on a non-Wikimedia site has nothing to do with the maintainers of either Wikimedia or MediaWiki, as this is purely a configuration issue.
Criteria to consider
When making any suggestion, it might be useful to answer the following 3 questions (expanded from MediaZilla:3133#c5). If suggesting a change to the default setting, "the project" should be read as "all projects which use MediaWiki software"; if suggesting a configuration change for Wikimedia websites, "the project" means "one or more" of these.
- Is this URI scheme widely supported in the software used by readers? If it requires additional downloads, how likely are people to make or have made these downloads?
- Are editors familiar with this scheme and thus likely to use it?
- Are there likely to be situations within the project in which this scheme will be useful?
The consequences of adding a URI scheme without considering these questions isn't all that dire, but it could easily become a source of bloat—including all the officially registered URI schemes would result in something like this:
While some of these are obviously inappropriate, this demonstrates that some selectivity is required. And just think of all the free-standing links that could end up being created quite unintentionally by unfortunate placing of colons...
On the other hand as long as stuff like
worldwind: is supported any hocuspocus qualifies as good scheme and should be requested as you see fit.
Here are some previous and current discussions about adding particular URI schemes:
- MediaZilla:2807 - discussing
- MediaZilla:3133 - discussing
- MediaZilla:1235 - discussing
tel:and similar (closed)
- MediaZilla:3147 - discussing