Plugins

This page serves as a demonstration of the various plugins added to the wiki to extend its functionality. The examples shown below include the required syntax.




Box

More flexible than the <code> </code> and <file> </file> markup, the <box> </box> tags can let you create plain square boxes, boxes with rounded corners, in different colours, with floating positions, titles, and captions. The best part: some DokuWiki markup is permitted inside the box.

The full syntax:

<box width classes | title text> contents text </box| caption text>

; //classes// : any number of classes which use the styles in your template or the plugin's own stylesheet to determine the look of the box. The box plugins comes with the following classes already defined:
  * //round//  --- box will have rounded corners
  * //blue// --- blue colour scheme
  * //red// --- red colour scheme
  * //green// --- green colour scheme
  * //orange// --- orange colour scheme
  * //left// --- box is floated left on the page
  * //right// --- box is floated right on the page
; //width// : any legal CSS length value.
; //title text// : text (including dokuwiki markup) displayed as a title above box contents.
; //caption text// : text (without dokuwiki markup) displayed as a caption below box contents.


width & classes can be specified in any order.

caption

Further box plugin examples can be found in the preceding link.


Code

The code plugin is an updated handler for the <code> </code> and <file> </file> markup. It adds the ability to recognize and render a title above the code box. You cannot nest the <code> </code> and <file> </file> tags themselves but you can nest the <code> </code> tags inside the <file> </file> tags and vice-versa. “File” boxes are used below to show the syntax.

Here is a regular code box:

Blah blah blah
<code>
Blah blah blah
</code>

Here is the new code box:

goes here
Blah blah blah
<code|Title goes here>
Blah blah blah
</code>


Comment

You can create comments that are hidden from normal view. This means you can add comments or notes in the wiki source that won't show up in the page itself. The syntax follows C language-style comments.

/* This is a sample hidden comment */


Definition Lists

You can create definition lists like the one below, following the code example below.

; DL_DT
: default value ";"
: the character used to indicate a definition list term.
; DL_DD
: default value ":"
: the character used to indicate a definition list definition.
; DL_FANCY
: default value "true"
: if set to false the plugin will generate pure definition list mark up only.
: if set to true the plugin will generate extra html to enable improved styling of the list. If used with the styles provided this will result in a two column list, with terms on the left, definitions on the right and each definition lining up with its corresponding term.
  ; DL_DT
  : default value ";"
  : the character used to indicate a definition list term.
  ; DL_DD
  : default value ":"
  : the character used to indicate a definition list definition.
  ; DL_FANCY
  : default value "true"
  : if set to false the plugin will generate pure definition list mark up only.
  : if set to true the plugin will generate extra html to enable improved styling of the list. If used with the styles provided this will result in a two column list, with terms on the left, definitions on the right and each definition lining up with its corresponding term.


Explain

The explain plugin is used to define/explain a term in the wiki. Essentially, a “tooltip” (pop-up text appearing when hovering) can appear with a definition, and the term can also be hyperlinked to a page/section within the wiki, or to an external URL.

To create a new explanation, edit the explanations page. There should be one explanation per line, and each field is comma-delimited (therefore, spaces are permitted). Follow the syntax below:

term to be defined,short explanation (up to 80 characters),URL

Formatting for the URL should be as follows:

Link
namespace:pagename#sectionname
URL
http://www.example.com/example.html

To see the effect on an existing wiki page after adding a new term, you need to force a recaching of that page by adding the purge parameter to the page URL (Note: only need to do this once for any existing page):

Caching for An Existing Page
http://wiki.mcmaster.ca/mywiki/wikipage?purge=true
                                       ^^^^^^^^^^^   <- Browse this page, add "?purge=true" in the address bar and press Enter

Example: I advise you to carpe diem, as it is wise to take advantage of any opportunity that presents itself.


Flash Media Player

This plugin is a Flash-based media player that can not only play Flash files (SWF, FLV), but can also play MP3s, H.264-encoded video, display picture slideshows, and more. It is fairly customizable through Flash variables that you can control.

Here is an example with a Flash animation:
<flashplayer width=296 height=234>file=http://www.ltrc.mcmaster.ca/mainnew.swf&showdigits=false</flashplayer>

<flashplayer width=296 height=234>file=http://www.ltrc.mcmaster.ca/mainnew.swf&showdigits=false</flashplayer>

Another example, with an MP3:
<flashplayer width=128 height=128>file=http://wiki.mcmaster.ca/media/sound1.mp3&image=http://wiki.mcmaster.ca/media/logo.png&showicons=false</flashplayer>

<flashplayer width=128 height=128>file=http://wiki.mcmaster.ca/media/sound1.mp3&image=http://wiki.mcmaster.ca/media/logo.png&showicons=false</flashplayer>

It seems that only absolute URLs are supported at this time. For information on the supported Flash variables, please see the Flash Player README.


Folded Text

If you want to make additional information availaible that is hidden by default, you have two options with this plugin.

Inline:
This is example ++text| with some of it only shown when you unfold it++. After that, the text continues to flow in the same paragraph.

This is example ++text| with some of it only shown when you unfold it++.
After that, the text continues to flow in the same paragraph.

Block:

This is example text.

++++ Click to reveal table |

This table is only shown when you unfold the block.
This table is only shown when you unfold the block.
This table is only shown when you unfold the block.

++++

This is example text.
++++ Click to reveal table |
| This table | is only shown | when you unfold the block. |
| This table | is only shown | when you unfold the block. |
| This table | is only shown | when you unfold the block. |
++++


Google Calendar

It is possible to embed a Google Calendar into the wiki. This can be a personal calendar or a group calendar. The syntax is as follows:

{{cal>bob@gmail.com[614,640]|Bob's Calendar}}

You will need to supply:

  • An e-mail address with a shared or group calendar.
  • Optionally, supply the width and height for the embedded calendar. [614,640] are width and height; these are both optional, but must be enclosed in [ , ] if present. If only one value is supplied, it is assumed to be the height.
  • The pipe character | allows you to change the display name (otherwise, the default configured in Google will be used).

If you have several Google Calendars and need to specify a particular one, you need the calendar ID. While logged into Google Calendar, click on “Manage calendars” at the left. Then, click on the calendar you want to share. In the “Calendar Address” box you should see the calendar ID. This is what you should use instead of a “real” e-mail address.

Sample Embedded Google Calendar


Google Maps

Google Maps Syntax

<googlemap parameter="value" parameter="value">
lat,lon,text
lat,lon,text
</googlemap>

The lines of “lat,lon,text” represent the individual overlay markers. Each marker must have its own line and be the only information on that line. “lat” and “lon” are the latitude and longtitude of the marker. “text” is the text to be displayed in the popup when the marker is clicked. The text can include wiki markup.

Google Maps Parameters

  • width — 999px (e.g. 500px) width of the google map, default is 400px.
  • height — 999px (e.g. 500px) height of the google map, default is 300px.
  • type — values: map | satellite | hybrid. default map.
  • lat — values: -90.0 - 90.0; latitude of map centre, negative values are south.
  • lon — values: -180.0 - 180.0; longtitude of map centre, negative values are west.
  • zoom — integer, zoom level, default value 8. Valid values depend on the map and location.
  • controls — values on | off. default on. Whether or not to show controls for zooming and panning on the map.

The parameters can be in any order.

Google Maps Example

<googlemap width="400px" height="400px" zoom="15" controls="on" lat="43.261956181120176" lon="-79.91974353790283">
43.261956181120176,-79.91974353790283,McMaster University
</googlemap>

<googlemap width=“400px” height=“400px” zoom=“15” controls=“on” lat=“43.261956181120176” lon=“-79.91974353790283”> 43.261956181120176,-79.91974353790283,McMaster University </googlemap>


Headers (numbered)

This plugin adds numbered headings without changing the behaviour of standard headings. To use the plugin, add a hyphen between the last “=” and the actual heading. Headings will then be numbered (e.g. 1, 1.1, 1.1.1, 1.1.2, 1.2, 1.2.1) and will show up in the Table of Contents, appropriately indented.

====== - Level 1 Headline ======
===== - Level 2 Headline =====
==== - Level 3 Headline ====
==== - Level 3 Headline ====
===== - Level 2 Headline =====
==== - Level 3 Headline ====


Highlight

You can highlight text using this plugin. Colours can be specified using the HTML colour name, as a hex number, as a decimal number (such as 'rgb(255,0,0)'), or as a percentage RGB number (such as 'rgb(100%,0%,0%)'). The default colour is bright yellow. Depending on your web browser/platform, you may also see a highlight button in the wiki editor that when clicked, displays a colour palette. Selecting a colour from the palette will insert the appropriate markup for you.

This is an <hi #00ff00>example</hi> of some <hi orange>highlighted</hi> <hi>text</hi>.

<hi #00ff00>example</hi> of some <hi orange>highlighted</hi> <hi>text</hi>.


IFrame

The IFrame plugin allows you to load an external URL into an iframe in a wiki page.

Example:
Google Canada Homepage

Syntax:

{{url>http://www.example.com/example.html [ width% , heightpx ] | alternate-text }}

The width should be specified as a percentage of the wiki page's width (e.g. 98%, the default), and the height should be specified in pixels (e.g. 400px, the default). Note that the width and height specifiers are optional.


Include

This plugin allows you to include one wiki page inside another.

 * {{page>page}} for "page" in same namespace
 * {{page>:page}} for "page" in top namespace
 * {{page>namespace:page}} for "page" in namespace "namespace"
 * {{page>.namespace:page}} for "page" in subnamespace "namespace"
 * {{page>page#section}} for a section of "page"

Examples:
start include navigation end include

Inside a box


Math

This plugin allows you to enter mathematical formulae in TeX format so that they are rendered properly. An image is generated by a script to display a formula.

TeX can be intimidating at first, but once you learn the syntax, it is a very powerful way to express formulae using proper notation. You can visit the mimeTeX web site to see some examples of TeX syntax for formulae, and there is also a link to a LaTeX tutorial showing you the basics of TeX markup (and many examples).

1 Syntax
<math>x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}</math>

Will yield: <math>x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}</math>

2 Syntax
<math>\color{blue}\Large e^x=\sum_{n=0}^\infty\frac{x^n}{n!}</math>

Will yield: <math>\color{blue}\Large e^x=\sum_{n=0}^\infty\frac{x^n}{n!}</math>

3 Syntax
<math>y=\left\{x/2\text{ if x even}\\(x+1)/2\text{ if odd}\right.</math>

Will yield: <math>y=\left\{x/2\text{ if x even}\\(x+1)/2\text{ if odd}\right.</math>

Essentially, you place the TeX markup in between opening <math> and closing </math> tags and it will be rendered properly. Note that you do not need to specify the <img src=“/cgi-bin/mimetex.cgi?[TeX goes here]”> tag and parameters for the math plugin to work.


Note

This plugin allows you to create nice-looking notes in the wiki.

Examples:

This is a regular note.

This is a warning!

This is important to know.

This is a tip to remember.

<note [warning|important|tip]>
Your note goes here.
</note>

In your <note> tag, you can optionally include one of warning, important, or tip.


Poll

<userpoll FavouriteColour>

What is your favourite colour from the additive colour system?
* Red
* Green
* Blue

</userpoll>

<userpoll [UniqueName]>
  Question?
  * Option 1
  * Option 2
  * Option 3
</userpoll>


Styler

This plugin offers several tags to provide additional formatting for text.

  • <quote> - the expanded quotations
  • <epigraph> - an epigraph or quotation
  • <verse> - formatting of verses
  • <style> - generic style text blocks

You can also specify attributes for each formatted block:

  • left - align text to left
  • right - align text to right
  • center - align text to center
  • justify - justify text
  • float-left - create the floating block to the left of the text
  • float-right - create the floating block to the right of the text
  • box - draw a framework around of the block
  • background - fill in a background with a solid colour

Examples

<epigraph> “Anything that can go wrong, will.” – Murphy's Law </epigraph>

<epigraph>
"Anything that can go wrong, will." -- [[http://www.google.ca/search?hl=en&q=murphy%27s+law|Murphy's Law]]
</epigraph>

<style center>To center text in the wiki page.</style>

<style center>**To center text in the wiki page.**</style>

<style float-right box background> To place text on the right in a floating block with a background and border. </style>

<style float-right box background>
To place text on the right in a floating block with a background and border.
</style>

<quote> With the quote tag, you can:

  • Use lists
  • Use formatting
  • Use pictures
  • And more

</quote>

<quote>
With the quote tag, you can:
  * Use lists
  * Use **formatting**
  * Use pictures {{http://wiki.mcmaster.ca/media/button-rss.png}}
  * And more
</quote>


Tags

Specify the name of the tag. The default namespace for tag pages is “tags:” (this is implicit and assumed when creating tag pages). The intention is that these pages will be organized under the “tags:” namespace and will not clutter up the “wiki:” or root namespaces that contain actual content.

syntax used at the very bottom of this page
{{tag>folded tag plugin}}

Clicking on a new tag name at the bottom will bring you to a new, uncreated topic page. Create the page and then add the list of all pages containing that tag. To do this, include the following.

====== Pages using the tag "[tagname]" ======
{{topic>[tagname]}}

where [tagname] is to be replaced by the name of the actual tag. This automatically creates a table with the list of pages containing that tag.


YouTube

You can embed a YouTube video into a wiki page with this plugin.

{{youtube>[link|small|large]:[video ID]}}

To align the movie object, put whitespace before or after brackets.

{{youtube>small:mRGQcYFZea8}}    -> Default is left
 
{{youtube>small:mRGQcYFZea8 }}   -> Align to left
                           ^
{{ youtube>small:mRGQcYFZea8}}   -> Align to right
  ^
{{ youtube>small:mRGQcYFZea8 }}  -> Centering
  ^                         ^


tag_folded_tag_plugin

Print/export
QR Code
QR Code wiki:plugin_help (generated for current page)