Orphans Plugin

Locate orphaned topics in TWiki webs
This Plugin assists in the management of topics within a TWiki web by locating orphaned topics (topics that have no parent, or their parent has been deleted).
Orphaned topics are displayed in a table, optionally with a reference count. Example:
| Action | Lost Topic | References | Referees |
| delete | JohnLocke | 4 | TheFaithless |
| delete | SayidJarrah | 8 | HugoReyes. FrenchChick |
| delete | KateAusten | 15 | JackShepherd, JamesSawyer |
| delete | WaltLloyd | 16 | MichaelDawson, TheLost |
| delete | MichaelDawson | 23 | TheOthers, TheIrritating |
| delete | JamesSawyer | 42 | TheHidden, TheOthers, TheFaithful |
Tools
The plugin is used from a page in the TWiki04x01 web,
ManageOrphanedPages? . Normally you should be able to get away with just this topic, though you can use the plugin from any topic in any web if you want to.
Syntax Rules
Write
%FINDORPHANS{ parameters }% anywhere in a topic.
Supported parameters:
| Parameter and Values | Description | Default |
web="..." | TWiki web to search | Current web "Plugins" |
allwebs="on" allwebs="off" | Searches in all public webs for references to topic when detecting orphans | "off" |
allrefs="on" allrefs="off" | Analyses count of references to each topic when searching for orphans, and includes them in the output table | "off" |
Example:
%FINDORPHANS{web="Myproject" allwebs="on" allrefs="off"}%
When the topic is viewed the Plugin will generate a table of topics in the selected web, with reference counts if you requested them, and an
action link that allows you to delete the topic directly (prompts you to move it to the Trash web).
Notes
- Before you can delete a topic, a final check for any topics that reference it is performed. If you searched in all webs, then the check also searches in all webs, but if you searched in the current web only, then only the current web is searched for confirmation. If you want to be absolutely sure that no useful references exist, always select allwebs.
- References from the WebStatistics topic are not counted.
Plugin Installation Instructions
You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server where TWiki is running.
Like many other TWiki extensions, this module is shipped with a fully automatic installer script written using the BuildContrib.
- If you have TWiki 4.1 or later, you can install from the
configure interface (Go to Plugins->Find More Extensions)
- The webserver user has to have permission to write to all areas of your installation for this to work.
- If you have a permanent connection to the internet, you are recommended to use the automatic installer script
- Just download the
OrphansPlugin_installer perl script and run it.
- Notes:
- The installer script will:
- Automatically resolve dependencies,
- Copy files into the right places in your local install (even if you have renamed data directories),
- check in new versions of any installed files that have existing RCS histories files in your existing install (such as topics).
- If the $TWIKI_PACKAGES environment variable is set to point to a directory, the installer will try to get archives from there. Otherwise it will try to download from twiki.org or cpan.org, as appropriate.
- (Developers only: the script will look for twikiplugins/OrphansPlugin/OrphansPlugin.tgz before downloading from TWiki.org)
- If you don't have a permanent connection, you can still use the automatic installer, by downloading all required TWiki archives to a local directory.
- Point the environment variable
$TWIKI_PACKAGES to this directory, and the installer script will look there first for required TWiki packages.
-
$TWIKI_PACKAGES is actually a path; you can list several directories separated by :
- If you are behind a firewall that blocks access to CPAN, you can pre-install the required CPAN libraries, as described at http://twiki.org/cgi-bin/view/TWiki/HowToInstallCpanModules
- If you don't want to use the installer script, or have problems on your platform (e.g. you don't have Perl 5.8), then you can still install manually:
- Download and unpack one of the
.zip or .tgz archives to a temporary directory.
- Manually copy the contents across to the relevant places in your TWiki installation.
- Check in any installed files that have existing
,v files in your existing install (take care not to lock the files when you check in)
- Manually edit LocalSite.cfg to set any configuration variables.
- Run
configure and enable the module, if it is a plugin.
- Repeat from step 1 for any missing dependencies.
- Test if the plugin is correctly installed by visiting the ManageOrphanedPages? topic, select a web and see if the table is expanded correctly.
Plugin Info
Another great TWiki extension from the
WikiRing - working together to improve your wiki experience!
Many thanks to the following sponsors for supporting this work:
Related Topics: TWikiPreferences,
TWikiPlugins