DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:jquotes

jQuotes Plugin

Compatible with DokuWiki

Greebo

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

This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.

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

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki