data/TWiki/CommentPluginExamples.txt,v
changeset 0 414e01d06fd5
equal deleted inserted replaced
-1:000000000000 0:414e01d06fd5
       
     1 head	1.2;
       
     2 access;
       
     3 symbols;
       
     4 locks; strict;
       
     5 comment	@# @;
       
     6 
       
     7 
       
     8 1.2
       
     9 date	2008.01.22.03.21.34;	author TWikiContributor;	state Exp;
       
    10 branches;
       
    11 next	1.1;
       
    12 
       
    13 1.1
       
    14 date	2007.01.16.04.11.59;	author TWikiContributor;	state Exp;
       
    15 branches;
       
    16 next	;
       
    17 
       
    18 
       
    19 desc
       
    20 @buildrelease
       
    21 @
       
    22 
       
    23 
       
    24 1.2
       
    25 log
       
    26 @buildrelease
       
    27 @
       
    28 text
       
    29 @%META:TOPICINFO{author="TWikiContributor" date="1176025210" format="1.1" reprev="1.1" version="2"}%
       
    30 %META:TOPICPARENT{name="CommentPluginTemplate"}%
       
    31    * Top comment output 2 -- Main.TWikiContributor - 26 Nov 2006
       
    32    * Top comment output 1 -- Main.TWikiContributor - 26 Nov 2006
       
    33 
       
    34 ---+!! CommentPlugin examples
       
    35 
       
    36 %TOC%
       
    37 
       
    38 ---++ !CommentPlugin templates
       
    39 
       
    40 ---+++ Default
       
    41 
       
    42 
       
    43 
       
    44 Default comment output 1
       
    45 
       
    46 -- Main.TWikiContributor - 26 Nov 2006
       
    47 
       
    48 
       
    49 
       
    50 Default comment output 2
       
    51 
       
    52 -- Main.TWikiContributor - 26 Nov 2006
       
    53 
       
    54 %COMMENT{}%
       
    55 
       
    56 
       
    57 
       
    58 
       
    59 ---+++ =top=
       
    60 
       
    61 %COMMENT{type="top"}%
       
    62 
       
    63 
       
    64 
       
    65 
       
    66 ---+++ =bottom=
       
    67 
       
    68 %COMMENT{type="bottom"}%
       
    69 
       
    70 
       
    71 
       
    72 
       
    73 ---+++ =above=
       
    74 
       
    75 
       
    76 
       
    77 Above comment output 1
       
    78 
       
    79 -- Main.TWikiContributor - 26 Nov 2006
       
    80 
       
    81 
       
    82 Above comment output 2
       
    83 
       
    84 -- Main.TWikiContributor - 26 Nov 2006
       
    85 %COMMENT{type="above"}%
       
    86 
       
    87 
       
    88 
       
    89 
       
    90 ---+++ =below=
       
    91 
       
    92 %COMMENT{type="below"}%
       
    93    * Below comment output 2 -- Main.TWikiContributor - 26 Nov 2006
       
    94    * Below comment output 1 -- Main.TWikiContributor - 26 Nov 2006
       
    95 
       
    96 
       
    97 
       
    98 
       
    99 ---+++ =bulletabove=
       
   100 Example with =inputsize="20"=:
       
   101 
       
   102    * Bullet above comment output 1
       
   103    * Bullet above comment output 2
       
   104 %COMMENT{type="bulletabove" inputsize="20"}%
       
   105 
       
   106 
       
   107 
       
   108 
       
   109 ---+++ =threadmode=
       
   110 
       
   111 
       
   112 
       
   113 Threadmode comment output 1
       
   114 
       
   115 -- Main.TWikiContributor - 26 Nov 2006
       
   116 
       
   117 
       
   118 Threadmode comment output 2
       
   119 
       
   120 -- Main.TWikiContributor - 26 Nov 2006
       
   121 %COMMENT{type="threadmode"}%
       
   122 
       
   123 
       
   124 
       
   125 
       
   126 ---+++ =belowthreadmode=
       
   127 
       
   128 %COMMENT{type="belowthreadmode"}%
       
   129 
       
   130 ---++++ Main.TWikiContributor - 26 Nov 2006 - 12:09
       
   131 
       
   132 Belowthreadmode comment output 2
       
   133 
       
   134 
       
   135 ---++++ Main.TWikiContributor - 26 Nov 2006 - 12:09
       
   136 
       
   137 Belowthreadmode comment output 1
       
   138 
       
   139 
       
   140 
       
   141 
       
   142 ---+++ =tableprepend=
       
   143 
       
   144 %COMMENT{type="tableprepend"}%
       
   145 | Tablepreprend comment output 2 | Main.TWikiContributor | 26 Nov 2006 - 11:03 |
       
   146 | Tablepreprend comment output 1 | Main.TWikiContributor | 26 Nov 2006 - 11:02 |
       
   147 
       
   148 
       
   149 
       
   150 
       
   151 ---+++ =tableappend=
       
   152 
       
   153 | Tableappend comment output 1 | Main.TWikiContributor | 26 Nov 2006 - 10:38 |
       
   154 | Tableappend comment output 2 | Main.TWikiContributor | 26 Nov 2006 - 10:39 |
       
   155 %COMMENT{type="tableappend"}%
       
   156 
       
   157 
       
   158 
       
   159 
       
   160 ---+++ =after=
       
   161 
       
   162    * After comment output 1 -- Main.TWikiContributor - 26 Nov 2006
       
   163    * After comment output 2 -- Main.TWikiContributor - 26 Nov 2006
       
   164 %COMMENT{type="after"}%
       
   165 
       
   166 
       
   167 
       
   168 
       
   169 ---+++ =action=
       
   170 
       
   171 (requires TWiki:Plugins/ActionTrackerPlugin)
       
   172 
       
   173 %ACTION{ due="1-Dec-2007" creator="Main.TWikiContributor" uid="000001" state="open" created="26-Nov-2006" who="Main.TWikiContributor" }% <<EOF
       
   174 Action comment output 1
       
   175 - Created by Main.TWikiContributor, 26 Nov 2006 - 10:58
       
   176 EOF
       
   177 %ACTION{ due="1-Jan-2008" creator="Main.TWikiContributor" uid="000003" state="open" created="26-Nov-2006" who="Main.TWikiContributor" }% <<EOF
       
   178 Action comment output 2
       
   179 - Created by Main.TWikiContributor, 26 Nov 2006 - 10:58
       
   180 EOF
       
   181 %COMMENT{type="action"}%
       
   182 
       
   183 
       
   184 
       
   185 
       
   186 ---+++ =table=
       
   187 
       
   188 | 1 Dec 2007 | Main.TWikiContributor | Athens |
       
   189 | 1 Jan 2008 | Main.TWikiContributor | Beijing |
       
   190 %COMMENT{type="table"}%
       
   191 
       
   192 
       
   193 
       
   194 
       
   195 ---+++ =toctalk=
       
   196 
       
   197 
       
   198 ---++++ 26 Nov 2006 - 00:45 Main.TWikiContributor: Toctalk output summary 1
       
   199 Toctalk output message 1
       
   200 
       
   201 
       
   202 ---++++ 26 Nov 2006 - 11:09 Main.TWikiContributor: Toctalk output summary 2
       
   203 Toctalk output message 2
       
   204 
       
   205 %COMMENT{type="toctalk"}%
       
   206 
       
   207 
       
   208 
       
   209 
       
   210 ---+++ =bookmark=
       
   211 
       
   212    * [[http://twiki.org][Bookmark output link label]] %IF{" '' = '' " then="" else="- "}%
       
   213    * [[http://twiki.org][TWiki]] %IF{" 'Bookmark output comment' = '' " then="" else="- "}%Bookmark output comment
       
   214 %COMMENT{type="bookmark"}%
       
   215 
       
   216 
       
   217 
       
   218 
       
   219 ---+++ =return=
       
   220 Post to a different topic and return to here. In this example comments are written to [[%COMMENT_TOPIC%]]. %RED% Available with TWiki 4.1. %ENDCOLOR%
       
   221 
       
   222 <!--
       
   223    * Set COMMENT_TOPIC = Sandbox.CommentPluginExampleComments
       
   224 -->
       
   225 
       
   226 _Comments:_
       
   227 <blockquote>
       
   228 %INCLUDE{%COMMENT_TOPIC%}%
       
   229 </blockquote>
       
   230 
       
   231 ---
       
   232 %COMMENT{type="return" target="%COMMENT_TOPIC%"}% %BR%
       
   233 
       
   234 
       
   235 
       
   236 
       
   237 
       
   238 ---+++ =noform=
       
   239 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]].
       
   240 
       
   241 <form method="post" action="%SCRIPTURL{save}%/Sandbox/" enctype="application/x-www-form-urlencoded" name="noformcomment0" id="noformcomment0">
       
   242 <input type="hidden" name="topicparent" value="CommentPluginExampleComments" />
       
   243 <input type="hidden" name="comment_action" value="save" />
       
   244 <input type="hidden" name="nonwikiword" value="off" />
       
   245 <input type="hidden" name="onlywikiname" value="on" />
       
   246 <div class="twikiFormSteps">
       
   247 <div class="twikiFormStep">
       
   248 *New topic name:* %BR%
       
   249 <input class="twikiInputField" %DISABLED% type="text" size="40" name="topic" id="topic" value="" /> <span class="twikiGrayText">Enter a !WikiWord topic name</span>
       
   250 </div>
       
   251 <div class="twikiFormStep twikiLast">
       
   252 *Topic text:* %BR%
       
   253 %COMMENT{noform="on" button="Save"}%
       
   254 </div>
       
   255 </div>
       
   256 </form>
       
   257 
       
   258 
       
   259 
       
   260 
       
   261 #TemplateTopic
       
   262 ---+++ =templatetopic=
       
   263 Example of a form definition in a topic. The comment template is located in Sandbox.CommentPluginTemplateExample.
       
   264 
       
   265 
       
   266 #CommentDate1176024819
       
   267 Main.TWikiContributor - 08 Apr 2007:
       
   268 
       
   269 templatetopic example comment output 1
       
   270 
       
   271 ---
       
   272 %COMMENT{noform="on" type="example" templatetopic="Sandbox.CommentPluginTemplateExample" target="%TOPIC%" button="Add comment" }%
       
   273 
       
   274 ---
       
   275    * Bottom comment output 1 -- Main.TWikiContributor - 26 Nov 2006
       
   276    * Bottom comment output 2 -- Main.TWikiContributor - 26 Nov 2006
       
   277 @
       
   278 
       
   279 
       
   280 1.1
       
   281 log
       
   282 @buildrelease
       
   283 @
       
   284 text
       
   285 @d1 1
       
   286 a1 1
       
   287 %META:TOPICINFO{author="TWikiContributor" date="1165787937" format="1.1" reprev="1.4" version="1"}%
       
   288 d232 14
       
   289 @