====== 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 %% and %% markup, the %% %% 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. ''**%%** contents 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. \\ ===== Code ===== The code plugin is an updated handler for the %% and %% markup. It adds the ability to recognize and render a title above the code box. You **cannot** nest the %% and %% tags themselves but you **can** nest the %% tags inside the %% tags and vice-versa. "File" boxes are used below to show the syntax. Here is a regular code box: Blah blah blah Blah blah blah Here is the new code box: Blah blah blah Blah blah blah \\ ===== 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 */ /* 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 [[:explain|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. \\ ===== 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:\\ file=http://www.ltrc.mcmaster.ca/mainnew.swf&showdigits=false file=http://www.ltrc.mcmaster.ca/mainnew.swf&showdigits=false Another example, with an MP3:\\ file=http://wiki.mcmaster.ca/media/sound1.mp3&image=http://wiki.mcmaster.ca/media/logo.png&showicons=false file=http://wiki.mcmaster.ca/media/sound1.mp3&image=http://wiki.mcmaster.ca/media/logo.png&showicons=false It seems that only absolute URLs are supported at this time. For information on the supported Flash variables, please see the [[http://wiki.mcmaster.ca/media/flashreadme.html|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. {{cal>whfbc.monitor@gmail.com[614,640]|Sample Embedded Google Calendar}} \\ ===== Google Maps ===== **Google Maps Syntax** lat,lon,text lat,lon,text 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** 43.261956181120176,-79.91974353790283,McMaster University 43.261956181120176,-79.91974353790283,McMaster University \\ ===== 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 example of some highlighted text. example of some highlighted text. \\ ===== IFrame ===== The IFrame plugin allows you to load an external URL into an iframe in a wiki page. Example:\\ {{url>http://www.ltrc.mcmaster.ca/ [ 100% , 400px ] | 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** {{page>wiki:navigation}} **end include** {{page>wiki:navigation}} \\ ===== 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 [[http://www.forkosh.com/mimetex.html|mimeTeX]] web site to see some examples of TeX syntax for formulae, and there is also a link to a [[http://www.forkosh.com/mimetextutorial.html|LaTeX tutorial]] showing you the basics of TeX markup (and many examples). x=\frac{-b\pm\sqrt{b^2-4ac}}{2a} Will yield: x=\frac{-b\pm\sqrt{b^2-4ac}}{2a} \color{blue}\Large e^x=\sum_{n=0}^\infty\frac{x^n}{n!} Will yield: \color{blue}\Large e^x=\sum_{n=0}^\infty\frac{x^n}{n!} y=\left\{x/2\text{ if x even}\\(x+1)/2\text{ if odd}\right. Will yield: y=\left\{x/2\text{ if x even}\\(x+1)/2\text{ if odd}\right. \\ \\ Essentially, you place the TeX markup in between opening '''' and closing '''' tags and it will be rendered properly. Note that you do **not** need to specify the '''' 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. Your note goes here. In your %%%% tag, you can **optionally** include one of warning, important, or tip. \\ ===== Poll ===== What is your favourite colour from the additive colour system? * Red * Green * Blue Question? * Option 1 * Option 2 * Option 3 \\ ===== Styler ===== This plugin offers several tags to provide additional formatting for text. * %%%% - the expanded quotations * %%%% - an epigraph or quotation * %%%% - formatting of verses * %% With the quote tag, you can: * Use lists * Use **formatting** * Use pictures {{http://wiki.mcmaster.ca/media/button-rss.png}} * And more With the quote tag, you can: * Use lists * Use **formatting** * Use pictures {{http://wiki.mcmaster.ca/media/button-rss.png}} * And more \\ ===== 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. {{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 ^ ^ {{youtube>small:mRGQcYFZea8}} \\ {{tag>folded tag plugin}}