Extension:Email Link

= Email Link extension =

This extension matches things that look like email addresses, and turns them into links. It was not written because it's a good idea to do this, but because many people did want this feature.

Note that it does NOT match ALL valid email addresses because the author believes that this would match too many non-email things.

The regular expression tries to avoid linking what is already linked, but cannot entirely reliably do so, because it doesn't parse all of the wikitext.

The code


Installation
Put the code above in a file called maillink.php in your extensions directory, and add the following line just before the closing ?> of your LocalSettings.php:

require_once('extensions/maillink.php');

Note: you need to make sure that there is no whitespace just before the initial &lt;?php in maillink.php. = Bugging the author =

The author's website is at http://juerd.nl/, and provides several ways of contacting him.

Mediawiki 1.11
The function needs to have a 'return true' added to the function as hooks have changed as of Mediawiki 1.11 apparently. The code should look like the following: 