Wiki source code of Sandbox

Version 23.12 by Jip-jan Alunkel on May 11, 15:16

Hide last authors
Jip-jan Alunkel 16.1 1
Jip-jan Alunkel 19.1 2 {{velocity}}
Jip-jan Alunkel 21.7 3 {{html}}
Jip-jan Alunkel 21.4 4
Jip-jan Alunkel 23.4 5 $doc.documentReference.extractReference('document')<br />
Jip-jan Alunkel 23.5 6 $xwiki.getURL($services.model.resolveDocument('', 'default', $doc.documentReference.extractReference('document')))<br />
Jip-jan Alunkel 23.7 7 $xwiki.getURL("xwiki:XWiki.XWikiLogin","loginsubmit")<br />
Jip-jan Alunkel 23.8 8 $doc.getURL('loginsubmit')<br />
Jip-jan Alunkel 23.7 9 /loginsubmit/XWiki/XWikiLogin<br />
Jip-jan Alunkel 21.5 10 current: $!{services.csrf.getToken()}<br />
Jip-jan Alunkel 21.7 11 #set($token = "$!{request.getParameter('form_token')}")
Jip-jan Alunkel 21.6 12 requested: $request.getParameter("$!{services.csrf.getToken()}")<br />
Jip-jan Alunkel 20.1 13 #if($xcontext.user != 'XWiki.XWikiGuest')
Jip-jan Alunkel 23.2 14 ##$escapetool.url($doc.getURL('view'))&${qs}
15 ##[logout>https://www.homeoworld.org/logout/XWiki/XWikiLogout?xredirect=%2FSandbox%2F]
16 ##[logout>https://www.homeoworld.org/logout/XWiki/XWikiLogout?xredirect=%2FSandbox%2F]
17
Jip-jan Alunkel 21.6 18 #*
19 * De gebruiker is ingelogd.
20 *
21 * --> Een logout link plaatsen
22 *#
Jip-jan Alunkel 23.2 23 #if($xcontext.inactiveUserReference)
24 <a href="$xwiki.getURL($xcontext.inactiveUserReference, 'view')" class="brand-user" id="tmUser">$!xwiki.getUserName($xcontext.inactiveUserReference, false)</a>
25 #else
26 <a href="$xwiki.getURL($xcontext.user, 'view')" class="brand-user" id="tmUser">$!xwiki.getUserName($xcontext.user, false)</a>
27 #end
28 <a href="$xwiki.getURL('XWiki.XWikiLogout', 'logout', "xredirect=$escapetool.url($xwiki.relativeRequestURL)")" id="tmLogout" rel="nofollow">$services.icon.renderHTML('log-out') $escapetool.xml($services.localization.render('logout'))</a>
29
Jip-jan Alunkel 21.6 30 ## #if($request.xredirect)
Jip-jan Alunkel 23.2 31 #set($requested = "$!(request.getParameter('${token}'))")
Jip-jan Alunkel 21.6 32 #if($requested == "xlogin")
Jip-jan Alunkel 20.5 33 #*
Jip-jan Alunkel 21.6 34 * De pagina is geladen t.g.v. submit van het login formulier. Aangezien de
35 * loginpagina in de header besloten ligt en daarmee dus beschikbaar is op
36 * iedere pagina is er geen noodzaak meer voor een redirect.
Jip-jan Alunkel 20.5 37 *
Jip-jan Alunkel 21.6 38 * --> Een bevestiging van login wordt gedaan.
Jip-jan Alunkel 20.5 39 *#
Jip-jan Alunkel 23.2 40
41
42
43
Jip-jan Alunkel 20.5 44 ## $response.sendRedirect($request.xredirect)
Jip-jan Alunkel 19.1 45 #end
46 #else
Jip-jan Alunkel 21.6 47 #*
48 * De gebruiker is niet ingelogd.
49 *
50 * --> Een login link plaatsen met het login formulier
51 *#
Jip-jan Alunkel 23.2 52 [Open login modal]
Jip-jan Alunkel 23.11 53
Jip-jan Alunkel 23.12 54 $xwiki.getURL("xwiki:XWiki.XWikiLogin","loginsubmit","fromlogin=true")
Jip-jan Alunkel 23.11 55
Jip-jan Alunkel 23.9 56 <form id="loginForm" action="$xwiki.getURL("xwiki:XWiki.XWikiLogin","loginsubmit")" method="post" class="xform">
Jip-jan Alunkel 21.6 57 <input type="hidden" name="$!{services.csrf.getToken()}" value="xlogin" />
58 #if($xcontext.user != 'XWiki.XWikiGuest')
59 <input type="hidden" name="logged_in" value="true" />
60 #end
Jip-jan Alunkel 23.10 61 <input type="hidden" name="xredirect" value="${xwiki.getURL($services.model.resolveDocument('', 'default', $doc.documentReference.extractReference('document')))}"/>
Jip-jan Alunkel 19.1 62 #if("$!request.srid" != '')
63 <input type="hidden" name="srid" value="$!escapetool.xml($request.srid)"/>
64 #end
65 <input type="hidden" name="form_token" value="$!{services.csrf.getToken()}"/>
Jip-jan Alunkel 18.1 66
Jip-jan Alunkel 19.1 67 #xwikimessageboxstart($services.localization.render('login') '')
68 #set($message = $xcontext.message)
69 #if($message)
70 <!-- previous login errors -->
71 #error($services.localization.render($message))
72 #end
73 #set($authFailureStrategyMessage = $services.security.authentication.getErrorMessage($request.j_username))
74 #if ("$!authFailureStrategyMessage" != '')
75 #error($authFailureStrategyMessage)
76 #end
77 #set ($supplementaryForm = $services.security.authentication.getForm($request.j_username))
78 <label for="j_username">$services.localization.render('username')</label>
79 #set ($forgotUsernameURL = $services.security.authentication.getAuthenticationURL('retrieveusername', $NULL))
80 #if("$!forgotUsernameURL" != "")
81 <span class="xAdditional"><a href="$forgotUsernameURL" tabindex="500">$services.localization.render('xe.admin.forgotUsername.loginMessage')</a></span>
82 #end
83 <span class="input-group">
84 <span class="input-group-addon">$services.icon.renderHTML('user')</span>
85 <input class="form-control" type="text" id="j_username" size="60" name="j_username" value="" tabindex="100"/>
86 </span>
87 <label for="j_password">$services.localization.render('password')</label>
88 #set ($resetPasswordUrl = $services.security.authentication.getAuthenticationURL('resetpassword', $NULL))
89 #if("$!resetPasswordUrl" != '')
90 <span class="xAdditional"><a href="$resetPasswordUrl" tabindex="600">$services.localization.render('xe.admin.passwordReset.loginMessage')</a></span>
91 #end
92 <span class="input-group">
93 <span class="input-group-addon">$services.icon.renderHTML('lock')</span>
94 <input type="password" id="j_password" size="60" name="j_password" value="" tabindex="200"/>
95 </span>
96 <label class="xHint" for="rememberme">
97 <input id="rememberme" type="checkbox" name="j_rememberme" value="true" tabindex="300"/> $services.localization.render('remembermeonthiscomp')
98 </label>
99 #if ("$!supplementaryForm" != "")
100 <div id="dedicated-auth-failures-field">
101 $supplementaryForm
102 </div>
103 #end
104 <input type="submit" class="btn btn-primary col-xs-12" value="$services.localization.render('login')" tabindex="400"/>
105 #xwikimessageboxend()
106 </form>
Jip-jan Alunkel 16.1 107
Jip-jan Alunkel 19.1 108 ## Ensure that the username field of the login form has the focus to make it easy for users to log in quickly
109 <script type="javascript">
110 //<![CDATA[
111 document.forms.loginForm.j_username.focus();
112 //]]>
113 </script>
Jip-jan Alunkel 21.6 114 ## #template("endpage.vm")
Jip-jan Alunkel 19.1 115 #end
Jip-jan Alunkel 21.4 116
117 {{/html}}
Jip-jan Alunkel 19.1 118 {{/velocity}}
119
120
Jip-jan Alunkel 1.1 121 The sandbox is a part of your wiki that you can freely modify. It's meant to let you practice editing. You will discover how page editing works and create new pages. Simply click on **Edit** to get started!
122
123 {{info}}
124 Don't worry about overwriting or losing stuff when editing the page, you can always roll back to the first version of the page from the "History" tab at the bottom of the page.
125 {{/info}}
126
127 If you want to give a look to the underlying [[XWiki Syntax>>XWiki.XWikiSyntax]], you can click on "Wiki code" in the "Show" menu or click on the "Source" tab when editing the page.
128
129 Here are a number of test pages you can play with:
130
131 * [[Sandbox Test Page 1>>Sandbox.TestPage1]]
132 * [[Sandbox Test Page 2>>Sandbox.TestPage2]]
133 * [[Sandbox Test Page 3>>Sandbox.TestPage3]]
134
135 Below is a demonstration of the [[XWiki Syntax>>XWiki.XWikiSyntax]] you can use in wiki pages (headings, images, tables).
136
137 = Headings =
138
139 XWiki offers 6 levels of headings. You can use them to structure your pages.
140
141 == Level 2 Heading ==
142
143 === Level 3 Heading ===
144
145 ==== Level 4 Heading 4 ====
146
147 ===== Level 5 Heading 5 =====
148
149 ====== Level 6 Heading 6 ======
150
151 = Styles =
152
153 Basic styles are supported in XWiki:
154
155 * **Text in Bold**
156 * //Text in Italics//
157 * __Text in Underline__
158 * --Text in Strikethrough--
159 * Text in ,,subscript,,
160 * Text in ^^superscript^^
161
162 = Lists =
163
164 You can create various types of lists in your wiki pages:
165
166 == Unordered list ==
167
168 * Level 1
169 ** Level 2
170 *** Level 3
171 ** Level 2
172 * Level 1
173
174 == Numbered list ==
175
176 1. Item
177 11. Subitem
178 111. Item
179 1. Subitem
180
181 == Mixed list ==
182
183 1. Item 1
184 11. Item 2
185 11*. Item 3
186 11*. Item 4
187 1. Item 5
188
189 = Tables =
190
191 You can create tables right into wiki pages:
192
193 == Table with headers in the top row ==
194
195 |= table header |= table header |= table header
196 | cell | cell | cell
197 | cell | cell | cell
198
199 == Table with headers in the top row and left column ==
200
201 |= table header |= table header |= table header
202 |= table header | cell | cell
203 |= table header | cell | cell
204
205 = Links =
206
207 XWiki allows you to create links to other pages in your wiki or on the web:
208
209 * [[WebHome]] -> links to the homepage of the current space
210 * [[Sandbox Home>>WebHome]] -> links can have labels
211 * [[Wiki Home>>Main.WebHome]] -> a link can use the SpaceName.PageName format to link to a page located in another space
212 * [[http://www.xwiki.org]] -> you can link to wiki pages or to external websites
213 * [[XWiki.org Website>>http://www.xwiki.org]] -> link labels work for exernal links too
214
215 You can also create links to attachments:
216
217 attach:XWikiLogo.png
218
219 = Images =
220
221 You can insert images in your wiki pages:
222
Jip-jan Alunkel 13.1 223 [[image:XWikiLogo.png]]
Jip-jan Alunkel 1.1 224
225 = Macros =
226
227 Macros allow you to make wiki content look better and to add additional features to your wiki. Here are 2 examples of how macros can be used in wiki pages:
228
229 == Warning Macro ==
230
231 This macro allows you to draw users' attention to a specific piece of information:
232
233 == Table of Contents ==
234
235 This macro automatically generates a table of contents of your wiki page based on headings:
236
237 {{toc/}}