wiki:plugins_admin

Admin plugins

These plugins are available on the Admin page to perform various maintenance tasks. I've found them handy in wiki development as my protean plans shift to more mature forms, and what was done needs to be redone in wider form.

Advanced plugin page

This provides three main functions available on the Admin page under Additional Plugins: Advanced Configurations, Export Utility, and Import Utility.

This gives access via the wiki interface to many of the configuration files normally only reached from the back end. The present editor was long baffled by it though, since the Admin page button opens up a blank page. The functionality of it all is hidden in a dropdown menu resembling the normal wiki page Table of Contents at the right.

Not all are currently in use, but here are some remarks on those that are.

Configurations

This gives access to files in the /conf directory of the wiki. There is always a default file named like acronyms.conf, and it is best to leave these alone. A second file can be created, like acronyms.local.conf, to hold additional custom content. Of particular note are the following.

Button File Use
Abbreviations and Acronyms acronyms.local.conf This opens up a popup with a definition of an acronym when hovering over it. It has been pressed into service as a quick glossary of Hârnic terms. Due to the file format, only the first word can be used this way, so two-word terms like “Rion Ishar” glitch.
Entities entities.local.conf Not in use. This handles text replacements, like three hyphens in the editor resulting in an em dash on the page. While all the defaults are present, a notion of using this to add accents to Hârnic terms was abandoned.
Interwiki Links interwiki.local.conf This sets up interwiki links for wiki-style typing and—elsewhere in CSS—custom icons for some external links. An example wold be the link to the plugin page above, written [[doku>plugin:advanced]]. A handful have been added.
Smileys smileys.local.conf Add more of these: :-D. The Flumph has been stolen from the Dragonsfoot forum.
Template style.ini style.ini This links the CSS files used by the wiki and holds the color defaults modified with the Template Style Settings page.

CSS Styles

One way of tweaking the look of the wiki is with a file like those above, userstyle.css. This approach is not used in HârnWiki, which uses a customized template instead.

Template Hooks

This allows for HTML or PHP to be added to particular page locations, like the header, footer, etc. These have not been customized at the present time.

Others

This allows for adjusting the .htaccess files used by the internet thing to do internet stuff that the present editor does not understand.

This allows for exporting all or some of the wiki pages. Unfortunately, only the pages themselves are exported without any metadata, such as the original page creator.

Leaving the dropdown unchanged and displaying “Select the Namespace”, and ticking the Include sub-namespaces checkbox exports all of the pages.

This allows for importing pages arranged as the output of the Export Utility. The present editor has not been able to use this successfully, though that was some time ago and the plugin has been updated since.

BatchEdit plugin page

This plugin does wiki-wide find and replace for page text. It is located on the Admin page under Additional Plugins > BatchEdit.

Pressing that button opens up a straightforward find/replace page. Searching within a particular wiki namespace speeds it up considerably. The Search for and Replace with boxes work as one would expect: one can use plain text or regular expressions. Both boxes can be used in single- or multiline mode. The Edit summary box is used as in the usual page editor.

Press preview to check the replacements made. One can then check the box(es) for the desired places in which to apply the change. The top-level checkbox selects them everywhere, all instances on each page can be selected or each instance individually. Pressing Apply then performs the replacement.

There is a limit to how many replacements can be performed per search. The present editor has not yet found a setting for increasing or overriding this, which is probably for the best if sometimes annoying.

cleanup plugin page

This performs routine wiki maintenance by removing old files that are no longer needed. Things like all of the old cache files that really begin bloating up the size of the entire wiki. Yes, it's good to keep some of that and not trim too vigorously, but not everything need be retained.

This is found on the Admin page under Additional plugins > File Cleanup. Press the Preview affected files button to see everything that will be removed, and then hit the Delete affected files button at the bottom if the list looks OK.

At the moment, there is no set schedule for this. It is not run automatically, and none of the other default settings have yet been adjusted. Generally, as with most big wiki operations, it is recommended—nay, demanded, begged, pleaded—to mirror the live wiki onto a locally-stored copy before using this plugin to delete stuff.

LangDelete plugin

This plugin removes all of the language files that accumulate and bloat the size of the wiki. More of these are brought in with every update of the wiki and all of its plugins, so it's good to follow such updates with a fresh cleaning.

This operation is found on the Admin page under Additional plugins > Delete languages.

HârnWiki isn't currently interested in saving any but the default English files. Those are retained even if the en listing is removed from the input box, so a simple ctrl+A, Backspace is fine. Untick the simulate only checkbox and hit Start.

This is an old plugin, and development seems moribund. It is sensitive to the PHP version being used by the particular server installation. Not every version has been tried, but this is what has been found so far:

PHP version Result
7.4.1 Functions, but with lots of garbage on screen; Show Page button missing at the end.
7.4.30 Works fine.
7.4.33 Works fine.
8.2.1 Does not work. A proposed change could address the problem but has not been merged into the the master.

Move plugin page

Though listed among the Admin plugins, this does have one function open to all editors, that of renaming the current page and updating all links to it. This come in handy when one makes a mistake in naming a page or assigns it to the wrong namespace.

When this plugin is installed, an additional button is visible in the group under the Edit Page button at the right of the page. It looks like a paint roller.

move_button.jpg

Clicking that button opens a dialog where the editor can adjust the page's name.

The plugin is also available on the Administration page, under the “Additional Plugins” heading as “Move pages and namespaces”. Clicking that opens a page where either the current or current namespace can be renamed. Again, this adjusts all of the links elsewhere in the wiki that pointed to the old page(s).

A link there goes to a tree-based, drag-and-drop view of the whole wiki for even more involved reorganization. The current editor just noticed that for the first time while writing this. Huh.

RefNotes plugin page

This is the most recently-added plugin, and its uses are still being explored. The references dictionary upon which it relies has been implemented in the quickest, simplest way, but this may change.

The conventions for its use are still being developed as well. There too, what is presented here is subject to change. The upshot is that this is how works in the works: section of the wiki are cited from the harn: and other “World” sections.

The plugin is invoked with a syntax resembling that of standard DokuWiki footnotes. It looks something like this, taken from the page for Albernet Manor in Kaldor.

“Loral is the second eldest of Clan Ebor. Loral has a younger brother at Iversen. His older brother Minal will likely soon succeed his sickly father as Bailiff of Albernet.”[1]:p.14


The reference is made in this way.

"Loral is the second eldest of Clan Ebor. Loral has a younger brother at Iversen. His older brother Minal will likely soon succeed his sickly father as Bailiff of Albernet."[(:ref:abriel)]<sup>:p.14</sup>

Here we see a quotation from the work, Abriel Abbey in the main body of the page. following it is the relevant reference to the works: page from the dictionary, :ref:abriel, enclosed in brackets and parentheses, [()]. In the vast majority of cases, that reference name is simply :ref: followed by the base page name—without any namespaces—of the works: page.

Following that, since, in this usage, the plugin doesn't provide it, is a manual, superscripted page number following a colon, :p.14. The colon is there and there is no space after the period because reasons. A multi-page reference might look like :pp.14--5, with the two hyphens resolving to a suitable en dash.

Optionally, the location of the generated references can be defined with the ~~REFNOTES ref~~ command. By default, the plugin will put them at the bottom of the page, so this is often not necessary.

----
~~REFNOTES ref~~

A more detailed discussion of what can be done with the syntax can be found here.

Yeah, that's pretty clunky. It may change. Suggestions are welcome.

This is the general idea, however. A quotation, or a paraphrase, or some other datum drawn from a source is written in the main body of a page in the harn: section of the wiki, and a citation is made to a page in the works: section with a footnote linking it. The model in mind is something like Wikipedia, or even a term paper from school.

There is a more sophisticated way of using the plugin that does format page numbers, the Harvard engine. However, this requires that the references dictionary be redone. Doing so may yield other benefits (fingers crossed), but that has not yet been determined.

However, even if that all works, we would still have to abuse the data to get something better-suited to our own needs. The citation style that results is geared toward the papers of academic writing. For HârnWiki, citations such as “(Crossby, N. Robin, 1985)” or “(Mould, Kerry, 2005)” would obfuscate more than they reveal.

Use of this plugin threatens to force the resolution of a thorny issue, that of Composite Works. Many works are sold loose-leaf, and some comprise several separate articles, numbered individually. This allows people to organize their collections as they see fit, and thus Hârnic convention doesn't use a “p.” in a page number at all. Rather, the citation above would be given as “Abriel 14”, including the name of the article. This seems too long for superscript, however, and the name of the work is right there if one hovers the pointer over the reference.

To date, the wiki's handling of composite works is still inconsistent. Referring to them with this plugin means that even more composite works ought to be divided into their constituent articles with separate pages for each. In this way, “Pilot” p. 1 can be cited more readily than Pilot's Almanac p., um, 7? 5? 1?

Luckily, the several “World” sections of the wiki are slow-filling, so that resolution gets deferred. Hopefully, that will be done as the present editor's grand scheme to create a database from all the Hârn data and create all the pages in an automated fashion therefrom comes to fruition.

The References dictionary is currently the simplest implementation, a big, two-column table of reference names and text on one page. It was readily-enough generated by running a Python script ( zip download) on a local, offline copy of the wiki. The present editor does not recall if some additional, hand-done editing of it was still required or if that was solved programmatically, but there wasn't much needed.

This is not a very clean process for a live wiki, however. Subsequent additions to the works: section then need corresponding edits to this table. This isn't hard, but it's another thing to remember.

There are other ways of doing this. The most involved is maintaining a collection of pages for each reference that each contain a structured data element. This would (probably? maybe?) require one or the other of the Structured Data plugin or Struct plugin be employed.

This seems like even more work, but then we already have a namespace full of individual pages for each reference. It could be that the works: section itself could be made to serve this purpose as well as what it presently does. The advantage would be that it's much more natural to then include the necessary data while adding a new page. More work needs to be done to explore this possibility before anything more can be said.

Searchindex Manager plugin page This isn't necessarily required but it can be useful to rebuild the tag index should it be corrupted by moving pages or for other reasons. At least it seems to have worked; either it takes longer to fully function than I've given it or the feedback it gives is ambiguous.

upgrade plugin page

This plugin performs an update of the wiki to a new version when such is released. Admins can't help but know when there has been a new release as a warning alerting them is then displayed at the top of every wiki page when they are signed in.

Before running, it is a good practice to mirror the wiki onto a locally-stored copy as a backup. Also, check first for any new update to the plugin. If so, it may prevent problems after updating the plugin to then exit and re-enter the Admin page before running it.

The plugin is located under Additional Plugins > Wiki Upgrade on the Admin page and listed as “DokuWiki Upgrade Plugin” toward the end of the Extension Manager page.

It's simple to run, leading the admin through the steps of the process like a wizard.

  • wiki/plugins_admin.txt
  • Last modified: 2023/02/18 06:44
  • by suedunham