1= Sample Page for Wiki Markup =
2
3
4== General Notes ==
5
6The markup uses the [http://www.mediawiki.org/ Mediawiki] style.
7
8All text is entered as plain text, and will be converted to HTML entities as \
9necessary.  This means that <tt><</tt>, <tt>></tt>, <tt>&</tt>, and so on are converted for \
10you (except in special situations where the characters are Wiki markup; \
11the Wiki is generally smart enough to know when to convert and when not to).
12
13Just hit "return" twice to make a paragraph break.  If you want \
14to keep the same logical line but have to split it across \
15two physical lines (such as when your editor only shows a certain number \
16of characters per line), end the line with a backslash <tt>\</tt> and hit \
17return once.  This will cause the two lines to be joined on display, and the \
18backslash will not show.  (If you end a line with a backslash and a tab \
19or space, it will ''not'' be joined with the next line, and the backslash \
20will be printed.)
21
22
23== Inline Formatting ==
24
25{|
26| <tt><nowiki>''emphasis text''</nowiki></tt>
27| ''emphasis text''
28|-
29| <tt><nowiki>'''strong text'''</nowiki></tt>
30| '''strong text'''
31|-
32| <tt><nowiki>'''''emphasis and strong'''''</nowiki></tt>
33| '''''emphasis and strong'''''
34|-
35| <tt><nowiki><tt>teletype text</tt></nowiki></tt>
36| <tt>teletype text</tt>
37|-
38| <tt><nowiki><sub>subscript</sub> text</nowiki></tt>
39| <sub>subscript</sub> text
40|-
41| <tt><nowiki><sup>superscript</sup> text</nowiki></tt>
42| <sup>superscript</sup> text
43|}
44
45== Literal Text ==
46
47If you don't want the wiki to parse some text, enclose it in <tt><nowiki><nowiki>...</nowiki></nowiki></tt> tags.
48
49<code>
50This ''text'' gets '''parsed'''.
51
52<nowiki>This ''text'' does not get '''parsed'''.</nowiki>
53</code>
54
55This ''text'' gets '''parsed'''.
56
57<nowiki>This ''text'' does not get '''parsed'''.</nowiki>
58
59
60== Comments ==
61
62You can add comments to the page source code using the following markup. These comments won't be rendered in the page's output.
63
64<code>
65<!-- Some comment -->
66</code>
67
68<!-- Some comment -->
69
70
71== Headings ==
72
73You can make various levels of heading by putting \
74plus-signs before the text (all on its own line):
75
76<code>
77=== Level 3 Heading ===
78==== Level 4 Heading ====
79===== Level 5 Heading =====
80====== Level 6 Heading ======
81</code>
82
83=== Level 3 Heading ===
84==== Level 4 Heading ====
85===== Level 5 Heading =====
86====== Level 6 Heading ======
87
88
89== Table of Contents ==
90
91To create a list of every heading, with a link to that heading, put a table of contents tag on its own line.
92
93<code>
94[[toc]]
95</code>
96
97
98== Horizontal Rules ==
99
100Use four dashes (<tt><nowiki>----</nowiki></tt>) to create a horizontal rule.
101
102----
103
104
105== Lists ==
106
107
108=== Bullet Lists ===
109
110You can create bullet lists by starting a paragraph with one or \
111more asterisks.
112
113<code>
114* Bullet one
115** Sub-bullet
116</code>
117
118* Bullet one
119** Sub-bullet
120
121
122=== Numbered Lists ===
123
124Similarly, you can create numbered lists by starting a paragraph \
125with one or more hashes.
126
127<code>
128# Numero uno
129# Number two
130## Sub-item
131</code>
132
133# Numero uno
134# Number two
135## Sub-item
136
137
138=== Mixing Bullet and Number List Items ===
139
140You can mix and match bullet and number lists:
141
142<code>
143# Number one
144** Bullet
145** Bullet
146# Number two
147** Bullet
148** Bullet
149*** Sub-bullet
150#### Sub-sub-number
151#### Sub-sub-number
152# Number three
153** Bullet
154** Bullet
155</code>
156
157# Number one
158** Bullet
159** Bullet
160# Number two
161** Bullet
162** Bullet
163*** Sub-bullet
164#### Sub-sub-number
165#### Sub-sub-number
166# Number three
167** Bullet
168** Bullet
169
170
171=== Definition Lists ===
172
173You can create a definition (description) list with the following syntax:
174
175<code>
176;Item 1
177:Something
178;Item 2
179:Something else
180</code>
181
182;Item 1
183:Something
184;Item 2
185:Something else
186
187
188== Block Quotes ==
189
190You can mark a blockquote by starting a line with one or more '>' \
191characters, followed by a space and the text to be quoted.
192
193<code>
194This is normal text here.
195
196: Indent me! The quick brown fox jumps over the lazy dog. \
197Now this the time for all good men to come to the aid of \
198their country. Notice how we can continue the block-quote \
199in the same "paragraph" by using a backslash at the end of \
200the line.
201
202: Another block, leading to...
203:: Second level of indenting.  This second is indented even \
204more than the previous one.
205
206Back to normal text.
207</code>
208
209This is normal text here.
210
211: Indent me! The quick brown fox jumps over the lazy dog. \
212Now this the time for all good men to come to the aid of \
213their country. Notice how we can continue the block-quote \
214in the same "paragraph" by using a backslash at the end of \
215the line.
216
217: Another block, leading to...
218:: Second level of indenting.  This second is indented even \
219more than the previous one.
220
221Back to normal text.
222
223
224== Links and Images ==
225
226
227=== Wiki Links ===
228
229You can create page links by putting the name in brackets.
230
231<code>
232[[Wiki/Page]]
233</code>
234
235[[Wiki/Page]]
236
237You can also use this format to create a "described" or "labeled" link or to add an anchor target.
238
239<code>
240[[Wiki/Page#anchor|Descriptive text for the link.]]
241</code>
242
243[[Wiki/Page#anchor|Descriptive text for the link.]]
244
245
246=== URLs ===
247
248Create a remote link simply by typing its URL: http://www.horde.org.
249
250If you like, enclose it in brackets to create a numbered reference \
251and avoid cluttering the page; <tt><nowiki>[http://www.horde.org/]</nowiki></tt> becomes [http://www.horde.org/].
252
253''Rendering of URLs as numbers is broken as of Text_Wiki 1.2.1.''
254
255Or you can have a described-reference instead of a numbered reference:
256
257<code>
258[http://www.horde.org Horde]
259</code>
260
261[http://www.horde.org Horde]
262
263
264=== Images ===
265
266You can put a picture in a page with <tt><nowiki>[[Image:foo.jpg]]</nowiki></tt>. You can use any file type, but most browsers only support GIF, JPEG, and PNG formats. The filename can either be a relative reference (in which case the wiki looks for a file attached to the current page - or a different wiki page if the file name is prefixed with a page name, e.g. <tt><nowiki>[[Image:SomePage:foo.jpg]]</nowiki></tt>), an absolute reference which begins with a slash (in which case the wiki uses it to retrieve a file relative to the web server's root), or a full, external URL.
267
268Additional "alt", "width", and "height" attributes can follow the image filename or URL like so: <tt><nowiki>[[Image:foo.jpg|A Foo JPEG|WIDTHxHEIGHTpx]]</nowiki></tt>.
269
270
271== Application Content ==
272
273=== Application Blocks ===
274
275Content from other Horde applications provided by portal blocks can be embedded into a page using <tt><nowiki>[[block]]</nowiki></tt> tags.
276
277To include Horde's moon phases block for example:
278
279<code>
280[[block horde/Moon phase=next hemisphere=northern]]
281</code>
282
283[[block horde/Moon phase=next hemisphere=northern]]
284
285=== Application Links ===
286
287Links to other Horde applications is supported if those applications support API links. The Wiki itself supports such an API to link to individual wiki pages:
288
289<code>
290[[link Link to some other wiki page|wiki/show page=Wiki/Page]]
291</code>
292
293[[link Link to some other wiki page|wiki/show page=Wiki/Page]]
294
295
296== Code Blocks ==
297
298Create code blocks by using <tt>code</tt> tags (each on its own line).
299
300<code>
301This is an example code block!
302</code>
303
304To create PHP blocks that get automatically colorized when you use PHP tags, simply surround the code with <tt>code type="php"</tt> tags (the tags themselves should each be on their own lines, and no need for the <tt><?php ... ?></tt> tags).
305
306<code>
307 <code type="php">
308 // Set up the wiki options
309 $options = array();
310 $options['view_url'] = "index.php?page=";
311
312 // load the text for the requested page
313 $text = implode('', file($page . '.wiki.txt'));
314
315 // create a Wiki objext with the loaded options
316 $wiki = new Text_Wiki($options);
317
318 // transform the wiki text.
319 echo $wiki->transform($text);
320 </code>
321</code>
322
323<code type="php">
324// Set up the wiki options
325$options = array();
326$options['view_url'] = "index.php?page=";
327
328// load the text for the requested page
329$text = implode('', file($page . '.wiki.txt'));
330
331// create a Wiki objext with the loaded options
332$wiki = new Text_Wiki($options);
333
334// transform the wiki text.
335echo $wiki->transform($text);
336</code>
337
338API references can be generated using <tt><function></tt> tags.
339
340<code>
341<function>
342name:listUsers
343access:public
344param:string,Filter users by this string.,'USER'
345returns:array
346throws:Exception,if user backend not available.
347</function>
348</code>
349
350''Rendering of this rule is broken as of Text_Wiki 1.2.1, usage is discouraged.''
351
352
353== Tables ==
354
355You can create tables using pairs of vertical bars:
356
357<code>
358{|
359! Heading one !! Heading two
360|-
361| cell one || cell two
362|-
363| colspan="2" | big ol' line
364|-
365| cell four || cell five
366|-
367| cell six || here's a very long cell
368|}
369</code>
370
371{|
372! Heading one !! Heading two
373|-
374| cell one || cell two
375|-
376| colspan="2" | big ol' line
377|-
378| cell four || cell five
379|-
380| cell six || here's a very long cell
381|}
382
383<code>
384{|
385| lines must start || with a vertical bar || and a dash
386|-
387| cells are separated by || double vertical bars || nothing
388|-
389| or by starting the new
390| cell on a new line
391| with a vertical bar
392|-
393| colspan="2" | you can span multiple columns by || starting the cell
394|-
395| with a colspan || colspan="2" |  attribute
396|-
397| colspan="3" | but perhaps an example is the easiest way to see
398|}
399</code>
400
401{|
402| lines must start || with a vertical bar || and a dash
403|-
404| cells are separated by || double vertical bars || nothing
405|-
406| or by starting the new
407| cell on a new line
408| with a vertical bar
409|-
410| colspan="2" | you can span multiple columns by || starting the cell
411|-
412| with a colspan || colspan="2" |  attribute
413|-
414| colspan="3" | but perhaps an example is the easiest way to see
415|}
416