The TrustedLinks and UntrustedLinksLogger MediaWiki extensions

Note that a more convenient (to your new users) solution might be to install the ConfirmEdit extension by Brion Vibber and others - by default it shows a CAPTCHA when a user attempts to edit a URL into a page.

The TrustedLinks and UntrustedLinksLogger extensions are based on the NotEvil extension by James Paige, and perform a very similar task: preventing spammers from editing spam links (URLs/URIs or URL-like text) into your pages. TrustedLinks blocks insertion of links into MediaWiki pages by users who do not have the 'postlink' right, showing them a configurable error message on attempting to save the edit, and UntrustedLinksLogger alerts admins to such link attempts by sending an email and/or logging to a file. It is not necessary to install the UntrustedLinksLogger extension, but if you do, you must install the TrustedLinks extension too.

The installation and usage instructions for each of these extensions are in the comments at the top of the TrustedLinks.php and UntrustedLinksLogger.php files (linked to below). To save a copy of each file: right-click on its filename link below, and then choose the save option (named differently in different browsers, but e.g. in Firefox it appears as "Save Link As...") from the context menu, or, left click on the file to open it in your browser, and then click "File"->"Save Page As" in your browser's main menu.

Download latest versions

Download earlier versions