Loading...
 
Skip to main content

History: Simple_Reference_Management

Source of version: 17 (current)

Copy to clipboard
            This profile intends to provide basic reference management inside the wiki. Each reference is stored as a tracker item and they can be referred to by using a custom wiki plugin. The reference is displayed as a number on the page and on click, displays a pop-up with the full reference name and a link to details.

Related: ((Footnotes_references_discussion))


!Tracker
Contains the reference name and link.

{CODE(caption=>YAML, wrap=1)}
objects:
 -
  type: tracker
  ref: references
  data:
   name: References
   description: List of available references from the wiki pages
   default_status: open
 -
  type: tracker_field
  ref: ref_label
  data:
   name: Name
   tracker: $references
   description: Name to display for the reference when reference is clicked
   type: text_field
   visible: public
   flags: [ list, link, searchable, public, mandatory ]
 -
  type: tracker_field
  ref: ref_url
  data:
   name: URL
   tracker: $references
   description: Location to link to
   type: text_field
   visible: public
   flags: [ list, link, searchable, public, mandatory ]
{CODE}

!Plugin
To be called as ~np~ {ref id=2} ~/np~.

{CODE(caption=>YAML, wrap=1)}
objects:
 -
  type: plugin_alias
  data:
   name: ref
   implementation: mouseover
   description:
    name: Reference
    description: Displays a link to a reference as a number and display details in a pop-up
    prefs: [ wikiplugin_ref ]
    params:
     id:
      name: ID
      description: Tracker ID to the reference
      filter: digits
      required: true
   body:
    input: ignore
    default: "{trackeritemfield trackerId=$profileobject:references$ itemId=%id% fieldId=$profileobject:ref_label$}"
    params:
     id:0
   params:
    sticky: y
    width: 300
    height: 20
    label:
     pattern: %id%
     params:
      id: 0
{CODE}

!Dependencies
{CODE(caption=>YAML, wrap=1)}
preferences:
 enable: [ feature_trackers, wikiplugin_ref ]
{CODE}


! Sample data

{CODE(caption=>YAML,wrap=>1)}
objects:
 -
  type: tracker_item
  ref: ref_001
  data:
   tracker: $references
   values:
    - [ $ref_label, Wikipedia ]
    - [ $ref_url, http://wikipedia.org/ ]
 -
  type: tracker_item
  ref: ref_002
  data:
   tracker: $references
   values:
    - [ $ref_label, Wiktionary ]
    - [ $ref_url, http://wiktionary.org/ ]
{CODE}

includes: ((reference_include))

{CODE(caption=>YAML)}
instructions: reference_include
preferences:
  enable: [ feature_wiki ]
objects:
  -
    type: wiki_page
    ref:  reference_include
    data:
      name: reference_include
      description: Check out these references
      content: wikicontent:reference_include
{CODE}


!Todo
*Click should take you to URL of reference
*Make sure mouse-over is nice
*rename to Reference_Management
*fix so it becomes ok when not a clean install, but with other trackers
*There should be two optional fields (one private and public) which are notes about the link to the reference. This could be used to indicate who checked the reference, the page number, etc.