Wiki source for ChecklinksActionInfo


Show raw source

=====Checklinks Action Documentation=====
//Not included in official Wikka version//

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

==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.

==Parameters==
""<table cellspacing="0" cellpadding="2" border="1">
<thead>
<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>
</thead>
<tbody>
<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>
</tbody>
</table>""
==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.

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

===Example===
Let's create on purpose on this page a NonExistentWikiPageLink, a ""<a href='http://www.nonexistentdomain.org/foo.htm'>non-existent external link</a> and a <a href='file://./files/nonexistentfile.abc'>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/nonexistentfile.abc'>./files/nonexistentfile.abc</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='http://www.nonexistentdomain.org/foo.htm'>http://www.nonexistentdomain.org/foo.htm</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 [[http://wikkawiki.org/WantedpagesActionInfo | Wantedpages]] actions.
~- credit is given to steven (at) haryan.to and to carinridge (at) hotmail.com for part of the external link checking code.

==Author==
DomBonj

----
CategoryDocumentation
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki