Wiki source for CheckLinksActionInfo

Show raw source

=====Checklinks Action Documentation=====
This is the documentation page for the ##checklinks## action.
{{since version="1.4.0" align="left"}}

>>==See also:==
Development: [[ | ChecklinksAction]].>>This is the documentation page for the Checklinks action.::c::


==Short description==
This administration tool checks the validity of hyperlinks on some or all of the wiki pages and displays a report of broken links.

""<table cellspacing="0" cellpadding="2" border="1">
<tr><th scope="col">name</th><th scope="col">type</th><th scope="col">required?</th><th scope="col">default</th><th scope="col">description</th></tr>
<tr><td>scope</td><td>string</td><td>optional</td><td>user</td><td>Allowed values are 'page' (check only this page), 'user' (check all pages owned by current user) and 'all' (check all pages for which current user has ACL-read-access)</td></tr>
<tr><td>sort</td><td>string</td><td>optional</td><td>tag</td><td>Allowed values are 'tag' (sort on page tag), 'type' (sort on link type) and 'cnt' (sort on occurences count)</td></tr>
<tr><td>opts</td><td>string</td><td>optional</td><td></td><td>Options: any combination of 'i' (internal=do not check external web pages), 't' (terse=show only summary report) and 'w' (check page tag format, i.e. that it is formatted as a valid WikiWord)</td></tr>
==Long description==
Link checkers are a standard administration tool for webmasters and can be run on a wiki site. However, a standard link checker has the following drawbacks when used with WikkaWiki:
~-as it is not a registered wiki user, it can be denied access to ACL-protected pages
~-it checks older versions of each page, adding significantly to execution time
~-it is not always able to check for "" 'file://' "" hyperlinks
~-it cannot point out non-existent (i.e. wanted) wiki pages, as the corresponding hyperlink points to an (existing) ""WikiWord/edit"" page tag

This action is a link checker adapted to the wiki context. It goes over the latest version of all wikka pages accessible in read mode to the current user and checks for the validity of various types of hyperlinks appearing on these pages.

Link categories checked are:
~- intra-wiki (page) links ;
~- inter-wiki links ;
~- other web pages hosted on the same or a different server ;
~- files on a local or shared directory ;
~- actions.

When run by a Wiki Admin with a scope="all" parameter value, it checks the integrality of the wiki content.

%%{{checklinks [scope="page"] [sort="type"] [opts="[i][t][w]"]}}%%

Let's create on purpose on this page a NonExistentWikiPageLink, a ""<a href=''>non-existent external link</a> and a <a href='file://./files/'>non-existent file link</a>"".

The output of ""{{checklinks scope="page"}} would look like:<br /><br />
<h3>Link check summary</h3><table class='wikka' cellpadding='2' cellspacing='1' border='2'><tr class='comment'><th>Link type</th><th>Valid links #</th><th>Broken links #</th></tr><tr><td>Action</td><td align='right'>1</td><td align='right'>0</td></tr><tr><td>External</td><td align='right'>1</td><td align='right'>1</td></tr><tr><td>Inter-wiki</td><td align='right'>0</td><td align='right'>0</td></tr><tr><td>Wiki page</td><td align='right'>3</td><td align='right'>1</td></tr><tr><td>File</td><td align='right'>0</td><td align='right'>1</td></tr><tr class='comment'><td>Total</td><td align='right'>5</td><td align='right'>3</td></tr></table><br /><h3>Detailed report</h3><table class='wikka' cellpadding='2' cellspacing='1' border='2'><tr class='comment'><th>Link type</th><th>Page name</th><th>Link value</th><th>Error message</th><th>Occurences</th></tr><tr><td>File</td><td><a href='http:./wikka.php?wakka=ChecklinksActionInfo'>ChecklinksActionInfo</a></td><td><a href='file://./files/'>./files/</a></td><td>File not found</td><td align='right'>1</td></tr><tr><td>External</td><td><a href='./wikka.php?wakka=ChecklinksActionInfo'>ChecklinksActionInfo</a></td><td><a href=''></a></td><td>Not Found</td><td align='right'>1</td></tr><tr><td>Wiki page</td><td><a href='./wikka.php?wakka=ChecklinksActionInfo'>ChecklinksActionInfo</a></td><td>NonExistentWikiPageLink</td><td>Page non-existent</td><td align='right'>1</td></tr></table>""
===To-do, bugs and limitations===
~- action does not check anchor-based links inside a page.
~- action does not handle relative HTTP redirections (e.g. Location: ../foo.php in the HTTP reply header).
~- execution time could be a limitation on a large wiki, especially when many external links are involved. Indeed, blocking socket calls are used, and neither multithreading nor parallelization speeds up the processing, so the performance of the external link checking engine is significantly lower than that of dedicated tools.

===Other considerations===
~- the 'non-existent Wiki page' feature is somehow redundant with the WantedPages action. In order to avoid a double counting of non-existent pages, the action ignores all [[ | | Wantedpages]] actions.
~- credit is given to steven (at) and to carinridge (at) for part of the external link checking code.

[[ | DomBonj]]

Valid XHTML :: Valid CSS: :: Powered by WikkaWiki