xbFootnoteTag Package
Intro Page Demo Page

The xbFootnoteTag package consists of two plugins:

  • xbFootnoteTagBtn is an 'editors-xtd' plugin which provides a button to quickly select the parameters for the {xbref...} shortcode and insert it in the text.
  • xbFootnoteTagCon is a 'content' plugin which converts the shortcode into the appropriate display when the full article is being displayed; when it is not the full article display the shortcode is simply stripped out so, for example, footnotes do not get added to a category view displaying only the intro text for each article.

Use Cases

  1. Add references (or other ancillary information eg definitions, weblinks, thumbnails) to an article as footnotes, especially where the same work may be referenced in more than one place (within one article or across articles).
  2. Provide facility for simple text only footnote insertion.
  3. Provide both printable (footnote) and web-convenient (popover) access to ancillary information.
  4. Allow cross referencing between articles by reference and site index of referencing. (uses standard tag list views which can be enhanced)
  5.  Import references from external sources - eg in BibTex format. (not yet implemented, will be back-end component function)

General Considerations

The two plugins are interdependent. In particular the button will not work if the content plugin is not installed and enabled. Some of the parameters used by the button are shared with the content plugin and are set on the content plugin options page. To uninstall one or other you must uninstall the whole package - this will leave any {xbref...} shortcodes as orphans that will be  visible on the front end article display.

You can of course simply disable the button so that it is no longer available in the editor and any existing shortcodes will be handled correctly by the content plugin. You can also add shortcodes manually - see below for format.

The tags used for display must exist before you can insert them as a footnote or popover in an article - this does mean you have to plan ahead a bit and can't simply create references 'on the fly' as you write an article. My workflow is to compose the article making notes of any new citations or definitions needed and then create all of the required tags before revisiting the article to insert the footnotes.

The {xbref...} Shortcode

content
  • 'tag' is the id of the tag to use chosen from a list specified in the button plugin settings,
  • If 'tag="0"' the 'title' and 'desctext' options must be included.
  • 'addtag="1" will cause the tag to be added to the article tags,
  • 'addtext' is optional additional text to be appended to the tag description,
  • 'disp' specifies whether to use a popover or footnote or both to show the tag contents,
  • 'poppos' will set the position to display a popover with respect to the pointer,
  • 'flink' specifies whether to link to a footnote with a sequence number (starting at 1 for the first footnote on the page) or using the Title of the tag (eg "Brown and Smith, 2019")
  • 'content' is any text that was selected when the shortcode was created using xbFootnoteTag-Button. It will be used as the popover trigger. If no text is selected then and appropriate link will simply be inserted - a superscript sequence number for a footnote and the title text to link a popover.
Only 'tag=' is required, other settings will use defaults on this plugin's main tab

The Button Plugin

 xbFootnoteTag-Button works with both TinyMCE and JCE editors. Note that extension buttons in JCE is annoyingly displayed below the editing area, not with the standard toolbar buttons.

The  Content Plugin

 

Development Notes

Use of highlight to flag or hide presence of shortcode in the editor WYSIWYG view