User Tools

Site Tools


usage: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
usage:syntax [2008/04/15 13:23]
wkunert
usage:syntax [2011/09/09 14:53] (current)
andreasreiter [Formatting Syntax]
Line 1: Line 1:
 ====== Formatting Syntax ====== ====== Formatting Syntax ======
  
-[[http://wiki.splitbrain.org/wiki:dokuwiki|Dokuwiki]] supports some simple markup language, which tries to make the datafiles to be as readable as possible. This page contains <del>all</del> most 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 bottom of the page. If you want to try something, just use the [[usage:sandbox|sandbox]] page. The simpler markup is easily accessible via [[usage:syntax#quickbuttons|quickbuttons]], too.+[[http://wiki.splitbrain.org/wiki:dokuwiki|Dokuwiki]] supports some simple markup language, which tries to make the datafiles to be as readable as possible. This page contains <del>all</del> most 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 bottom of the page. If you want to try something, just use the [[usage:sandbox:overview|sandbox]] page. The simpler markup is easily accessible via [[usage:syntax#quickbuttons|quickbuttons]], too. 
 + 
 +===== Quickbuttons ===== 
 + 
 +The Editing-Toolbar is based upon the one from [[wpmeta>MediaWiki]]. It becomes visible above the editbox automatically if your Browser is capable of the **//needed//** JavaScript. They work pretty much like the formatting buttons in your favourite word processor. In Mozilla and IE you can select a word and press a button to format theselected word. If you **click without** a //selection//, it inserts sample text at the cursor. 
 + 
 +Browsers without support to insert at the current cursor position will add the string to the end of the edit box. 
 + 
 +Most buttons have accesskeys assigned to them, too. 
 + 
 +^ Button ^ Key ^ Function ^ 
 +|  {{http://wiki.splitbrain.org/lib/images/toolbar/bold.png?nolink}}      ''**b**''  | bold formatting | 
 +|  {{http://wiki.splitbrain.org/lib/images/toolbar/italic.png?nolink}}    ''**i**''  | italic formatting | 
 +|  {{http://wiki.splitbrain.org/lib/images/toolbar/underline.png?nolink}}  |  ''**u**''  | underlined formatting | 
 +|  {{http://wiki.splitbrain.org/lib/images/toolbar/strike.png?nolink}}    ''**d**''  | strikethrough formatting | 
 +|  {{http://wiki.splitbrain.org/lib/images/toolbar/h1.png?nolink}}    ''**1**''  | size 1 headline | 
 +|  {{http://wiki.splitbrain.org/lib/images/toolbar/h2.png?nolink}}    ''**2**''  | size 2 headline | 
 +|  {{http://wiki.splitbrain.org/lib/images/toolbar/h3.png?nolink}}    ''**3**''  | size 3 headline | 
 +|  {{http://wiki.splitbrain.org/lib/images/toolbar/h4.png?nolink}}    ''**4**''  | size 4 headline | 
 +|  {{http://wiki.splitbrain.org/lib/images/toolbar/h5.png?nolink}}    ''**5**''  | size 5 headline | 
 +|  {{http://wiki.splitbrain.org/lib/images/toolbar/link.png?nolink}}      ''**l**''  | link formatting | 
 +|  {{http://wiki.splitbrain.org/lib/images/toolbar/linkextern.png?nolink}}  |           | external link formatting | 
 +|  {{http://wiki.splitbrain.org/lib/images/toolbar/ol.png?nolink}}               | ordered list item | 
 +|  {{http://wiki.splitbrain.org/lib/images/toolbar/ul.png?nolink}}  |           | unordered list item | 
 +|  {{http://wiki.splitbrain.org/lib/images/toolbar/hr.png?nolink}}               | horizontal rule | 
 +|  {{http://wiki.splitbrain.org/lib/images/toolbar/image.png?nolink}}    |           | Media Selection | 
 +|  {{http://wiki.splitbrain.org/lib/images/toolbar/smiley.png?nolink}}      |  | smiley picker | 
 +|  {{http://wiki.splitbrain.org/lib/images/toolbar/chars.png?nolink}}      |  | character picker | 
 +|  {{http://wiki.splitbrain.org/lib/images/toolbar/sig.png?nolink}}      |  ''**y**''  | signature (only when logged in)| 
  
 ===== Basic text formatting ===== ===== Basic text formatting =====
Line 9: Line 38:
   DokuWiki supports **bold**, //italic//, __underlined__ and ''monospaced'' texts.   DokuWiki supports **bold**, //italic//, __underlined__ and ''monospaced'' texts.
   Of course you can **__//''combine''//__** all these.   Of course you can **__//''combine''//__** all these.
 +
 +You can also <color orange>colourise</color> your text.
 +
 +  You can also <color orange>colourise</color> your text.
 +  
 +Following colours are available:
 +  * <color black>black</color>
 +  * <color navy>navy</color>
 +  * <color blue>blue</color>
 +  * <color green>green</color>
 +  * <color teal>teal</color>
 +  * <color lime>aqua</color>
 +  * <color maroon>maroon</color>
 +  * <color purple>purple</color>
 +  * <color olive>olive</color>
 +  * <color gray>gray</color>
 +  * <color silver>silver</color>
 +  * <color red>red</color>
 +  * <color fuchsia>fuchsia</color>
 +  * <color yellow>yellow</color>
 +  * <color white>white</color> (white)
 +  * <color orange>orange</color>
  
 You can use <sub>subscript</sub> and <sup>superscript</sup>, too. You can use <sub>subscript</sub> and <sup>superscript</sup>, too.
Line 326: Line 377:
  
  
-===== RSS/ATOM Feed Aggregation ===== +===== Picture Gallery =====
-[[DokuWiki]] can integrate data from external XML feeds. For parsing the XML feeds, [[http://simplepie.org/|SimplePie]] is used. All formats understood by SimplePie can be used in DokuWiki as well. You can influence the rendering by multiple additional space separated parameters:+
  
-^ Parameter  ^ Description ^ +A basic gallery can be added by selecting a [[namespace]] like this:
-| any number | will be used as maximum number items to show, defaults to 8 | +
-| reverse    | display the last items in the feed first | +
-| author     | show item authors names | +
-| date       | show item dates | +
-| description| show the item description. If [[doku>wiki:config#htmlok|HTML]] is disabled all tags will be stripped | +
-| //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. [[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 [[DokuWiki]] to re-render the page if it is more than //refresh period// since the page was last rendered.+  {{gallery>namespace}}
  
-**Example:**+All imagefiles in the selected namespace will be added to the image gallery. Notethose images need to be a valid [[pagename]], eg. all lowercase.
  
-  {{rss>http://slashdot.org/index.rss 5 author date 1h }}+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).
  
-{{rss>http://slashdot.org/index.rss 5 author date 1h }}+  {{gallery>namespace:someimage.jpg}}
  
 +The created gallery can be aligned by using whitespace (defaults to centered):
  
-===== Embedding HTML and PHP =====+  {{gallery> namespace}} (right aligned) 
 +  {{gallery>namespace }} (left aligned) 
 +  {{gallery> namespace }} (centered)
  
-You can embed raw HTML or PHP code into your documents by using the ''html'' or ''php'' tags like this: +You can define the wanted thumbnail size by adding its dimension as parameter:
-<code> +
-<html> +
-This is some <span style="color:red;font-size:150%;">inline HTML</span> +
-</html> +
-<HTML> +
-<p style="border:2px dashed red;">And this is some block HTML</p> +
-</HTML> +
-</code>+
  
-<html> +  {{gallery>namespace?150x150}}
-This is some <span style="color:red;font-size:150%;">inline HTML</span> +
-</html> +
-<HTML> +
-<p style="border:2px dashed red;">And this is some block HTML</p> +
-</HTML>+
  
-<code> +The default is a dimension of 120x120 pixels. 
-<php+ 
-echo 'A logo generated by PHP:'+You can define the number of columns as well: 
-echo '<img src=". $_SERVER['PHP_SELF'] . '?=. php_logo_guid(. '" alt="PHP Logo !" />'; + 
-echo '(generated inline HTML)'; +  {{gallery>namespace?6}} 
-</php> + 
-<PHP+The default number of columns is 5 and can be configured in the config manager. If you specify a 0 no table is used instead all thumbnails are added in a sequence. 
-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>'; +To have the filename displayed below the thumbnails add the ''showname'' parameter (if this is made the default in the config, you may disable it with ''noshowname'')
-echo '</tr></table>'; + 
-</PHP> +  {{gallery>namespace?showname}} 
-</code>+ 
 +If you want the files sorted in the reverse order use the ''reverse'keyword (if this is made the default in the config, you may disable it with ''noreverse''): 
 + 
 +  {{gallery>namespace?reverse}} 
 + 
 +If you don't want to link to the image detail pages but directly to the image itself use the ''direct'' parameter (if this is made the default in the config, you may disable it with ''nodirect''): 
 + 
 +  {{gallery>namespace?direct}} 
 + 
 +For fancy JavaScript based inline browsing of the images use the ''lightbox'' keyword ((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)). This feature implicitly sets the direct parameter. If this is made the default in the config, you may disable it with ''nolightbox''. 
 + 
 +  {{gallery>namespace?lightbox}} 
 + 
 +All params can be combined: 
 + 
 +  {{gallery>namespace?150x150&6&showname}} 
 + 
 +You can also specify the size of lightbox images. It is done the same way as with thumbnails, except using a capital 'X'. The default is 800X600. 
 + 
 +  {{gallery>namespace?lightbox&500X400}} 
 + 
 + 
 +IMPORTANT: When you have added your pictures they may not show up in the gallery: add '&purge=trueto the end of the URL to clear the cache - and then you should see them. 
 + 
 +=== About the Lightbox mode === 
 + 
 +This mode will open the clicked picture inside the current browser window without leaving the current pageYou 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 | 
 + 
 +The Lightbox feature will also be used for all images embedded using the standard DokuWiki image syntax and having set the ''direct'' parameter. This behavior can easily be disabled by changing the ''lightboxForEveryImg'' variable to ''0'' at the very top of the ''script.js'' file. 
 + 
 +More info at :[[http://www.dokuwiki.org/plugin:gallery|DokuWiki-Gallery]] 
 + 
 +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.
  
-<php> 
-echo 'A logo generated by PHP:'; 
-echo '<img src="' . $_SERVER['PHP_SELF'] . '?=' . php_logo_guid() . '" alt="PHP Logo !" />'; 
-echo '(inline HTML)'; 
-</php> 
-<PHP> 
-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 '</tr></table>'; 
-</PHP> 
  
-**Please Note**: HTML and PHP embedding is disabled by default in the configuration. If disabled, the code is displayed instead of executed. 
  
-===== Control Macros ===== 
  
-Some syntax influences how DokuWiki renders a page without creating any output it self. The following control macros are availble: 
  
-^ Macro           ^ Description | 
-| %%~~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 | 
  
-===== Syntax Plugins ===== 
  
-DokuWiki's syntax can be extended by [[doku>wiki:plugins|Plugins]]. How the installed plugins are used is described on their appropriate description pages. The following syntax plugins are available in this particular DokuWiki installation: 
  
-~~INFO:syntaxplugins~~ 
  
usage/syntax.1208258586.txt.gz · Last modified: 2010/02/01 21:35 (external edit)