User Tools

Site Tools


wiki:syntax

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
wiki:syntax [2011/12/16 16:43]
claes
wiki:syntax [2021/08/14 04:21] (current)
Line 1: Line 1:
 ====== Formatting Syntax ====== ====== Formatting Syntax ======
  
-[[doku>DokuWiki]] supports some simple markup language, which tries to make the datafiles to be as readable as possible. This page contains all possible syntax you may use when editing the pages. Simply have a look at the source of this page by pressing the //Edit this page// button at the top or bottom of the page. If you want to try something, just use the [[playground:playground|playground]] page. The simpler markup is easily accessible via [[doku>toolbar|quickbuttons]], too.+[[doku>DokuWiki]] supports some simple markup language, which tries to make the datafiles to be as readable as possible. This page contains all possible syntax you may use when editing the pages. Simply have a look at the source of this page by pressing "Edit this page". If you want to try something, just use the [[playground:playground|playground]] page. The simpler markup is easily accessible via [[doku>toolbar|quickbuttons]], too.
  
 ===== Basic Text Formatting ===== ===== Basic Text Formatting =====
Line 84: Line 84:
  
   * For security reasons direct browsing of windows shares only works in Microsoft Internet Explorer per default (and only in the "local zone").   * For security reasons direct browsing of windows shares only works in Microsoft Internet Explorer per default (and only in the "local zone").
-  * For Mozilla and Firefox it can be enabled through different workaround mentioned in the [[http://kb.mozillazine.org/Links_to_local_pages_do_not_work|Mozilla Knowledge Base]]. However, there will still be a JavaScript warning about trying to open a Windows Share. To remove this warning (for all users), put the following line in ''conf/local.protected.php'': +  * For Mozilla and Firefox it can be enabled through different workaround mentioned in the [[http://kb.mozillazine.org/Links_to_local_pages_do_not_work|Mozilla Knowledge Base]]. However, there will still be a JavaScript warning about trying to open a Windows Share. To remove this warning (for all users), put the following line in ''conf/lang/en/lang.php'' (more details at [[doku>localization#changing_some_localized_texts_and_strings_in_your_installation|localization]])<code - conf/lang/en/lang.php> 
- +<?php 
-  $lang['js']['nosmblinks'] = '';+/** 
 + * Customization of the english language file 
 + * Copy only the strings that needs to be modified 
 + */ 
 +$lang['js']['nosmblinks'] = ''; 
 +</code>
  
 ==== Image Links ==== ==== Image Links ====
Line 92: Line 97:
 You can also use an image to link to another internal or external page by combining the syntax for links and [[#images_and_other_files|images]] (see below) like this: You can also use an image to link to another internal or external page by combining the syntax for links and [[#images_and_other_files|images]] (see below) like this:
  
-  [[http://www.php.net|{{wiki:dokuwiki-128.png}}]]+  [[http://php.net|{{wiki:dokuwiki-128.png}}]]
  
-[[http://www.php.net|{{wiki:dokuwiki-128.png}}]]+[[http://php.net|{{wiki:dokuwiki-128.png}}]]
  
 Please note: The image formatting is the only formatting syntax accepted in link names. Please note: The image formatting is the only formatting syntax accepted in link names.
Line 122: Line 127:
 ---- ----
  
-===== Images and Other Files =====+===== Media Files =====
  
-You can include external and internal [[doku>images]] with curly brackets. Optionally you can specify the size of them.+You can include external and internal [[doku>images|images, videos and audio files]] with curly brackets. Optionally you can specify the size of them.
  
 Real size:                        {{wiki:dokuwiki-128.png}} Real size:                        {{wiki:dokuwiki-128.png}}
Line 132: Line 137:
 Resize to given width and height((when the aspect ratio of the given width and height doesn't match that of the image, it will be cropped to the new ratio before resizing)): {{wiki:dokuwiki-128.png?200x50}} Resize to given width and height((when the aspect ratio of the given width and height doesn't match that of the image, it will be cropped to the new ratio before resizing)): {{wiki:dokuwiki-128.png?200x50}}
  
-Resized external image:           {{http://de3.php.net/images/php.gif?200x50}}+Resized external image:           {{https://secure.php.net/images/php.gif?200x50}}
  
   Real size:                        {{wiki:dokuwiki-128.png}}   Real size:                        {{wiki:dokuwiki-128.png}}
   Resize to given width:            {{wiki:dokuwiki-128.png?50}}   Resize to given width:            {{wiki:dokuwiki-128.png?50}}
   Resize to given width and height: {{wiki:dokuwiki-128.png?200x50}}   Resize to given width and height: {{wiki:dokuwiki-128.png?200x50}}
-  Resized external image:           {{http://de3.php.net/images/php.gif?200x50}}+  Resized external image:           {{https://secure.php.net/images/php.gif?200x50}}
  
  
Line 157: Line 162:
  
   {{ wiki:dokuwiki-128.png |This is the caption}}   {{ wiki:dokuwiki-128.png |This is the caption}}
- 
-If you specify a filename (external or internal) that is not an image (''gif, jpeg, png''), then it will be displayed as a link instead. 
  
 For linking an image to another page see [[#Image Links]] above. For linking an image to another page see [[#Image Links]] above.
 +
 +==== Supported Media Formats ====
 +
 +DokuWiki can embed the following media formats directly.
 +
 +| Image | ''gif'', ''jpg'', ''png''  |
 +| Video | ''webm'', ''ogv'', ''mp4'' |
 +| Audio | ''ogg'', ''mp3'', ''wav''  |
 +| Flash | ''swf''                    |
 +
 +If you specify a filename that is not a supported media format, then it will be displayed as a link instead.
 +
 +By adding ''?linkonly'' you provide a link to the media without displaying it inline
 +
 +  {{wiki:dokuwiki-128.png?linkonly}}
 +
 +{{wiki:dokuwiki-128.png?linkonly}} This is just a link to the image.
 +
 +==== Fallback Formats ====
 +
 +Unfortunately not all browsers understand all video and audio formats. To mitigate the problem, you can upload your file in different formats for maximum browser compatibility.
 +
 +For example consider this embedded mp4 video:
 +
 +  {{video.mp4|A funny video}}
 +
 +When you upload a ''video.webm'' and ''video.ogv'' next to the referenced ''video.mp4'', DokuWiki will automatically add them as alternatives so that one of the three files is understood by your browser.
 +
 +Additionally DokuWiki supports a "poster" image which will be shown before the video has started. That image needs to have the same filename as the video and be either a jpg or png file. In the example above a ''video.jpg'' file would work.
  
 ===== Lists ===== ===== Lists =====
Line 241: Line 273:
 Some times you want to mark some text to show it's a reply or comment. You can use the following syntax: Some times you want to mark some text to show it's a reply or comment. You can use the following syntax:
  
-  I think we should do it +<code> 
-   +I think we should do it 
-  > No we shouldn'+ 
-   +> No we shouldn'
-  >> Well, I say we should + 
-   +>> Well, I say we should 
-  > Really? + 
-   +> Really? 
-  >> Yes! + 
-   +>> Yes! 
-  >>> Then lets do it!+ 
 +>>> Then lets do it! 
 +</code>
  
 I think we should do it I think we should do it
Line 297: Line 331:
   ^ Heading 5    | Row 2 Col 2          | Row 2 Col 3        |   ^ Heading 5    | Row 2 Col 2          | Row 2 Col 3        |
  
-You can have rowspans (vertically connected cells) by adding '':::'' into the cells below the one to which they should connect.+You can have rowspans (vertically connected cells) by adding ''%%:::%%'' into the cells below the one to which they should connect.
  
 ^ Heading 1      ^ Heading 2                  ^ Heading 3          ^ ^ Heading 1      ^ Heading 2                  ^ Heading 3          ^
Line 369: Line 403:
 ==== Syntax Highlighting ==== ==== Syntax Highlighting ====
  
-[[wiki:DokuWiki]] can highlight sourcecode, which makes it easier to read. It uses the [[http://qbnz.com/highlighter/|GeSHi]] Generic Syntax Highlighter -- so any language supported by GeSHi is supported. The syntax is the same like in the code and file blocks in the previous section, but this time the name of the used language is inserted inside the tag. Eg. ''<nowiki><code java></nowiki>'' or ''<nowiki><file java></nowiki>''.+[[wiki:DokuWiki]] can highlight sourcecode, which makes it easier to read. It uses the [[http://qbnz.com/highlighter/|GeSHi]] Generic Syntax Highlighter -- so any language supported by GeSHi is supported. The syntax uses the same code and file blocks described in the previous section, but this time the name of the language syntax to be highlighted is included inside the tag, e.g. ''<nowiki><code java></nowiki>'' or ''<nowiki><file java></nowiki>''.
  
 <code java> <code java>
Line 383: Line 417:
 </code> </code>
  
-The following language strings are currently recognized: //4csabapactionscript-french, actionscript, actionscript3, adaapacheapplescriptasmaspautoconfautohotkeyautoitavisynthawkbashbasic4glbfbibtexblitzbasicbnfboo, c, c_mac, caddclcadlispcfdgcfmchaiscriptcilclojurecmakecobolcppcpp-qtcsharpcsscuesheet, d, dcsdelphidiffdivdosdotecmascripteiffelemailerlangfofortranfreebasicfsharpgambasgenerogenie, gdb, glslgmlgnuplotgroovy, gettext, gwbasichaskellhicesthq9plushtmliconidliniinnointercalio, j, java5javajavascriptjquerykixtartklonecklonecpplatexlisplocobasiclogtalklolcodelotusformulaslotusscriptlscriptlsl2luam68kmagiksfmakemapbasicmatlabmircmodula2modula3, mmix, mpasmmxmlmysqlnewlispnsisoberon2objcocaml-briefocamloobasoracle8, oracle11, oxygeneozpascalpcreperl, perl6, perpfphp-briefphppike, pic16, pixelbenderplsqlpostgresqlpovraypowerbuilderpowershellprogressprologpropertiesprovidexpurebasicpythonq, qbasic, railsrebolregrobotsrpmspecrsplusrubysasscalaschemescilabsdlbasicsmalltalksmartysqlsystemverilogtclteratermtextthinbasictsqltyposcriptuniconvalavbnetvbverilogvhdlvimvisualfoxprovisualprologwhitespacewinbatch, whois, xbasicxmlxorg_confxppz80//+The following language strings are currently recognized: //4cs 6502acme 6502kickass 6502tasm 68000devpac abap actionscript3 actionscript ada aimms algol68 apache applescript apt_sources arm asm asp asymptote autoconf autohotkey autoit avisynth awk bascomavr bash basic4gl batch bf biblatex bibtex blitzbasic bnf boo caddcl cadlisp ceylon cfdg cfm chaiscript chapel cil c_loadrunner clojure c_mac cmake cobol coffeescript c cpp cpp-qt cpp-winapi csharp css cuesheet c_winapi dart dcl dcpu16 dcs delphi diff div dos dot ecmascript eiffel email epc e erlang euphoria ezt f1 falcon fo fortran freebasic freeswitch fsharp gambas gdb genero genie gettext glsl gml gnuplot go groovy gwbasic haskell haxe hicest hq9plus html html4strict html5 icon idl ini inno intercal io ispfpanel java5 java javascript jcl j jquery julia kixtart klonec klonecpp kotlin latex lb ldif lisp llvm locobasic logtalk lolcode lotusformulas lotusscript lscript lsl2 lua m68k magiksf make mapbasic mathematica matlab mercury metapost mirc mk-61 mmix modula2 modula3 mpasm mxml mysql nagios netrexx newlisp nginx nimrod nsis oberon2 objc objeck ocaml-brief ocaml octave oobas oorexx oracle11 oracle8 oxygene oz parasail parigp pascal pcre perl6 perl per pf phix php-brief php pic16 pike pixelbender pli plsql postgresql postscript povray powerbuilder powershell proftpd progress prolog properties providex purebasic pycon pys60 python qbasic qml racket rails rbs rebol reg rexx robots roff rpmspec rsplus ruby rust sas sass scala scheme scilab scl sdlbasic smalltalk smarty spark sparql sql sshconfig standardml stonescript swift systemverilog tclegg tcl teraterm texgraph text thinbasic tsql twig typoscript unicon upc urbi uscript vala vbnet vb vbscript vedit verilog vhdl vim visualfoxpro visualprolog whitespace whois winbatch wolfram xbasic xml xojo xorg_conf xpp yaml z80 zxbasic// 
 + 
 +There are additional [[doku>syntax_highlighting|advanced options]] available for syntax highlighting, such as highlighting lines or adding line numbers.
  
 ==== Downloadable Code Blocks ==== ==== Downloadable Code Blocks ====
  
-When you use the ''%%<code>%%'' or ''%%<file>%%'' syntax as above, you might want to make the shown code available for download as well. You can to this by specifying a file name after language code like this:+When you use the ''%%<code>%%'' or ''%%<file>%%'' syntax as above, you might want to make the shown code available for download as well. You can do this by specifying a file name after language code like this:
  
 <code> <code>
Line 428: Line 464:
 <code> <code>
 <php> <php>
-echo 'A logo generated by PHP:'; +echo 'The PHP version: '; 
-echo '<img src="' . $_SERVER['PHP_SELF'] . '?=' . php_logo_guid() . '" alt="PHP Logo !" />'+echo phpversion(); 
-echo '(generated inline HTML)';+echo ' (generated inline HTML)';
 </php> </php>
 <PHP> <PHP>
 echo '<table class="inline"><tr><td>The same, but inside a block level element:</td>'; echo '<table class="inline"><tr><td>The same, but inside a block level element:</td>';
-echo '<td><img src="' . $_SERVER['PHP_SELF'] . '?=' . php_logo_guid() . '" alt="PHP Logo !" /></td>';+echo '<td>'.phpversion().'</td>';
 echo '</tr></table>'; echo '</tr></table>';
 </PHP> </PHP>
Line 440: Line 476:
  
 <php> <php>
-echo 'A logo generated by PHP:'; +echo 'The PHP version: '; 
-echo '<img src="' . $_SERVER['PHP_SELF'] . '?=' . php_logo_guid() . '" alt="PHP Logo !" />'+echo phpversion(); 
-echo '(inline HTML)';+echo ' (inline HTML)';
 </php> </php>
 <PHP> <PHP>
 echo '<table class="inline"><tr><td>The same, but inside a block level element:</td>'; echo '<table class="inline"><tr><td>The same, but inside a block level element:</td>';
-echo '<td><img src="' . $_SERVER['PHP_SELF'] . '?=' . php_logo_guid() . '" alt="PHP Logo !" /></td>';+echo '<td>'.phpversion().'</td>';
 echo '</tr></table>'; echo '</tr></table>';
 </PHP> </PHP>
Line 461: Line 497:
 | date       | show item dates | | date       | show item dates |
 | description| show the item description. If [[doku>config:htmlok|HTML]] is disabled all tags will be stripped | | description| show the item description. If [[doku>config:htmlok|HTML]] is disabled all tags will be stripped |
 +| nosort     | do not sort the items in the feed |
 | //n//[dhm] | refresh period, where d=days, h=hours, m=minutes. (e.g. 12h = 12 hours). | | //n//[dhm] | refresh period, where d=days, h=hours, m=minutes. (e.g. 12h = 12 hours). |
  
 The refresh period defaults to 4 hours. Any value below 10 minutes will be treated as 10 minutes. [[wiki:DokuWiki]] will generally try to supply a cached version of a page, obviously this is inappropriate when the page contains dynamic external content. The parameter tells [[wiki:DokuWiki]] to re-render the page if it is more than //refresh period// since the page was last rendered. The refresh period defaults to 4 hours. Any value below 10 minutes will be treated as 10 minutes. [[wiki:DokuWiki]] will generally try to supply a cached version of a page, obviously this is inappropriate when the page contains dynamic external content. The parameter tells [[wiki:DokuWiki]] to re-render the page if it is more than //refresh period// since the page was last rendered.
 +
 +By default the feed will be sorted by date, newest items first. You can sort it by oldest first using the ''reverse'' parameter, or display the feed as is with ''nosort''.
  
 **Example:** **Example:**
Line 479: Line 518:
 | %%~~NOTOC~~%%   | If this macro is found on the page, no table of contents will be created | | %%~~NOTOC~~%%   | If this macro is found on the page, no table of contents will be created |
 | %%~~NOCACHE~~%% | DokuWiki caches all output by default. Sometimes this might not be wanted (eg. when the %%<php>%% syntax above is used), adding this macro will force DokuWiki to rerender a page on every call | | %%~~NOCACHE~~%% | DokuWiki caches all output by default. Sometimes this might not be wanted (eg. when the %%<php>%% syntax above is used), adding this macro will force DokuWiki to rerender a page on every call |
-===== MathJax ===== 
-==== Examples/Usage ==== 
- 
-NOTE that the default configuration uses $ (dollar signs) to delimit TeX formulas. This may cause trouble if you have $ characters in any pages. The default configuration also lets you escape the dollar signs, however, by changing them to '\$'. This should correct any problems you might have. 
- 
-Once the plugin is installed, you can write TeX formulas in your wiki with the following syntax (by default — all delimiters are configurable): 
- 
-=== Inline Math === 
-Use dollar signs: 
- 
-  $a^2 + b^2 = c^2$ 
-   
-$a^2 + b^2 = c^2$ 
- 
-or escaped parentheses: 
- 
-  \(1+2+\dots+n=\frac{n(n+1)}{2}\)   
- 
-\(1+2+\dots+n=\frac{n(n+1)}{2}\) 
- 
-=== Display Math === 
- 
-To display math on its own line, use double dollar signs: 
- 
-  $$ \frac{d}{dx}\left( \int_{0}^{x} f(u)\,du\right)=f(x) $$ 
-   
-$$ \frac{d}{dx}\left( \int_{0}^{x} f(u)\,du\right)=f(x) $$ 
- 
-or escaped square brackets: 
- 
-  \[ \sin A \cos B = \frac{1}{2}\left[ \sin(A-B)+\sin(A+B) \right] \] 
- 
-\[ \sin A \cos B = \frac{1}{2}\left[ \sin(A-B)+\sin(A+B) \right] \] 
- 
-===== SyntaxHighlighter3 ===== 
-==== Syntax and Usage ==== 
- 
-Client side syntax highlighter (with copy to clipboard functionality) based on SyntaxHighlighter Plugin by David Shin. Main differences: 
- 
-=== Usage === 
-  <sxh [brush alias][; options for SyntaxHighlighter]> 
-  ... code/text ... 
-  </sxh> 
- 
-brush alias - The brush alias (language) that SyntaxHighlighter should use. Defaults to “text” if none is provided. See SyntaxHighlighter Brushes for a complete list of available brushes. Add new brushes to the scripts directory (see plugin structure) and the alias(es) and brush file name to the available brushes string in Config Manager (example: ”…,bat cmd shBrushBat.js”). The brush file name is case sensitive. 
- 
-options - Semicolon separated options for SyntaxHighlighter, see SyntaxHighlighter Configuration. Block Title isn't a normal configuration option, but the plugin handles it as if it was, i.e. “title: <title string>;”. :!: Do not collapse code and hide the toolbar at the same time, title will not show. 
- 
-=== Example === 
-  <sxh php; first-line: 70; highlight: [89,92]; title: New title attribute in action> 
-    public function render($mode, &$renderer, $data) { 
-        if($mode != 'xhtml') return false; 
-        if (count($data) == 3) { 
-            list($syntax, $attr, $content) = $data; 
-            if ($syntax == 'sxh') { 
-                // Check if there's a title in the attribute string. It can't be passed along as a normal parameter to SyntaxHighlighter. 
-                if (preg_match("/title:/i", $attr)) { 
-                    // Extract title(s) from attribute string. 
-                    $attr_array = explode(";",$attr); 
-                    $title_array = preg_grep("/title:/i", $attr_array); 
-                    // Extract everything BUT title(s) from attribute string. 
-                    $not_title_array =  preg_grep("/title:/i", $attr_array, PREG_GREP_INVERT); 
-                    $attr = implode(";",$not_title_array); 
-                    // If there are several titles, use the last one. 
-                    $title = array_pop($title_array); 
-                    $title = preg_replace("/.*title:\s{0,}(.*)/i","$1",$title); 
-                    // Add title as an attribute to the <pre /> tag. 
-                    $renderer->doc .= "<pre class=\"brush: ".$attr."\" title=\"".$title."\">".$renderer->_xmlEntities($content)."</pre>"; 
-                } else { 
-                    // No title detected, pass all attributes as parameters to SyntaxHighlighter. 
-                    $renderer->doc .= "<pre class=\"brush: ".$attr."\">".$renderer->_xmlEntities($content)."</pre>"; 
-                } 
-             } else { 
-                $renderer->file($content); 
-            } 
-        } 
-        return true; 
-    } 
-  </sxh> 
- 
- 
-<sxh php; first-line: 70; highlight: [89,92]; title: New title attribute in action> 
-    public function render($mode, &$renderer, $data) { 
-  
-        if($mode != 'xhtml') return false; 
-  
-        if (count($data) == 3) { 
-            list($syntax, $attr, $content) = $data; 
-            if ($syntax == 'sxh') { 
-                // Check if there's a title in the attribute string. It can't be passed along as a normal parameter to SyntaxHighlighter. 
-                if (preg_match("/title:/i", $attr)) { 
-                    // Extract title(s) from attribute string. 
-                    $attr_array = explode(";",$attr); 
-                    $title_array = preg_grep("/title:/i", $attr_array); 
-                    // Extract everything BUT title(s) from attribute string. 
-                    $not_title_array =  preg_grep("/title:/i", $attr_array, PREG_GREP_INVERT); 
-                    $attr = implode(";",$not_title_array); 
-                    // If there are several titles, use the last one. 
-                    $title = array_pop($title_array); 
-                    $title = preg_replace("/.*title:\s{0,}(.*)/i","$1",$title); 
-                    // Add title as an attribute to the <pre /> tag. 
-                    $renderer->doc .= "<pre class=\"brush: ".$attr."\" title=\"".$title."\">".$renderer->_xmlEntities($content)."</pre>"; 
-                } else { 
-                    // No title detected, pass all attributes as parameters to SyntaxHighlighter. 
-                    $renderer->doc .= "<pre class=\"brush: ".$attr."\">".$renderer->_xmlEntities($content)."</pre>"; 
-                } 
-             } else { 
-                $renderer->file($content); 
-            } 
-        } 
-  
-        return true; 
-    } 
-</sxh> 
- 
-===== Gallery ===== 
- 
-A basic gallery can be added by selecting a [[:namespaces|namespace]] like this: 
- 
-  {{gallery>namespace}} 
- 
-All image files in the selected namespace will be added to the image gallery. Don't forget the ":" in front of the namespace. 
- 
-Instead of using a whole namespace of images, you can also specify a single image -- this makes most sense when combined with the lightbox mode (see below). 
- 
-  {{gallery>namespace:someimage.jpg}} 
- 
-The created gallery can be aligned by using white space (defaults to centered): 
- 
-  {{gallery> namespace}} (right aligned) 
-  {{gallery>namespace }} (left aligned) 
-  {{gallery> namespace }} (centered) 
- 
-Instead of a namespace, you can also give an HTTP(s) URL to any [[wp>Media RSS]] or ATOM feed with enclosures (as produced by most photo sharing sites like Flickr). The images will then be pulled from that feed instead: 
- 
-  {{gallery>http://www.23hq.com/rss/schabloni}} 
- 
-Note: since the question mark is used to separate the parameters (see next section) the URL can not contain any question mark. To use such a feed URL with the gallery plugin, just use one of the many short URL services like [[http://bit.ly]]. 
- 
-E.g. instead of ''%%http://api.flickr.com/services/feeds/photos_public.gne?id=22019303@N00&lang=en-us&format=rss_200%%'' use a shortened URL like ''%%http://bit.ly/HurZM%%''. 
- 
-Additionally, to have thumbnail creation correctly working you need to set [[config:fetchsize]] big enough to get the remote images downloaded. 
- 
-==== Parameters ==== 
- 
-A number of parameters can be set by appending them with ''?'' character to the namespace or image. Each parameter needs to be separated with a ''&'' character. Defaults for all parameters can be set in the config manager. If a parameter is enabled by default it can be disabled in the syntax by prefixing it with the syllable ''no''. E.g. the parameter ''cache'' is usually enabled and can be disabled using the keyword ''nocache''. Below is a list of all recognized parameters 
- 
-^ Parameter                      ^ Default         ^ Description    ^ 
-| ''//<number>//x//<number>//''  | ''%%120x120%%'' | Sets the size for thumbnails. Unless the crop option is set, this is a boundary box into which the thumbnail will be fitted, maintaining the correct aspect ratio. | 
-| ''//<number>//X//<number>//''  | ''%%800X600%%'' | Sets the size for the linked images in ''direct'' mode. This is a boundary box into which the image will be fitted, maintaining the correct aspect ratio. Note the uppercase ''X''.| 
-| ''//<number>//''               | ''5''           | The number images per row in the gallery table. If you specify a 0 no table is used instead all thumbnails are added in a sequence. | 
-| ''=//<number>//''              | ''=0''          | Limits the output to the given number of images. ''0'' means all. | 
-| ''+//<number>//''              | ''+0''          | Skip the first number of images. Useful with the option above. | 
-| ''~//<number>//''              | ''~0''          | Add a pagination for the thumbnails displaying the number of given thumbnails per page. ''0'' disables pagination. Pagination is added through JavaScript - when no JavaScript is available all thumbnails are displayed | 
-| ''cache''                      | enabled         | Usually the output of the created gallery is cached. When the images in your selected namespace change, you have to manually force an update of the gallery page's [[:caching|cache]]. To disable the cache for the page showing the gallery, set ''nocache'' as option. | 
-| ''crop''                       | disabled        | Make thumbnails the exact given thumbnail size big, cropping when needed. | 
-| ''direct''                     | disabled        | Link thumbnails with the bigger sized images not with their detail page | 
-| ''lightbox''                   | disabled        | Show images in a fancy JavaScript modal browsing window, see below for details. Setting this option automatically implies the ''direct'' mode | 
-| ''reverse''                    | disabled        | Reverse the order of the displayed images | 
-| ''recursive''                  | enabled         | Find images in the given namespace and all sub namespaces | 
-| ''random''                     | disabled        | Sort images randomly. You might want to use ''nocache'' as well | 
-| ''modsort''                    | disabled        | Sort images by file modification date | 
-| ''datesort''                   | disabled        | Sort images by EXIF date | 
-| ''titlesort''                  | disabled        | Sort images by EXIF title | 
-| ''showname''                   | disabled        | Show filename below thumbnails | 
-| ''showtitle''                  | disabled        | Show EXIF title below thumbnails | 
-| anything containing a ''*''    | jpg,gif,png images | This can be used to filter the list of files found in the given namespace. ''*'' work as simple wildcard symbol. | 
- 
-__Example__: 
- 
-  {{gallery>images:vacation?image_*.jpg&80x80&crop&lightbox}} 
- 
-This displays all images beginning with ''image_'' and ending in ''.jpg'' from the namespace ''images:vacation''. Thumbnails are cropped to 80x80 pixels and images will be opened in lightbox mode. 
- 
-__Example__: 
- 
-  {{gallery>?crop&lightbox}} 
- 
-This displays all images in the current namespace using 2 parameters. Parameterlist begins with ''?'' additional ones are concatenated with ''&''. 
- 
-==== About the Lightbox mode ==== 
- 
-This mode will open the clicked picture inside the current browser window without leaving the current page((This feature is based on the [[http://www.huddletogether.com/projects/lightbox/|Lightbox]] and [[http://serennz.cool.ne.jp/sb/sp/lightbox/|Lightbox Plus]] scripts with some additions)). You can close the picture view by clicking the little X in the upper right corner or anywhere in the picture. You can move to the next or previous image by using the arrow buttons in the lower corners. 
- 
-The picture is downsized if necessary to fit into the current browser window. You can enlarge it with the arrow button in the top corner. 
- 
-The following keys can be used to navigate: 
- 
-^ Key             ^ Action ^ 
-| ''->'' or ''n'' | next image | 
-| ''<-'' or ''p'' | previous image | 
-| ''x'' or ''c'' or ''ESC'' | close the image view | 
- 
- 
-Note: The feature does not use [[http://www.huddletogether.com/projects/lightbox2/|Version 2]] of the Lightbox script because of its heavy and DokuWiki-incompatible dependencies. 
- 
-==== Known Limitations and Caveats ==== 
- 
-=== Uploading Images === 
- 
-Uploading images is beyond the scope of this plugin. Do not request any features regarding this. 
- 
-  * Use the [[:Mediamanager]] to upload images one by one 
-  * Use the [[plugin:archiveupload]] plugin to upload multiple images in a Zip file 
-  * Use the Flash Uploader to upload multiple files 
-  * Upload the files manually via FTP to the ''data/media'' directory. Keep in mind that image names need to be valid [[:pagenames]], all lowercase, no spaces or special chars! 
- 
-=== Caching === 
- 
-The gallery output is cached by default. When you add pictures later, they may not show up in the gallery: add ''&purge=true'' to the end of the URL to clear the cache. See [[:caching]] for details. 
- 
-Optionally use the ''nocache'' parameter of the plugin (not recommended). 
- 
-=== EXIF Data Problems === 
- 
-Problems with accessing [[:exif|EXIF or IPTC]] data in the images, should be reported as DokuWiki bugs and not for this plugin. All EXIF handling is in DokuWiki core. Currently EXIF Data is expected in UTF-8 encoding. There are some problems fetching the correct date from images, these are fixed in the current [[devel:develonly|development]] version of DokuWiki. 
- 
-=== Lightbox Problems === 
- 
-When the lightbox mode doesn't work and instead images are simply opened in the same window, the JavaScript was not correctly loaded. This is most likely a Browser-Cache issue. Simply follow the steps described for fixing a similar problem with the [[faq:toolbar]]. Also make sure you don't have any conflicting plugin installed. You should **not** install any additional lightbox plugin. 
- 
-=== Images are not Resized === 
- 
-There are different reasons why thumbnails are not created: 
-  * libGD extension is missing => Install the extension or configure DokuWiki to use [[config:im_convert|imagemagick]] 
-  * libGD extension is installed, but the source image size + overhead is larger than memory_limit set in php.ini => Lower the source image size or increase the memory_limit 
- 
-=== MediaRSS feed displays "nothing found" === 
- 
-When no images from your feed are shown, be sure you don't have a question mark in your URL. Use an URL shortener as suggested above. Also be sure your feed URL (before shortening) starts with %%http://%% or %%https://%% and not with %%feed://%%. The latter is just a renamed HTTP link - simply rename it back. 
- 
-=== External Images are not Resized === 
- 
-As written above, you need to increase the [[config:fetchsize]] config option. Also make sure LibGD or ImageMagick are installed. 
- 
-===== Cumulus ===== 
- 
-<code>~~CUMULUS[&flag=value]~~</code> 
- 
-  * **flag** can be one or several (separated by & ) of: 
-    * //max//    --- Maximum number of words displayed 
-    * //width// --- Width in pixels (500 or more is recommended) 
-    * //height//  --- Height in pixels (ideally around 3/4 of the width) 
-    * //tcolor//  --- Color of the tags (6 char HEX color value without the ‘#’ prefix) 
-    * //tcolor2//  --- Optional second color for gradient between small and large font links (6 char HEX color value without the ‘#’ prefix) 
-    * //hicolor//  --- Optional highlight color (6 char HEX color value without the ‘#’ prefix) 
-    * //bgcolor//  --- Background color (6 char HEX color value without the ‘#’ prefix) 
-    * //trans//  --- Background transparency (true|false) 
-    * //distr//  --- Distribute tags evenly on sphere (true|false) 
-    * //speed//  --- Rotation speed (percentage, default is 100) 
-    * //show//  --- By default a word cloud is displayed. By using ''show=tag'' the plugin shows tags from the [[plugin:tag]] plugin instead. The alternative ''show=namespace'' displays all namespaces in the wiki root. 
- 
-**Example:** 
- 
-<code>~~CUMULUS&max=20&bgcolor=000000&distr=true&show=tags~~</code> 
- 
-{{http://cloud.github.com/downloads/HakanS/dokuwiki-plugin-cumulus/cumulus.png}} 
- 
-==== Configuration ==== 
- 
-All properties described above can also be set in the [[plugin:config|configuration manager]].  
- 
-**showtags** --- The plugin always includes all tags as standard HTML <a> links in a hidden <div> for SEO purposes but this setting decides if it should be visible as a "standard" tag cloud if the users browser doesn't support Flash 9 movies. The cloud will have same CSS class as the [[plugin:cloud]]. 
- 
-===== Comments ===== 
-This tiny [[plugins|plugin]] allows you to leave notes to yourself (and other authors of your wiki) in the wiki source code that won't be shown on the wiki page. The syntax is like C and PHP: 
- 
-**Example:** 
-<code> 
-The text /* between the slash-asterisk and asterisk-slash */ is hidden 
-</code> 
-**Becomes:** 
-  The text is hidden 
-\\ 
- 
-You can also have multi-line comments: 
-  /** 
-   * @todo: rewrite this section to reflect changes made recently 
-   * 
-   * this is a longer note 
-   */ 
- 
-But this single line example works too: 
- 
-  /********** added by Esther **********/ 
-===== note ===== 
-  <note> 
-  This is my note ! Remember it!! 
-  </note> 
-<note> 
-This is my note ! Remember it!! 
-</note> 
- 
-  <note important> 
-  Warning ! You're about to lose your mind ;-) 
-  </note> 
-<note important> 
-Warning ! You're about to lose your mind ;-) 
-</note> 
- 
-  <note tip> 
-  The clues are in the images. 
-  </note> 
-<note tip> 
-The clues are in the images. 
-</note> 
- 
-  <note warning> 
-  Beware of the dog when you open the door !! 
-  </note> 
-<note warning> 
-Beware of the dog when you open the door !! 
-</note> 
-===== Graphviz ===== 
-Any Graphviz compatible graph definition can be given with graphviz tags. 
- 
-The rendering engine can optionally be given as argument in the opening tag. Supported are dot, neato, twopi, circo and fdp with dot being the default. 
- 
-You can also specify left, center or right to align the resulting image. 
- 
-A parameter in the form of <number>x<number> is interpreted as wanted output size. 
- 
-<code> 
-<graphviz dot center 500x200> 
-digraph finite_state_machine { 
- rankdir=LR; 
- size="9,5" 
- node [shape = doublecircle]; LR_0 LR_3 LR_4 LR_8; 
- node [shape = circle]; 
- LR_0 -> LR_2 [ label = "SS(B)" ]; 
- LR_0 -> LR_1 [ label = "SS(S)" ]; 
- LR_1 -> LR_3 [ label = "S($end)" ]; 
- LR_2 -> LR_6 [ label = "SS(b)" ]; 
- LR_2 -> LR_5 [ label = "SS(a)" ]; 
- LR_2 -> LR_4 [ label = "S(A)" ]; 
- LR_5 -> LR_7 [ label = "S(b)" ]; 
- LR_5 -> LR_5 [ label = "S(a)" ]; 
- LR_6 -> LR_6 [ label = "S(b)" ]; 
- LR_6 -> LR_5 [ label = "S(a)" ]; 
- LR_7 -> LR_8 [ label = "S(b)" ]; 
- LR_7 -> LR_5 [ label = "S(a)" ]; 
- LR_8 -> LR_6 [ label = "S(b)" ]; 
- LR_8 -> LR_5 [ label = "S(a)" ]; 
-} 
-</graphviz> 
-</code> 
-<graphviz dot center 500x200> 
-digraph finite_state_machine { 
- rankdir=LR; 
- size="9,5" 
- node [shape = doublecircle]; LR_0 LR_3 LR_4 LR_8; 
- node [shape = circle]; 
- LR_0 -> LR_2 [ label = "SS(B)" ]; 
- LR_0 -> LR_1 [ label = "SS(S)" ]; 
- LR_1 -> LR_3 [ label = "S($end)" ]; 
- LR_2 -> LR_6 [ label = "SS(b)" ]; 
- LR_2 -> LR_5 [ label = "SS(a)" ]; 
- LR_2 -> LR_4 [ label = "S(A)" ]; 
- LR_5 -> LR_7 [ label = "S(b)" ]; 
- LR_5 -> LR_5 [ label = "S(a)" ]; 
- LR_6 -> LR_6 [ label = "S(b)" ]; 
- LR_6 -> LR_5 [ label = "S(a)" ]; 
- LR_7 -> LR_8 [ label = "S(b)" ]; 
- LR_7 -> LR_5 [ label = "S(a)" ]; 
- LR_8 -> LR_6 [ label = "S(b)" ]; 
- LR_8 -> LR_5 [ label = "S(a)" ]; 
-} 
-</graphviz> 
- 
-===== vshare ===== 
-The basic syntax looks like this: ''%%{{%%//videosite//>//videoid//?//size//|title%%}}%%''. Where ''//videosite//'' is one of the identifiers listed below, and ''//videoid//'' is the identifier of the video at the respective site. The ''//size//'' parameter is optional. You can either give it in the form ''//width//x//height//'' like ''500x300'', or use the keywords ''small'', ''medium'' or ''large''. The title is optional as well. The video can be aligned by adding spaces on the left or right inside the curly brackets (like in the image syntax). 
- 
-A toolbar button pops up a prompt where you can simply paste the full URL to the page of the video you want to embed. The plugin will then try to figure out the video ID by itself. 
- 
-==== Examples ==== 
- 
-Display a YouTube Video: 
- 
-  {{youtube>L-WM8YxwqEU}} 
- 
-Show a larger player: 
- 
-  {{youtube>L-WM8YxwqEU?large}} 
- 
-Right-align the player : 
- 
-  {{ youtube>L-WM8YxwqEU}} 
- 
-Show a small, centered player: 
- 
-  {{ youtube>L-WM8YxwqEU?small }} 
- 
-Show a small, centered player with a title: 
- 
-  {{ youtube>L-WM8YxwqEU?small |Some funny video}} 
- 
-==== Supported Services ==== 
- 
-^ Identifier  ^ Website  ^ Notes ^ 
-| 12seconds   | [[http://12seconds.tv|12 Seconds]]            | 
-| 5min        | [[http://www.5min.com/|5min]]                |  | 
-| bambuser    | [[http://bambuser.com|Bambuser]]             | The video ID is in the embed code, not in the URL | 
-| bliptv      | [[http://blip.tv/|Blip.TV]]                  | You get the correct id when choosing to embed for wordpress.com: {{gallery>:plugin:blipexample.png?lightbox}}| 
-| blogtv      | [[http://www.blogtv.com|BlogTV]]              | 
-| break       | [[http://www.break.com|Break]]               | The ID is in the embed code: {{gallery>:plugin:break.png?lightbox}} | 
-| clipfish    | [[http://www.clipfish.de/|Clipfish]]          | 
-| current     | [[http://www.current.com|Current]]            | 
-| dailymotion | [[http://www.dailymotion.com/|Daily Motion]] |  | 
-| googlevideo | [[http://video.google.com/|Google Video]]    |  | 
-| gtrailers   | [[http://www.gametrailers.com|GameTrailers]] |  | 
-| justintv    | [[http://justin.tv|Justin.TV]]                | 
-| metacafe    | [[http://www.metacafe.com/|MetaCafe]]        |  | 
-| myspacetv   | [[http://vids.myspace.com/|MySpaceTV]]        | 
-| rcmovie     | [[http://www.rcmovie.de|RCMovie]]            |  | 
-| revver      | [[http://www.revver.com/|Revver]]            |  | 
-| scivee      | [[http://scivee.tv|Scivee.tv]]                | 
-| sevenload   | [[http://www.sevenload.com/|Sevenload]]      |  | 
-| slideshare  | [[http://www.slideshare.com|Slideshare]]     | The ID is not in the URL. Choose "more share options" and use the ''doc'' parameter from the wordpress embed code: {{gallery>:plugin:slideshare.png?lightbox}} | 
-| stickam     | [[http://stickam.com|Stickam]]                | 
-| ustream     | [[http://ustream.tv|Ustream.TV]]              | 
-| veoh        | [[http://www.veoh.com/|Veoh]]                |  | 
-| viddler     | [[http://www.viddler.com|Viddler]]           | Use the wordpress.com embed code: {{gallery>:plugin:viddler.png?lightbox}} | 
-| vimeo       | [[http://www.vimeo.com/|Vimeo]]              | The video id is the number after http://vimeo.com/ | 
-| youtube     | [[http://www.youtube.com/|YouTube]]          |  | 
- 
-Additional sites can be added to the ''sites.conf'' file in the plugin directory. Video ID recognition patterns for the toolbar button are configured in ''sites.js''. 
- 
  
 ===== Syntax Plugins ===== ===== Syntax Plugins =====
wiki/syntax.1324050180.txt.gz · Last modified: 2021/08/14 04:20 (external edit)