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.
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.
Further box plugin examples can be found in the preceding link.
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:
Blah blah blah
<code|Title goes here> Blah blah blah </code>
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 */
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.
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:
namespace:pagename#sectionname
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):
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.
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.
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. | ++++
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:
|
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 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
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>
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 ====
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>.
The IFrame plugin allows you to load an external URL into an iframe in a wiki page.
Example:
CLL 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.
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
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).
<math>x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}</math>
Will yield: <math>x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}</math>
<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>
<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.
This plugin allows you to create nice-looking notes in the wiki.
Examples:
<note [warning|important|tip]> Your note goes here. </note>
In your <note> tag, you can optionally include one of warning, important, or tip.
<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>
This plugin offers several tags to provide additional formatting for text.
You can also specify attributes for each formatted block:
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:
</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>
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.
{{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.
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 ^ ^