DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:jquotes

jQuotes Plugin

Compatible with DokuWiki

  • 2018-04-22 "Greebo" yes
  • 2017-02-19 "Frusterick Manners" unknown
  • 2016-06-26 "Elenor Of Tsort" unknown
  • 2015-08-10 "Detritus" unknown

plugin Display a random quotation and update it every few seconds with a new one.

Last updated on
2020-05-12
Provides
Syntax
Repository
Source

Similar to fortune, xfortune

Tagged with ajax, quotes, random

This plugin reads JSON datafiles and displays a random quotation.
The quotation is refreshed every user configurable seconds with a new one using an AJAX request.
Click on quotation to copy it to the clipboard.

Download

Download and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.

Changes

Usage

Just reference a JSON textfile in the correct format with the following syntax:

{{jquotes>namespace:cookiefile.json}}

You may specify the interval for changing the cookie in seconds:

{{jquotes>namespace:cookiefile.json?15}}

The default is 30 seconds - minimum is 5 seconds.

Input files

:!: I chose this file format as it is fully compatible with Android Quotes Widget, which I like to use.

The quotations file needs to be a JSON textfile (ex. myquotes.json) uploaded through the mediamanager.

Here is an example:

{"quotes": [
  {
     "quote":"Quote1"
    ,"author":"Author1"
  },
  {
     "quote":"Quote2"
    ,"author":"Author2"
  }
]}

Some populated example files can be found at: Quotes-Widget-Data-Files

Known Shortcomings

  • Input files should be UTF-8 encoded.
plugin/jquotes.txt · Last modified: 2020-05-13 02:31 by trailjeep