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