AddFootnote

Summary: Insert markup to create a footnote
Version: 2017-11-06
Prerequisites: $EnableGUIButtons, a recipe that allows footnotes, such as Cookbook:Footnotes or Cookbook:MarkupExtensions
Status: Beta
Maintainer: RandyB
License: GPL2+
Users: +2 (view / edit)
Discussion: AddFootnote-Talk

Questions answered by this recipe

Q. How do I provide an easy way for authors to create a footnote?

All sections are optional, you can remove those that do not apply to your recipe, and add new ones.

Description

A GUI edit button to transform selected text into a footnote.

Installation

  • Make sure you have set $EnableGUIButtons = 1; in your configuration file (you will see GUI buttons at the top of your edit form)
  • Make sure you are able to put footnotes on your page using markup such as: [^Footnote^] (You will need to install a recipe such as Cookbook:Footnotes, and put markup on the page such as [^#^] where you want to display the footnotes.
  • Copy addfootnote.phpΔ to your cookbook directory. (Note: the file should not end immediately after the final semi-colon - append a blank line if necessary.)
  • Copy the button picture fileΔ to your pmwiki/pub/guiedit directory.
  • Add to your configuration file a line such as:
include_once("$FarmD/cookbook/addfootnote.php");

Usage

1. Select the text that you want to be in the footnote. For example:

This is my footnote

2. Then click the button above your edit box:
3. The source will now show:

[^This is my footnote^]

4. When the page is shown, you will see a link to the footnote, and the footnote's content will appear wherever you put the markup to display footnotes.

Notes

  • If nothing is selected, the button adds sample markup wherever the cursor is.

Change log / Release notes

  • 2017-11-06 - simplified and updated to work with latest pmwiki —Said Achmiz November 06, 2017, at 03:04 PM
  • 20150802 - first public release, ready to be tested.

If the recipe has multiple releases, then release notes can be placed here. Note that it's often easier for people to work with "release dates" instead of "version numbers".

See also

Contributors

Recipe written by RandyB

Comments

See discussion at AddFootnote-Talk

User notes +2: If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.