/
CommentPluginExamples.txt
248 lines (121 loc) · 5.14 KB
/
CommentPluginExamples.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
%META:TOPICINFO{author="ProjectContributor" date="1176025210" format="1.1" reprev="1.1" version="1.1"}%
%META:TOPICPARENT{name="CommentPluginTemplate"}%
* Top comment output 2 -- Main.ProjectContributor - 26 Nov 2006
* Top comment output 1 -- Main.ProjectContributor - 26 Nov 2006
---+!! CommentPlugin examples
%TOC%
---++ !CommentPlugin templates
---+++ Default
Default comment output 1
-- Main.ProjectContributor - 26 Nov 2006
Default comment output 2
-- Main.ProjectContributor - 26 Nov 2006
%COMMENT{}%
---+++ =top=
%COMMENT{type="top"}%
---+++ =bottom=
%COMMENT{type="bottom"}%
---+++ =above=
Above comment output 1
-- Main.ProjectContributor - 26 Nov 2006
Above comment output 2
-- Main.ProjectContributor - 26 Nov 2006
%COMMENT{type="above"}%
---+++ =below=
%COMMENT{type="below"}%
* Below comment output 2 -- Main.ProjectContributor - 26 Nov 2006
* Below comment output 1 -- Main.ProjectContributor - 26 Nov 2006
---+++ =bulletabove=
Example with =inputsize="20"=:
* Bullet above comment output 1
* Bullet above comment output 2
%COMMENT{type="bulletabove" inputsize="20"}%
---+++ =threadmode=
Threadmode comment output 1
-- Main.ProjectContributor - 26 Nov 2006
Threadmode comment output 2
-- Main.ProjectContributor - 26 Nov 2006
%COMMENT{type="threadmode"}%
---+++ =belowthreadmode=
%COMMENT{type="belowthreadmode"}%
---++++ Main.ProjectContributor - 26 Nov 2006 - 12:09
Belowthreadmode comment output 2
---++++ Main.ProjectContributor - 26 Nov 2006 - 12:09
Belowthreadmode comment output 1
---+++ =tableprepend=
%COMMENT{type="tableprepend"}%
| Tablepreprend comment output 2 | Main.ProjectContributor | 26 Nov 2006 - 11:03 |
| Tablepreprend comment output 1 | Main.ProjectContributor | 26 Nov 2006 - 11:02 |
---+++ =tableappend=
| Tableappend comment output 1 | Main.ProjectContributor | 26 Nov 2006 - 10:38 |
| Tableappend comment output 2 | Main.ProjectContributor | 26 Nov 2006 - 10:39 |
%COMMENT{type="tableappend"}%
---+++ =after=
* After comment output 1 -- Main.ProjectContributor - 26 Nov 2006
* After comment output 2 -- Main.ProjectContributor - 26 Nov 2006
%COMMENT{type="after"}%
---+++ =action=
(requires Foswiki:Extensions/ActionTrackerPlugin)
%ACTION{ due="1-Dec-2007" creator="Main.ProjectContributor" uid="000001" state="open" created="26-Nov-2006" who="Main.ProjectContributor" }% <<EOF
Action comment output 1
- Created by Main.ProjectContributor, 26 Nov 2006 - 10:58
EOF
%ACTION{ due="1-Jan-2008" creator="Main.ProjectContributor" uid="000003" state="open" created="26-Nov-2006" who="Main.ProjectContributor" }% <<EOF
Action comment output 2
- Created by Main.ProjectContributor, 26 Nov 2006 - 10:58
EOF
%COMMENT{type="action"}%
---+++ =table=
| 1 Dec 2007 | Main.ProjectContributor | Athens |
| 1 Jan 2008 | Main.ProjectContributor | Beijing |
%COMMENT{type="table"}%
---+++ =toctalk=
---++++ 26 Nov 2006 - 00:45 Main.ProjectContributor: Toctalk output summary 1
Toctalk output message 1
---++++ 26 Nov 2006 - 11:09 Main.ProjectContributor: Toctalk output summary 2
Toctalk output message 2
%COMMENT{type="toctalk"}%
---+++ =bookmark=
* [[http://foswiki.org][Bookmark output link label]] %IF{" '' = '' " then="" else="- "}%
* [[http://foswiki.org][Foswiki]] %IF{" 'Bookmark output comment' = '' " then="" else="- "}%Bookmark output comment
%COMMENT{type="bookmark"}%
---+++ =return=
Post to a different topic and return to here. In this example comments are written to [[%COMMENT_TOPIC%]].
<!--
* Set COMMENT_TOPIC = Sandbox.CommentPluginExampleComments
-->
_Comments:_
<blockquote>
%INCLUDE{%COMMENT_TOPIC%}%
</blockquote>
---
%COMMENT{type="return" target="%COMMENT_TOPIC%"}% %BR%
---+++ =noform=
Example of a custom form to save a comment to a new topic. When the topic is created the parent will be our Sandbox [[Sandbox.CommentPluginExampleComments][example topic]].
<form method="post" action="%SCRIPTURL{save}%/Sandbox/" enctype="application/x-www-form-urlencoded" name="noformcomment0" id="noformcomment0">
<input type="hidden" name="topicparent" value="CommentPluginExampleComments" />
<input type="hidden" name="comment_action" value="save" />
<input type="hidden" name="nonwikiword" value="off" />
<input type="hidden" name="onlywikiname" value="on" />
<div class="foswikiFormSteps">
<div class="foswikiFormStep">
*New topic name:* %BR%
<input class="foswikiInputField" %DISABLED% type="text" size="40" name="topic" id="topic" value="" /> <span class="foswikiGrayText">Enter a !WikiWord topic name</span>
</div>
<div class="foswikiFormStep foswikiLast">
*Topic text:* %BR%
%COMMENT{noform="on" button="Save"}%
</div>
</div>
</form>
#TemplateTopic
---+++ =templatetopic=
Example of a form definition in a topic. The comment template is located in Sandbox.CommentPluginTemplateExample.
#CommentDate1176024819
Main.ProjectContributor - 08 Apr 2007:
templatetopic example comment output 1
---
%COMMENT{noform="on" type="example" templatetopic="Sandbox.CommentPluginTemplateExample" target="%TOPIC%" button="Add comment" }%
---
* Bottom comment output 1 -- Main.ProjectContributor - 26 Nov 2006
* Bottom comment output 2 -- Main.ProjectContributor - 26 Nov 2006