DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:xtern

This is an old revision of the document!


External Link Check

Compatible with DokuWiki

Detritus,"Elenor of Tsort","Frusterick Manners",Greebo

plugin Checks external links for connection errors

Last updated on
2019-02-10
Provides
Action
Repository
Source

This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.

Similar to linksenhanced

Tagged with icons, links

Installation

Install the plugin using the Plugin Manager and the download URL above, which points to latest version of the plugin. Refer to Plugins on how to install plugins manually.

External requirements

1. This plugin requires the PHP curl library.
2. It also requires valid CA certificate file(s) for ssl. This generally is not a problem on linux systems where openssl has been installed. On Windows these certificates may not be available for use by curl. For Windows and other instances where not available you can install the certificates from the xtern admin panel. Or you can self-install pem certificate files. See:

For this certificate configuration, you must also set to true the ca_required configuration option.

Examples/Usage

Usage

The plugin checks to see if an external url is accessible. If it is, then it will replace the standard gray external link icon with a green globe. If not, it will replace the gray icon with a red globe. This is in keeping with DokuWiki's use of green for valid internal links and red for broken internal links. These changes do not apply to interwiki links. Interwiki links have the class interwiki and have icons specific to the wiki or else the Dokuwiki generic interwiki icon. External links have the class urlextern and get the globe icon.

HTTP Status codes 4xx

A group of http status codes in the 400 range designate urls that are not technically broken but are restricted from accessing their targets. These are marked, as above, with the black and white “explore-off” icon adapted from the Material Design icon collection. On a mouse-over, a tooltip shows the status code and its name.

Command Line Script

There is a script in the scripts directory which can be run from the lib/exe directory:

  php chk_links.php

This will list all your broken links and the pages where they occur. The command line script has no time limit, and processes the complete wiki.

Admin Panel

You can also run a check in the plugin's administration panel. There you can do the check by namespace or for the entire wiki. The output in the admin panel creates links which open a new window ready for editing your broken links. Not all errors show https status codes. Some will show curl error codes with explanations. What shows up here as curl errors, in the normal page display will be marked with the red globe.

Checking the entire wiki on large sites may need more than the max_execution_time set for php scripts on your system. The plugin has a max_time configuration option. This defaults to 120 seconds and can be increased.

When the new window opens for editing, the broken links for this page will be displayed at the top of the page in yellow message banners. In the file itself, the broken links will be marked as broken:

__ BROKEN-LINK: [[http://www.mturner.org/html/credits.tgz|mturner.org]] LINK-BROKEN __

When the Preview button is clicked these will show up as underlined. Keep in mind that this is a preview. Anything that is not saved will disappear from the page. The other side of this is that if you don't remove the broken link markup from the page, it will be saved.

Configuration Options

Name Description Default
ca_requiredThis wiki uses a cacerts.pem file installed in the xtern/ca directory. See external_requirementsfalse
max_timeTime in seconds to allow for broken link checking in the admin panel. See admin_panel120

Discussion

Please use the forum or the github issue tracker.

plugin/xtern.1549893628.txt.gz · Last modified: 2019-02-11 15:00 by turnermm

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki