Changes for page Sandbox

Last modified by Drunk Monkey on 2024-05-02 05:56

From version 1.1
edited by Drunk Monkey
on 2020-04-11 15:52
Change comment: Install extension [org.xwiki.platform:xwiki-platform-sandbox/12.2.1]
To version 27.1
edited by Drunk Monkey
on 2024-05-02 05:53
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,3 +1,84 @@
1 += rss macro =
2 +
3 +{{rss feed="https://nitter.net/I_Am_The_ICT/with_replies/rss" content="false" css="true" image="false" decoration="true"/}}
4 +
5 += Quagmyre =
6 +
7 +Quagmyre
8 +
9 +External Link ([[good>>https://files.quagmyre.com/index.html]])
10 +
11 +External Link ([[bad>>https://files.quagmyre.com/nosuchfile.html]])
12 +
13 +Linkchecker: [[here>>XWiki.ExternalLinks]]
14 +
15 +Non existing [[internal link>>notexist||style="outline-width: 0px !important; user-select: auto !important;"]] test
16 +
17 +== lc queue size ==
18 +
19 +{{groovy}}
20 +import com.xpn.xwiki.web.*
21 +import org.xwiki.rendering.transformation.*
22 +
23 +def checker = Utils.getComponent(Transformation.class, "linkchecker")
24 +
25 +print "Link checker queue size = ${checker.linkQueue.size()}"
26 +{{/groovy}}
27 +
28 +
29 +== lc invalid links ==
30 +
31 +{{groovy}}
32 +import groovy.util.logging.*
33 +import org.xwiki.observation.*
34 +import org.xwiki.observation.event.*
35 +import org.xwiki.rendering.transformation.linkchecker.*
36 +import com.xpn.xwiki.web.*
37 +import com.xpn.xwiki.*
38 +
39 +@Log
40 +class MyLinkListener implements EventListener
41 +{
42 + def xwiki
43 + def context
44 +
45 + MyLinkListener(xwiki, context)
46 + {
47 + this.xwiki = xwiki
48 + this.context = context
49 + }
50 +
51 + String getName()
52 + {
53 + return "myLinkListener"
54 + }
55 +
56 + List<Event> getEvents()
57 + {
58 + return Arrays.asList(new InvalidURLEvent())
59 + }
60 +
61 + void onEvent(Event event, Object eventSource, Object data)
62 + {
63 + def url = eventSource.get("url")
64 + def source = eventSource.get("source")
65 + def state = eventSource.get("state")
66 +
67 + log.info("Error for {url} in ${source} - Response code: ${state.getResponseCode()} - Checked: ${String.format('%tF %<tT', state.getLastCheckedTime())}")
68 + }
69 +}
70 +
71 +// Register against the Observation Manager
72 +def observation = Utils.getComponent(ObservationManager.class)
73 +observation.removeListener("myLinkListener")
74 +def listener = new MyLinkListener(xwiki, xcontext)
75 +observation.addListener(listener)
76 +{{/groovy}}
77 +
78 +
79 +
80 +Glossary test: {{glossaryReference glossaryId="Glossary" entryId="OTE"}}OTE{{/glossaryReference}} is an entry, but OTP is not.
81 +
1 1  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!
2 2  
3 3  {{info}}
... ... @@ -14,7 +14,7 @@
14 14  
15 15  Below is a demonstration of the [[XWiki Syntax>>XWiki.XWikiSyntax]] you can use in wiki pages (headings, images, tables).
16 16  
17 -= Headings =
98 += {{id name="你好"/}}Headings =
18 18  
19 19  XWiki offers 6 levels of headings. You can use them to structure your pages.
20 20  
... ... @@ -28,7 +28,7 @@
28 28  
29 29  ====== Level 6 Heading 6 ======
30 30  
31 -= Styles =
112 += {{id name="这个"/}}Styles =
32 32  
33 33  Basic styles are supported in XWiki:
34 34  
... ... @@ -39,6 +39,18 @@
39 39  * Text in ,,subscript,,
40 40  * Text in ^^superscript^^
41 41  
123 += Anchors - ascii =
124 +
125 +xwiki code: ~{~{id name="ae"/}}
126 +
127 +{{id name="ae"/}}ae
128 +
129 += Anchors - non ascii =
130 +
131 +xwiki code: ~{~{id name="ä"/}}
132 +
133 +{{id name="ä"/}}ä
134 +
42 42  = Lists =
43 43  
44 44  You can create various types of lists in your wiki pages:
... ... @@ -100,20 +100,62 @@
100 100  
101 101  You can insert images in your wiki pages:
102 102  
103 -image:XWikiLogo.png
196 +[[image:XWikiLogo.png]]
104 104  
105 105  = Macros =
106 106  
107 107  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:
108 108  
109 -== Warning Macro ==
202 +== Box Macro ==
110 110  
111 -This macro allows you to draw users' attention to a specific piece of information:
204 +{{box}}
205 +box
206 +{{/box}}
112 112  
208 +{{box title="**Title**"}}
209 +box
210 +{{/box}}
211 +
212 +== Error Macro ==
213 +
214 +{{error}}
215 +Error
216 +{{/error}}
217 +
218 +{{error title="**Title**"}}
219 +Error
220 +{{/error}}
221 +
222 +== Info Macro ==
223 +
224 +{{info}}
225 +Info
226 +{{/info}}
227 +
228 +{{info title="**Title**"}}
229 +Info
230 +{{/info}}
231 +
232 +== Success Macro ==
233 +
234 +{{success}}
235 +Success
236 +{{/success}}
237 +
238 +{{success title="**Title**"}}
239 +Success
240 +{{/success}}
241 +
242 +== Warning Macro ==
243 +
113 113  {{warning}}
114 114  Hello World
115 115  {{/warning}}
116 116  
248 +{{warning title="**Title**"}}
249 +Hello World
250 +{{/warning}}
251 +
117 117  == Table of Contents ==
118 118  
119 119  This macro automatically generates a table of contents of your wiki page based on headings: