Warning: call_user_func_array() expects parameter 2 to be array, string given in /homepages/29/d253062740/htdocs/gorm/inc/parserutils.php on line 603

Warning: call_user_func_array() expects parameter 2 to be array, string given in /homepages/29/d253062740/htdocs/gorm/inc/parserutils.php on line 603

Warning: call_user_func_array() expects parameter 2 to be array, string given in /homepages/29/d253062740/htdocs/gorm/inc/parserutils.php on line 603

Warning: call_user_func_array() expects parameter 2 to be array, string given in /homepages/29/d253062740/htdocs/gorm/inc/parserutils.php on line 603

Warning: call_user_func_array() expects parameter 2 to be array, string given in /homepages/29/d253062740/htdocs/gorm/inc/parserutils.php on line 603

Warning: call_user_func_array() expects parameter 2 to be array, string given in /homepages/29/d253062740/htdocs/gorm/inc/parserutils.php on line 603

Tillagt syntaks

Syntaks for ekstra funksjonalitet som er lagt til via plugins:

Tabinclude plugin

Inkludere artikler i artikkel med arkfaner. Arkfane laster da en eller flere andre artikler dynamisk (vha. AJAX).

Syntax

   {{tabinclude>page1,page2,page3...}}

Vær obs på at det er første overskrift i artiklene som vises som arkfanetittel. Se eksempel i artikkelen celle, der det er hentet ut tre artikler fra navneromet video. Et annet eksempel i artikkelen detox.

Diagram

Syntakseksempel:

 <diagram>
 | AAA |-| BBB |AAA=Helse|BBB=kosthold
 | |:| | | | | |
 | |D|~|~| CCC |CCC=[[Candida-allergi|Candida]]
 </diagram>

Og slik blir det:

Candida
MMS

Det er en litt kranglete syntaks for å lage disse diagrammene, men opplagt lettere enn å lage diagrammene for hånd i et tegneprogram og så laste dem opp. For syntaks se dokumentasjon for diagram

Et annet eksempel

 <diagram>
 | | | Dad |y| Mom | | |Dad=Daddy|Mom=Mommy
 | |,|-|-|-|+|-|-|-|.| |
 | Sys | |  Me | | Bro |Sys=Syster|Bro=Brother
 </diagram>

Blir slik

Me

Google Chart Plugin

Let's start with an example:

<gchart 350x120 pie3d #0000ff #ffffff right>
Apples       = 33
Peaches      = 23
Strawberries = 25
Peanuts      = 7
</gchart>

As you can see, the usage is simple. You give your data as name=value pairs inside the <gchart> tags. In the start tag you can add various optional options:

  • Size give in the form widthxheight in pixels. Defaults to 320x140
  • Type defaults to pie3d, can be one of the following
    • pie3d for a 3D pie graph
    • pie2d for a 2D pie graph
    • line for a line graph
    • sparkline for a «sparkline» graph
    • hbar for a horizontal bar graph
    • vbar for a vertical bar graph
  • Graph color this is the first hex color given. Defaults to the configuration (see below) or orange if no config is given.
  • Background color this is the second hex color given. Defaults to the configuration (see below) or white if no config is given.
  • Alignment can be left, center or right. Defaults to right.

Hex colors can be the typical 3 part RGB hexcodes known from HTML or can contain a 4th alpha transparency value.

Configuration The default graph and background color can be set in the configuration manager to match the style of your template. It is recommended to enable the fetchsize option to make use of image caching.

avbarchart

500

A
50

B
250

C
1000

D

<barchart>1000|A:500,B:50,C:250,D:1000</barchart>
  • The first value is the max number that your data set will go to.
  • After the | you have a comma separated list of labels and values to be graphed.
  • In the source of the plugin are config vars that let you customize the size, color and font of your chart.
  • Tested in IE 6, 7 and Firefox 2.0, 3.0+.

You can then use regular DokuWiki syntax to put a title above it and if needed, a legend below to describe the labels. If you make the bars wide, the labels can be full text.

Dokumentasjon http://www.dokuwiki.org/plugin:avbarchart

Sorterbar tabell

Tabeller lages med tegnene ^ for tabellhode og | for alt annet. For å gjøre en tabell sorterbar, kan du legge tabellen inn i taggen «sorttable» slik:

 <sortable>
 ^Col1^Col3^Col3^
 |1|one|25/12/2008|
 |2|two|10/12/2008|
 </sortable>

Col1Col3Col3
1one25/12/2008
2two10/12/2008

Praktisk eksempel:

Pasientkontakter med diagnose, etter diagnosegrupper og kjønn i Norge 2005. Absolutte tall og prosent

Diagnoser Begge kjønn Prosent Menn Prosent Kvinner Prosent
- I alt 109 826 100 43741 100 65987 100
Luftveisinfeksjoner, inkl. ørebetennelse 10093 9 4117 9 5961 9
Lokale smerter og betennelser 7193 7 2952 7 4241 6
Ryggproblemer 4779 4 2208 5 2570 4
Generelle smerter og muskelplager 1605 1 340 1 1265 2
Ledd- og giktsykdommer 2929 3 845 2 2084 3
Psykisk sykdom eller lidelse 13469 12 5555 13 7908 12
Atopi, astma, allergi eller eksem 2645 2 1170 3 1472 2
Høyt blodtrykk 4391 4 1962 4 2428 4
Hjertesykdom 5567 5 2974 7 2591 4
Diabetes 2079 2 1071 2 1008 2
Kreft 1591 1 850 2 740 1
Underlivsplager hos kvinner 1608 1 - - 1607 2
Funksjonelle mage-tarmplager 3388 3 1470 3 1914 3
Hudinfeksjoner 1456 1 716 2 735 1
Ulykker og skader 3357 3 1742 4 1603 2
Medfødt sykdom eller feil 239 0 123 0 116 0
Svangerskap, fødsel, prevensjon 4092 4 - - 4092 6
Frykt for sykdom 553 1 253 1 297 0
Administrativ el. forebyggende kontakt 3057 3 1076 2 1969 3
Andre diagnoser 35735 33 14317 33 21386 32
Kilde: SSB

Indentert sitering

Dette er litt sitert tekst
dette er mer
enda mer
sdfsfsdfs
og atter mer igjen

Konvertere wikipediakildekode til dokuwikiformat

Et litte program på nettet for å gjøre kode fra wikipedia om til dokuwikikode:

http://johbuc6.coconia.net/mediawiki2dokuwiki.php

Video

Videospillere fra ulike leverandører. Se dokumentasjon på syntax og støtte for Video Share Plugin

Display a YouTube Video:

{{youtube>SRwehR570aY}}

For at dette innholdet skal vises må du ha Adobe Flash Plugin.

Show a larger player:

{{youtube>jv_kLqxbtcg?large}}

For at dette innholdet skal vises må du ha Adobe Flash Plugin.

Right-align the player :

{{ youtube>L-WM8YxwqEU}}

For at dette innholdet skal vises må du ha Adobe Flash Plugin.

Show a small, centered player:

{{ youtube>L-WM8YxwqEU?small }}

For at dette innholdet skal vises må du ha Adobe Flash Plugin.

MP3-Spiller

The syntax is as follows, you can use the plugin multiple times on a single wiki page.

{{mp3play>namespace:audiofile.mp3}}

Du kan også bruke eksterne mp3-filer

  {{mp3play>http://mises.org/MultiMedia/block/block_08-05-2009.mp3}}
 

The plugin has two options loop and autostart. If loop is set the playback will start again at the beginning when the player reached the end. When autostart is set, the player will immediately start playing the mp3 when you visit the wiki page. The syntax is as follows:

{{mp3play>namespace:audiofile.mp3?autostart}}

{{mp3play>namespace:audiofile.mp3?loop}}

{{mp3play>namespace:audiofile.mp3?autostart&loop}}

{{mp3play>namespace:audiofile.mp3?loop&autostart}}

Bildetekst

Dokumentasjon http://www.dokuwiki.org/plugin:imagebox#preview

Syntaks bilde uten bildetekst

{{ImagePath|Caption}}

bildetekst har støtte for [[lenker]], for **uthevet** tekst, for smileys 8-) etc

Syntaks bilde med bildetekst er som bilde men i hakeparantes

[{{ImagePath|Caption}}]
bildetekst har støtte for lenker, for uthevet tekst, for smileys 8-) etc

HTML og embedkode fra andre nettsteder

Du kan ikke legge inn HTML på sidene uten å legge HTML-koden inn mellom taggene

 <html>
 HTML-kode her fra Google Books 
 </html>

Flere bøker med forhåndsvisning finner du her: http://books.google.com/

RSS FEEDS

Her er en feed fra news.google.no med søket «helse», den er satt til å vise siste nyheter. Lenkene åpnes i nytt vindu:

Her uten beskrivelse med 10 siste nyhetsoppslag om helse

 {{rss>http://news.google.no/news?pz=1&ned=no_no&hl=no&q=Helse&output=rss 10}}

Her med beskrivelser - temmelig håpløst design der, men det går det nok an å rette på, og også ikke bra at det blir dobbelt opp med lenker.

 {{rss>http://news.google.no/news?pz=1&ned=no_no&hl=no&q=Helse&output=rss 5 description}}

Html2DokuWiki - lite program for å konvertere fra HTML til Dokuwiki-syntaks

Html2DokuWiki is a free HTML to DokuWiki converter for Win32 platforms. It is very simple to install and extremely easy to use. Just extract the executable from the archive, double-click to start, and Html2DokuWiki is ready to go.

To start converting, just type HTML into the upper edit. The converted DokuWiki syntax will immediately appear in the lower edit. Then select (CTRL+A) the converted document and copy / paste it into any DokuWiki site. Larger HTML documents can also be pasted into the HTML input.

Click here to download Html2DokuWiki.

WRAP

Merk en tekst som engelsk. Viktig hvis man vil bli sett av nettlesere for blinde og svaksynte.

 <wrap :en>This text is explicitly marked as English.</wrap>

This text is explicitly marked as English.

html-en blir seende slik ut <span lang=«en» xml:lang=«en» dir=«ltr»> This text is explicitly marked as English.</span>

Examples for the Wrap Plugin

Basic syntax

An uppercase <WRAP> creates a div and should be used for «big» containers, surrounding paragraphs, lists, tables, etc.

<WRAP classname>... content ...</WRAP>

A lowercase <wrap> creates a span and should be used for «small» containers, inside paragraphs, lists, tables, etc.

<wrap classname>... content ...</wrap>

Classes and Styles

Columns and Floats

You can have columns easily by adding the class column and a width, e.g.

<WRAP column 30%>...content...</WRAP>
Emulated Big Headline

You can emulate a big headline with italic, bold and underlined text, e.g.

//**__Emulated Big Headline__**//

Emulated Small Headline

A smaller headline uses no underlining, e.g.

//**Emulated Small Headline**//

If you need text that is bold and italic, simply use it the other way around:

**//No Headline//**
Different Floating Options

Normally you would only need the class column, but for more sophisticated uses (not only for columns, but for any other classes, like boxes and notes as well) you can have several kinds of «floats»:

  • column is the same as left which will let you float your wrap on the left
  • right will let the wrap float right
  • center will position the wrap in the horizontal center of the page
Widths

You can set any valid widths: %, px, em, ex, pt, pc, cm, mm, in, but most of the time you'd only want either

typee.g.note
%30%makes sense in a liquid layout
px420pxmakes sense if your layout has a fixed pixel width or if your container contains images with a certain width
em20emmakes sense if you like your wrap container to grow and shrink with the font size or if your layout is em-based

A table inside a column or box will always be 100% wide. This makes positioning and sizing tables possible.

After using any of the float classes, you might come across something like this, where the following text protrudes into the space where only the floating containers should be …

… to prevent that, you should simply add

<WRAP clear></WRAP>

after your last column.

You can use the same options with small <wrap></wrap> (as each element that floats is automatically a block level element), but it probably doesn't make too much sense. Widths on spans normally do not work (by design), but can make sense, when it is floating.

Attention: Widths can cause problems and will often look different and break in some browsers. If you're not a developer, you might not understand any problems regarding the box model. Just try to test your columns in all major browsers and make your widths smaller than you initially think they should be.

All of those options will also work in the boxes and notes wraps (see below).

Alignments

You can use these different text alignments:

  • leftalign
  • rightalign
  • centeralign
  • justify
Center aligned text …
… and right aligned.
<WRAP centeralign>

Center aligned text ...
</WRAP>

<WRAP rightalign>

... and right aligned.
</WRAP>

You cannot add alignments to spans.

Boxes and Notes

round box 570px center
  • box creates a box around the container and uses a colour from the template's style.ini as default colour
  • any of the classes information, tip, important, warning, help, download, todo will add a special note container with a corresponding icon
  • round can be added to anything with a background colour or a border and will only work in modern browsers (no Internet Explorer)
Information
<WRAP information></WRAP>
Tip
<WRAP tip></WRAP>
Important
<WRAP important></WRAP>
Warning
<WRAP warning></WRAP>
Help
<WRAP round help></WRAP>
Download
<WRAP download></WRAP>
Todo
<WRAP todo></WRAP>

You can use notes and boxes also inside text with the lowercase <wrap> like this: information, help, warning, important, tip, download, todo and round fancy box.

<wrap information>information</wrap>, <wrap help>help</wrap>, ...

Marks

You can mark text as highlighted, less significant and especially emphasised.

You can mark text as <wrap hi>highlighted</wrap>, <wrap lo>less significant</wrap> and <wrap em>especially emphasised</wrap>.

The same works for divs.

Miscellaneous

These will work for divs, as well as spans.

Indent

This text will appear indented.

<wrap indent>This text will appear indented.</wrap>

Outdent

This text will appear «outdented».

<wrap outdent>This text will appear "outdented".</wrap>

Spoiler

Here follows a spoiler: Darth Vader is Luke's father.

Here follows a spoiler: <wrap spoiler>Darth Vader is Luke's father.</wrap>

Just select the text in the spoiler box to be able to read its content.

Hide

The following text is hidden: John, please revise that sentence.

The following text is hidden: <wrap hide>John, please revise that sentence.</wrap>

Warning: The text will still appear in the source code, in non-modern browsers and is searchable. Do not hide any security risky secrets with it!

Typography

I advice against using the following typography classes. It's better to create semantic classes that reflect their meaning instead.

  • font family: sansserif, serif, monospace
  • font size: bigger, muchbigger, smaller
  • font colour: fgred, fggreen, fgblue, fgcyan, fgviolet, fgyellow, fggrey
  • background colour: bgred, bggreen, bgblue, bgcyan, bgviolet, bgyellow, bggrey

Combining and Nesting

You can combine and nest all classes and types of boxes, e.g.

Outer green box floats right
Inner nested box floats left and is partly emphasized and highlighted with nested bigger text inside.

Text inside outer right box, but beneath inner left box.

Round tip box underneath, after a clear.
<WRAP box bggreen 350px right :en>

//**__Outer green box floats right__**//

<WRAP 165px left>

Inner nested box floats left and is partly <wrap em hi>__em__phasized and __hi__ghlighted with nested <wrap bigger>__bigger__ text</wrap> inside</wrap>.
</WRAP>

Text inside outer right box, but beneath inner left box.

<WRAP clear></WRAP>
<WRAP round tip>

Round tip box underneath, after a ''clear''.
</WRAP>
</WRAP>

Mer om wrap på http://www.dokuwiki.org/plugin:wrap