Extension:EmailAddressImage

From MediaWiki.org

Jump to: navigation, search
Manual on MediaWiki Extensions
List of MediaWiki Extensions
Email Address Image

Release status: stable

Implementation Tag
Description Generates an image of input text for obfuscating email addresses.
Author(s) Maarten van Dantzich
Version 1.1 (2008-02-25)
MediaWiki 1.11.1
Download SVN
LOG
Hooks used

ParserAfterStrip

Contents

[edit] What can this extension do?

This extension turns text between <email> and </email> tags into an image of the text, so you can embed email addresses in your wiki without having them harvested by spammers. The address will not be clickable or copy/pastable; users will have to copy it by hand into a mail.

[edit] Usage

The email address must be specified in this tag format: <email>user@domain.com</email>. The code verifies that the text between the tags looks like an email address to prevent HTML/XSS injection.

[edit] Installation

Copy the files from SVN into $IP/extensions/EmailAddressImage/, then add the include to your LocalSettings.php.

Note that the code assumes you're placing the code files into $IP/extensions/EmailAddressImage/. If you place them elsewhere, you must modify the URL generated in the code to match.

[edit] Changes to LocalSettings.php

require_once("extensions/EmailAddressImage/EmailAddressImage.php");

[edit] See also

There's also Extension:EmailObfuscator which turns an email address into obfuscated HTML. That extension is lighter weight, but spammers can defeat it with little effort.

Personal tools