DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:xtern

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:xtern [2019-02-17 16:37] – [Utilities for checking and correcting broken links] turnermmplugin:xtern [2024-01-18 10:21] (current) Aleksandr
Line 2: Line 2:
    
 ---- plugin ---- ---- plugin ----
-description: Checks external links for connection errors+description: Checks external links for connection errors, with tools for fixing them
 author     : Myron Turner  author     : Myron Turner 
 email      : turnermm02@shaw.ca  email      : turnermm02@shaw.ca 
 type       : action type       : action
-lastupdate : 2019-02-17 +lastupdate : 2022-02-14 
-compatible : Detritus,"Elenor of Tsort","Frusterick Manners",Greebo+compatible : Detritus, Elenor of Tsort, Frusterick Manners, Greebo, Hogfather, Igor, Jack Jackrum
 depends    :  depends    : 
 conflicts  conflicts 
 similar    :  similar    : 
-tags       : links,icons+tags       : links
  
 downloadurl: https://github.com/turnermm/xtern/archive/master.zip downloadurl: https://github.com/turnermm/xtern/archive/master.zip
Line 40: Line 40:
 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.  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. 
 {{  https://i.imgur.com/iPsu6qZ.png?310 }} {{  https://i.imgur.com/iPsu6qZ.png?310 }}
-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.+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 === === HTTP Status codes 4xx ===
Line 60: Line 60:
  
 === Editing Broken Links === === Editing Broken Links ===
 +**Note:**  To use this feature, you must first run the ''xtern'' admin app from the Admin page.  It uses the database created by the app. This database should be kept current for this feature to work optimally.
 + 
 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: 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 __   __ 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.       When the ''Preview'' button is clicked these will show up as underlined.      
-{{  https://i.imgur.com/AqsjZ8e.png?272  }}     +{{  https://i.imgur.com/AqsjZ8e.png?272  }}   
-Keep in mind that this is a preview.  Anything that is not saved will disappear from the page. In order to save the broken link markup, Dokuwiki requires an actual manual text entry.  This can be as small as a few extra line-feeds.+Keep in mind that this is a preview.  To keep the broken link markup in your pageclick the ''Save'' button; to discard, click ''Cancel''.
  
-By default, the __BROKEN-LINK: . . . LINK-BROKEN__ markup will be hidden from general viewing if it has been saved to the file, and there will be no underlining. This can be changed by setting the ''conceal'' configuration option to false. The broken link icon is not affected by this setting; it will continue to display until the link is fixed.+You can also open pages from the the links in the admin panel. The page will open in a new tab or window with the broken link markup in place.   
 + 
 +== Displaying Broken Link Markup == 
 + 
 +By default, the __BROKEN-LINK: . . . LINK-BROKEN__ markup will be hidden from general viewing if it has been saved to the file, and there will be no underlining. Though it is in the page text, it will be displayed in the browser only in the preview mode. This can be changed by setting the ''conceal'' configuration option to false, in which case the broken link markup will display whenever the page is loaded into the browser. The broken link icon is not affected by this setting; it will continue to display until the link is fixed. 
 + 
 +You can also use the ''skip_pages'' option to conceal the broken link icons on a per page basis.  
 +==== No Icons ==== 
 +It is possible to use this plugin without displaying its icons for broken, valid, and status 400 links.  To do this, set the ''noicons'' option to ''true'' This does not affect the ''check link'' features of the Administration panel or the __BROKEN-LINK:. . .LINK-BROKEN__ markup. 
 + 
 ===== Configuration Options ===== ===== Configuration Options =====
  
Line 72: Line 83:
 |ca_required|This wiki uses a cacerts.pem file installed in the ''xtern/ca'' directory. See [[#external_requirements]]|''false''| |ca_required|This wiki uses a cacerts.pem file installed in the ''xtern/ca'' directory. See [[#external_requirements]]|''false''|
 |max_time|Time in seconds to allow for broken link checking in the admin panel. See [[#admin_panel]]|120| |max_time|Time in seconds to allow for broken link checking in the admin panel. See [[#admin_panel]]|120|
-|conceal|Display ''BROKEN-LINK'' markup in preview mode only; hide it for general viewing of pages.|''true''|+|[[#displaying_broken_link_markup|conceal]]|Display ''BROKEN-LINK'' markup in preview mode only; hide it for general viewing of pages.|''true''| 
 +|[[#no_icons|noicons]]|Do not display the xtern plugin's link icons in the browser.  This does not affect the link checking features of the admin panel.|''false''
 +|alt_div|Some templates do not use the default id to identify the div which holds the page content; if yours is one of these, enter the div id here| | 
 +|alt_class|Some templates identify the div which holds the page content by a class name; if yours is one of these, enter the class name here| | 
 +|skip_pages|A comma separated list of pages where you want the xtern link icons to be suppressed.  | | 
 + 
  
 ===== Discussion ===== ===== Discussion =====
plugin/xtern.1550417825.txt.gz · Last modified: 2019-02-17 16:37 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