Extension:ExternalLinks

Description
This extension adds  which lists all external links used on the wiki including dynamic URLs by templates.

The results table lists the pages which use the URL (edit link with preview).

URLs can be filtered with a truncated text string.

URL validation
The extension also works as link checker by validating the reported URLs.

For each result page you can let PHP check the availability of each URL target by reporting its server response header (requires the  setting, see below).

You could also use a browser plugin like Pinger for Firefox.

Although e-mail addresses cannot be validated too easily, they can be added to the report list.

Download & Installation
Download and extract it into your extensions folder:


 * ExternalLinks1.0.zip / tar

Add this to 'LocalSettings.php' in your wiki installation folder.

should appear on your Special:Version.

Configuration

 * Override the default user right "edit" which is required to view the page.
 * Override the default user right "edit" which is required to view the page.


 * Add class names to the result table.
 * Add class names to the result table.


 * Add class names to the page (article) links.
 * Add class names to the page (article) links.


 * Overrides the default 200 results per page.
 * Overrides the default 200 results per page.


 * Enables the options
 * Mark all URLs on result pages as "checked today"
 * Last validation older than: X days
 * Requires a new date row 'el_last_validated' in table 'externallinks' (see Download & Installation).
 * Requires a new date row 'el_last_validated' in table 'externallinks' (see Download & Installation).

In  "cURL support" should be "enabled". In  "allow_url_fopen" should be "on".
 * Define the validation mode, e.g. . Options:
 * " " uses cURL as PHP extension.
 * " " uses cURL as PHP extension.
 * " " uses PHP's get_headers and requires (security risk!) and only supports the  -protocol.


 * Validating URLs with a  can take very long so the default number of results is 25.
 * Validating URLs with a  can take very long so the default number of results is 25.

Skip previously checked URLs
Optional: When you validate URLs you can store the date and skip these URLs next time, e.g. by hiding all URLs which have been validated (and stored) in the past X days.

will add the option Mark all URLs on result pages as "checked today".

To store the date you need to add a new row  to the  -table. Run this SQL command:

With stored dates you can later use the option Last validation is older than: [___] days

Contribution
Translations can be posted here.

Coding
Please post if you have a working solution for


 * grouping results of different wiki pages with the same URL (same URLs should only be listed once with a list of the pages they're used on)
 * a page filter that excludes pages with a given string (like URL string filter)
 * a namespace selector as on Special:Search
 * validating https-URLs

MW version tests
In theory this should work in MediaWiki 1.5+ where the "externallinks"-table was introduced. Nontheless it would be nice if this was tested.


 * Tested and working on MW 1.18.1 --Subfader (talk) 21:11, 29 June 2012 (UTC)
 * Tested and working on MW 1.16alpha --Subfader (talk) 21:11, 29 June 2012 (UTC)

Versions

 * 1.0 (2012-07-14) cURL support,, URL exclude input,
 * 0.1 (2012-06-29) Extension added