1 Templates for [[CommentPlugin]] - See [[CommentPlugin#Customisation]] for help.
3 While this topic can be viewed as a TWiki topic, it is used by the [[CommentPlugin]] as a template file - see [[TWikiTemplates]]. The important content in here is in the verbatim blocks. The rest of the topic is just comments.
5 **WARNING: THIS FILE WILL BE OVERWRITTEN WHEN YOU UPGRADE THE COMMENT PLUGIN**
7 Put your local templates into [[UserCommentsTemplate]]. **LOCAL TEMPLATES WILL OVERRIDE TEMPLATES DEFINED IN THIS FILE**
11 <li><a href="#Template definitions"> Template definitions</a><ul>
12 <li><a href="#Templates used in rest of file"> Templates used in rest of file</a></li>
13 <li><a href="#User templates"> User templates</a><ul>
14 <li><a href="#top"> top</a></li>
15 <li><a href="#bottom"> bottom</a></li>
16 <li><a href="#above"> above</a></li>
17 <li><a href="#threadmode"> threadmode</a></li>
18 <li><a href="#below"> below</a></li>
19 <li><a href="#tableprepend"> tableprepend</a></li>
20 <li><a href="#tableappend"> tableappend</a></li>
21 <li><a href="#after: Add before the comment bo"> after: Add before the comment box, after the last comment</a></li>
22 <li><a href="#action"> action</a></li>
23 <li><a href="#table"> table</a></li>
24 <li><a href="#toctalk"> toctalk</a></li>
25 <li><a href="#bookmark"> bookmark</a></li>
30 <li><a href="#Include _UserCommentsTemplate"> Include UserCommentsTemplate</a></li>
34 # <a name="Template definitions"></a> Template definitions
36 ## <a name="Templates used in rest of file"></a> Templates used in rest of file
38 Generic prompt box used by other templates
41 <div class="commentPlugin commentPluginPromptBox">
42 <table><tr valign="middle"><td><textarea %DISABLED% rows="%rows|3%" cols="%cols|70%" name="comment" wrap="soft" onfocus="if(this.value=='%MESSAGE%')this.value=''" onblur="if(this.value=='')this.value='%MESSAGE%'">%MESSAGE%</textarea></td><td><input %DISABLED% type="submit" value="%button|Add comment%" /></td></tr></table>
43 </div><!--/commentPlugin-->
46 Short comment, signed and dated
48 %TMPL:DEF{outputoneliner}%<span class="commentPlugin commentPluginOutputOneliner"> * %URLPARAM{"comment"}% -- %WIKIUSERNAME% - %SERVERTIME%</span></span><!--/commentPlugin-->%TMPL:END%
52 ## <a name="User templates"></a> User templates
54 ### <a name="top"></a> top
56 Comments, signed and dated, added at top of file
58 %TMPL:DEF{PROMPT:top}%%TMPL:P{promptbox}%%TMPL:END%
60 %TMPL:DEF{OUTPUT:top}%%TMPL:P{outputoneliner}%%POS:TOP%
65 ### <a name="bottom"></a> bottom
67 Comments, signed and dated, added at end of file
69 %TMPL:DEF{PROMPT:bottom}%%TMPL:P{promptbox}%%TMPL:END%
71 %TMPL:DEF{OUTPUT:bottom}%%POS:BOTTOM%%TMPL:P{outputoneliner}%%TMPL:END%
75 ### <a name="above"></a> above
77 Comments, signed and dated, added immediately before anchor
79 %TMPL:DEF{PROMPT:above}%%TMPL:P{promptbox}%%TMPL:END%
81 %TMPL:DEF{OUTPUT:above}%%POS:BEFORE%%TMPL:P{outputoneliner}%
86 ### <a name="threadmode"></a> threadmode
88 Wiki thread mode comment, signed and dated
90 %TMPL:DEF{PROMPT:threadmode}%%TMPL:P{promptbox}%%TMPL:END%
92 %TMPL:DEF{OUTPUT:threadmode}%%POS:BEFORE%
96 -- %WIKIUSERNAME% - %DATE%
101 ### <a name="below"></a> below
103 Comments, signed and dated, added immediately below anchor
105 %TMPL:DEF{PROMPT:below}%%TMPL:P{promptbox}%%TMPL:END%
107 %TMPL:DEF{OUTPUT:below}%%POS:AFTER%%TMPL:P{outputoneliner}%
112 ### <a name="tableprepend"></a> tableprepend
114 Comments, signed and dated, added at top of table below the anchor/location/COMMENT
116 %TMPL:DEF{PROMPT:tableprepend}%%TMPL:P{promptbox}%%TMPL:END%
118 %TMPL:DEF{OUTPUT:tableprepend}%%POS:AFTER%| %URLPARAM{"comment" newline="<br />"}% </td><td> %WIKIUSERNAME% </td><td> %SERVERTIME% |
123 ### <a name="tableappend"></a> tableappend
125 Comments, signed and dated, added at end of table above the anchor/location/COMMENT
127 %TMPL:DEF{PROMPT:tableappend}%%TMPL:P{promptbox}%%TMPL:END%
129 %TMPL:DEF{OUTPUT:tableappend}%%POS:BEFORE%| %URLPARAM{"comment" newline="<br />"}% | %WIKIUSERNAME% | %SERVERTIME% |
134 ### <a name="after: Add before the comment bo"></a> after: Add before the comment box, after the last comment
136 %TMPL:DEF{PROMPT:after}%%TMPL:P{promptbox}%%TMPL:END%
138 %TMPL:DEF{OUTPUT:after}%%NOP%
139 %TMPL:P{outputoneliner}% %POS:BEFORE%%TMPL:END%
143 ### <a name="action"></a> action
145 Action added to action table directly above comment box
147 %TMPL:DEF{PROMPT:action}%
150 <td align="right">Action for (%TWIKIWEB%.WikiName):</td>
151 <td><input name="who" type="text" size="50" value="%URLPARAM{"who"}%" /></td>
154 <td align="right">Due date:</td>
156 <input name="due" id="idDue" type="text" size="30" value="%URLPARAM{"due"}%" />
161 <textarea %DISABLED% rows="5" cols="120" name="comment" wrap="soft"></textarea>
165 <td colspan=2 align=middle><input %DISABLED% type="submit" value="Add action" /></td>
170 %TMPL:DEF{OUTPUT:action}%%POS:BEFORE%%AC%NOP%TION{who="%URLPARAM{"who"}%" due="%URLPARAM{"due"}%"}% %URLPARAM{"comment" newline="<br />"}%<br />- Created by %WIKIUSERNAME%, %SERVERTIME%
175 ### <a name="table"></a> table
177 Tablerows adding on end - TWiki:Main/FranzJosefSilli
179 %TMPL:DEF{PROMPT:table}%
180 <hr width="60%" /> Date: <input %DISABLED% type="text" size="40" name="comment_date" /> <br /> City: <input %DISABLED% type="text" size="40" name="comment_city" value="" /> <input %DISABLED% type="submit" value="%button|Add%" /> entry <hr width="90%" />
183 %TMPL:DEF{OUTPUT:table}%
184 %POS:BEFORE%| %URLPARAM{"comment_date"}% | %WIKIUSERNAME% | %URLPARAM{"comment_city" }% |
189 ### <a name="toctalk"></a> toctalk
191 Talk using TOC adding on end - TWiki:Main/FranzJosefSilli
193 %TMPL:DEF{PROMPT:toctalk}%
194 <hr width="60%" /> Summary: <input %DISABLED% type="text" size="40" name="comment_summary" /> <br /> <textarea %DISABLED% rows="%rows|3%" cols="%cols|50%" name="comment_text" wrap="soft" onfocus="if(this.value=='%MESSAGE%')this.value=''" onblur="if(this.value=='')this.value='%MESSAGE%'">%MESSAGE%</textarea> <br /> <input %DISABLED% type="submit" value="%button|Add%" /> <hr width="90%" />
197 %TMPL:DEF{OUTPUT:toctalk}%
198 %POS:BEFORE%---+++ %SERVERTIME% %WIKIUSERNAME%: %URLPARAM{"comment_summary"}%
199 %POS:BEFORE%%URLPARAM{"comment_text" }%
205 ### <a name="bookmark"></a> bookmark
207 Talk using TOC adding on end - TWiki:Main/FranzJosefSilli
209 %TMPL:DEF{PROMPT:bookmark}%
210 <hr width="60%" /> URL: <input %DISABLED% type="text" size="40" name="comment_url" value="http://" /> <br /> Link: <input %DISABLED% type="text" size="40" name="comment_link" /> <br /> Text: <input %DISABLED% type="text" size="40" name="comment_text" value="%MESSAGE%" /> <input %DISABLED% type="submit" value="%button|Add%" /> bookmark <hr width="90%" />
213 %TMPL:DEF{OUTPUT:bookmark}%
214 %POS:BEFORE% * [[%URLPARAM{"comment_url"}%][%URLPARAM{"comment_link"}%]] - %URLPARAM{"comment_text" }%
217 # <a name="Include _UserCommentsTemplate"></a> Include UserCommentsTemplate
219 Including [[UserCommentsTemplate]]:
221 %TMPL:INCLUDE\{"UserComments"\}%