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 [2021/01/23 08:55]
127.0.0.1 external edit
wiki:syntax [2022/12/26 22:24]
timotej removed many sections irrelevant to illwiki
Line 2: Line 2:
  
 [[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. [[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.
 +
 +===== Dominions Hover-links ===== 
 +
 +Inspector-like pop-ups on hover work for units, items and spells.
 +
 +^ Wiki syntax ^ Result ^
 +|<nowiki>??Frost Brand??</nowiki>|??Frost Brand??|
 +|<nowiki>??Gaia's Blessing??</nowiki>|??Gaia's Blessing??|
 +|<nowiki>??Commander??</nowiki>|??Commander??|
 +|<nowiki>??Manco-Ocllo - First Couple??</nowiki>|??Manco-Ocllo - First Couple??|
 +
 +Some different units have the same name. You can optionally supply the unit ID to specify which one to show, as follows. You can find the unit ID in-game or in the Inspector.
 +
 +^ Wiki syntax ^ Result ^
 +|<nowiki>??Camazotz#2681??</nowiki>|??Camazotz#2681??|
 +|<nowiki>??Camazotz#2719??</nowiki>|??Camazotz#2719??|
 +|<nowiki>??Camazotz#2754??</nowiki>|??Camazotz#2754??|
 +
 +===== Dominions Icons Shorthands ===== 
 +
 +There are abbreviations available for many common patterns and images in the wiki. Most are listed in the table below.
 +
 +^ Magic Paths ^^
 +|<nowiki>{{path>F1}}</nowiki>|{{path>F1}}|
 +|<nowiki>{{path>F2A2R13}}</nowiki>|{{path>F2A2R13}}|
 +|<nowiki>{{path>H1E2N2,10%FEDN}}</nowiki>|{{path>H1E2N2,10%FEDN}}|
 +|<nowiki>{{path>H1E2N2,100%FEDN,10%FEDN}}</nowiki>|{{path>H1E2N2,100%FEDN,10%FEDN}}|
 +|<nowiki>{{path>200%FES}}</nowiki>|{{path>200%FES}}|
 +^ Gems ^^
 +|<nowiki>{{gems>1F}}</nowiki>|{{gems>1F}}|
 +|<nowiki>{{gems>100S}}</nowiki>|{{gems>100S}}|
 +|<nowiki>{{gems>F}}</nowiki>|{{gems>F}}|
 +|<nowiki>{{gems>1F1W1A1E1S1N1D1B}}</nowiki>|{{gems>1F1W1A1E1S1N1D1B}}|
 +|<nowiki>{{gems>1.5F}}</nowiki>|{{gems>1.5F}}|
 +^ Scales ^^
 +|<nowiki>{{scales>O2P3H3G3L3M3}}</nowiki>|{{scales>O2P3H3G3L3M3}}|
 +|<nowiki>{{scales>Dom3O2P3H3G3L3M3}}</nowiki>|{{scales>Dom3O2P3H3G3L3M3}}|
 +|<nowiki>{{scales>T2S3C3D3M3D3}}</nowiki>|{{scales>T2S3C3D3M3D3}}|
 +|<nowiki>{{scales>Dr3De3Mf3Ma3}}</nowiki>|{{scales>Dr3De3Mf3Ma3}}|
 +|<nowiki>{{order}}</nowiki>|{{order}}|
 +|<nowiki>{{turmoil}}</nowiki>|{{turmoil}}|
 +|<nowiki>{{productivity}}</nowiki>|{{productivity}}|
 +|<nowiki>{{sloth}}</nowiki>|{{sloth}}|
 +|<nowiki>{{heat}}</nowiki>|{{heat}}|
 +|<nowiki>{{cold}}</nowiki>|{{cold}}|
 +|<nowiki>{{growth}}</nowiki>|{{growth}}|
 +|<nowiki>{{death}}</nowiki>|{{death}}|
 +|<nowiki>{{luck}}</nowiki>|{{luck}}|
 +|<nowiki>{{misfortune}}</nowiki>|{{misfortune}}|
 +|<nowiki>{{magic}}</nowiki>|{{magic}}|
 +|<nowiki>{{drain}}</nowiki>|{{drain}}|
 +^ Other frequently used images^^
 +|<nowiki>{{gold}}</nowiki>|{{gold}}|
 +|<nowiki>{{resources}}</nowiki>|{{resources}}|
 +|<nowiki>{{recpoints}}</nowiki>|{{recpoints}}|
  
 ===== Basic Text Formatting ===== ===== Basic Text Formatting =====
Line 68: Line 123:
   * When a section's heading is changed, its bookmark changes, too. So don't rely on section linking too much.   * When a section's heading is changed, its bookmark changes, too. So don't rely on section linking too much.
  
-==== Interwiki ==== 
- 
-DokuWiki supports [[doku>Interwiki]] links. These are quick links to other Wikis. For example this is a link to Wikipedia's page about Wikis: [[wp>Wiki]]. 
- 
-  DokuWiki supports [[doku>Interwiki]] links. These are quick links to other Wikis. 
-  For example this is a link to Wikipedia's page about Wikis: [[wp>Wiki]]. 
- 
-==== Windows Shares ==== 
- 
-Windows shares like [[\\server\share|this]] are recognized, too. Please note that these only make sense in a homogeneous user group like a corporate [[wp>Intranet]]. 
- 
-  Windows Shares like [[\\server\share|this]] are recognized, too. 
- 
-Notes: 
- 
-  * 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/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 
-/** 
- * Customization of the english language file 
- * Copy only the strings that needs to be modified 
- */ 
-$lang['js']['nosmblinks'] = ''; 
-</code> 
  
 ==== Image Links ==== ==== Image Links ====
Line 137: Line 168:
 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:           {{https://secure.php.net/images/php.gif?200x50}}+Resized external image:           {{http://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:           {{https://secure.php.net/images/php.gif?200x50}}+  Resized external image:           {{http://php.net/images/php.gif?200x50}}
  
  
Line 374: Line 405:
   </nowiki>   </nowiki>
   The same is true for %%//__this__ text// with a smiley ;-)%%.   The same is true for %%//__this__ text// with a smiley ;-)%%.
- 
-===== Code Blocks ===== 
- 
-You can include code blocks into your documents by either indenting them by at least two spaces (like used for the previous examples) or by using the tags ''%%<code>%%'' or ''%%<file>%%''. 
- 
-  This is text is indented by two spaces. 
- 
-<code> 
-This is preformatted code all spaces are preserved: like              <-this 
-</code> 
- 
-<file> 
-This is pretty much the same, but you could use it to show that you quoted a file. 
-</file> 
- 
-Those blocks were created by this source: 
- 
-    This is text is indented by two spaces. 
- 
-  <code> 
-  This is preformatted code all spaces are preserved: like              <-this 
-  </code> 
- 
-  <file> 
-  This is pretty much the same, but you could use it to show that you quoted a file. 
-  </file> 
- 
-==== 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 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> 
-/** 
- * The HelloWorldApp class implements an application that 
- * simply displays "Hello World!" to the standard output. 
- */ 
-class HelloWorldApp { 
-    public static void main(String[] args) { 
-        System.out.println("Hello World!"); //Display the string. 
-    } 
-} 
-</code> 
- 
-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 d 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 q 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 ==== 
- 
-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> 
-<file php myexample.php> 
-<?php echo "hello world!"; ?> 
-</file> 
-</code> 
- 
-<file php myexample.php> 
-<?php echo "hello world!"; ?> 
-</file> 
- 
-If you don't want any highlighting but want a downloadable file, specify a dash (''-'') as the language code: ''%%<code - myfile.foo>%%''. 
- 
- 
-===== Embedding HTML and PHP ===== 
- 
-You can embed raw HTML or PHP code into your documents by using the ''%%<html>%%'' or ''%%<php>%%'' tags. (Use uppercase tags if you need to enclose block level elements.) 
- 
-HTML example: 
- 
-<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> 
-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> 
- 
-PHP example: 
- 
-<code> 
-<php> 
-echo 'The PHP version: '; 
-echo phpversion(); 
-echo ' (generated inline HTML)'; 
-</php> 
-<PHP> 
-echo '<table class="inline"><tr><td>The same, but inside a block level element:</td>'; 
-echo '<td>'.phpversion().'</td>'; 
-echo '</tr></table>'; 
-</PHP> 
-</code> 
- 
-<php> 
-echo 'The PHP version: '; 
-echo phpversion(); 
-echo ' (inline HTML)'; 
-</php> 
-<PHP> 
-echo '<table class="inline"><tr><td>The same, but inside a block level element:</td>'; 
-echo '<td>'.phpversion().'</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. 
- 
-===== RSS/ATOM Feed Aggregation ===== 
-[[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 ^ 
-| 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>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). | 
- 
-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:** 
- 
-  {{rss>http://slashdot.org/index.rss 5 author date 1h }} 
- 
-{{rss>http://slashdot.org/index.rss 5 author date 1h }} 
  
  
 ===== Control Macros ===== ===== Control Macros =====
  
-Some syntax influences how DokuWiki renders a page without creating any output it self. The following control macros are availble:+Some syntax influences how DokuWiki renders a page without creating any output it self. The following control macros are available:
  
 ^ Macro           ^ Description | ^ Macro           ^ Description |
 | %%~~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 |
 +| %%~~REDIRECT>Some other page~~%% | Makes the current page into a redirect to the other named page. |
  
 ===== Syntax Plugins ===== ===== Syntax Plugins =====
wiki/syntax.txt · Last modified: 2022/12/26 22:24 by timotej