DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:orphanswanted

OrphansWanted Plugin

Compatible with DokuWiki

  • 2016-06-26 "Elenor Of Tsort" unknown
  • 2015-08-10 "Detritus" yes
  • 2014-09-29 "Hrun" yes
  • 2014-05-05 "Ponder Stibbons" yes

plugin Find Orphan pages, Wanted pages with reference counts. Also shows reference counts for linked pages (previous authors: Doug Edmunds)

Last updated on
2016-07-05
Provides
Syntax
Repository
Source

Originally by Doug Edmunds.

Description

Use this plugin to find orphan pages and wanted pages.

OrphansWanted show which pages are:

  • Orphans (the page exists, but it has no links to it)
  • Wanted (the page does not exist, but there are link(s) to it elsewhere on the site)
  • Valid (the page exists, and it can be reached through a link)

Each table shows the reference count and a link to backlinks.

Usage

Basic usage is to place one of the following four lines into the page markup:

 ~~ORPHANSWANTED:orphans~~
 ~~ORPHANSWANTED:wanted~~
 ~~ORPHANSWANTED:valid~~    
 ~~ORPHANSWANTED:all~~      << makes all three tables 

Anything other than these 4 words will generate a syntax error message.

Enhanced usage excludes some namespaces, each prefixed with an exclamation point '!' (think 'not')

~~ORPHANSWANTED:orphans|wanted|valid|all[!namespace!another!one:with:subspaces]~~

Example – exclude one namespace:
Shows wanted pages, but none that are under the wiki: namespace

~~ORPHANSWANTED:wanted!wiki~~   

Example – exclude multiple namespaces:
Shows orphan pages, but none in the wiki: or in the sys:personal: namespaces

~~ORPHANSWANTED:orphans!wiki!sys:personal~~  

Version/Requirements

:!: Please check GitHub for most recent version; and please comment on the GitHub version using GitHub 'issues' mechanism. Comments and issues below apply to the code included on the page below.

Changes

Notes

  • I strongly suggest you put ~~NOCACHE~~ on the page where this plugin is used. This helps assure that ACL permissions get applied. Otherwise some other user, with lesser ACL permissions, may see a cached copy of the results.
  • ACL settings are applied first, before any exclusions. Only pages you have permission to view can be listed. To be sure to see everything, login as superuser.
  • Reference counts (number of links) may include pages that cannot be viewed due to ACL settings.
  • It is fast enough for a site with 200+ short pages.
  • If you see something that you think must have a link, check your spelling. If you typed the pagename wrong on the other page, you created a “wanted” page instead of a link to an existing page.
  • Try fixing bad links one by one after you figure out what is wrong. Do this until your orphan/wanted lists are as clean as you need.

Feature Requests

  • It would be nice to be able to sort the list by their namespaces, names or titles instead of only by their backlinks → This can be achieved with plugin sortablejs with Tablesorter.
  • It would be nice to have an option to limit the number of output lines or to only print wanted pages that are requested multiple times.
  • Would it be a big functionality change to add the ability to list broken external links too? I haven't been able to find a plugin that does this yet.

Discussion and Bugs

Please raise bugs and requests for enhancements in GitHub. This page is not routinely monitored, so comments here may languish forever.

Compatibility

Weatherwax

I've just installed and tested the Orphanswanted Plugin in my dokuwiki running Weatherwax. Works like a charm, no display issues between Firefox 21.0 and IE 8.0 (don't laugh at me). - Steve

Detritus

I confirm that it works wonderfully in dokuwiki Detritus (just tried firefox) — arimanePsiconauti Wiki
arimane

2015-11-23 04:56

Verbose?

I've had this installed before, and didn't have this appear, but after changing permissions to get the plugin to work in a different installment, I'm noticing all of this:

  1. – Checking law:intro
  2. — link='law:intro' MISS A_LINK
  3. - New count for link law:intro: 25
  1. – Checking law:help
  2. — link='law:help' EXISTS A_LINK
  3. - New count for link law:help: 26

Is there any way to prevent this from appearing? -Kendra

plugin/orphanswanted.txt · Last modified: 2016-07-05 20:09 by 2003:5a:ef17:b800:5530:d085:c722:4c4a