data/TWiki/CommentPluginExamples.txt
changeset 0 414e01d06fd5
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/data/TWiki/CommentPluginExamples.txt	Sat Jan 26 15:50:53 2008 +0100
     1.3 @@ -0,0 +1,248 @@
     1.4 +%META:TOPICINFO{author="TWikiContributor" date="1176025210" format="1.1" reprev="1.1" version="2"}%
     1.5 +%META:TOPICPARENT{name="CommentPluginTemplate"}%
     1.6 +   * Top comment output 2 -- Main.TWikiContributor - 26 Nov 2006
     1.7 +   * Top comment output 1 -- Main.TWikiContributor - 26 Nov 2006
     1.8 +
     1.9 +---+!! CommentPlugin examples
    1.10 +
    1.11 +%TOC%
    1.12 +
    1.13 +---++ !CommentPlugin templates
    1.14 +
    1.15 +---+++ Default
    1.16 +
    1.17 +
    1.18 +
    1.19 +Default comment output 1
    1.20 +
    1.21 +-- Main.TWikiContributor - 26 Nov 2006
    1.22 +
    1.23 +
    1.24 +
    1.25 +Default comment output 2
    1.26 +
    1.27 +-- Main.TWikiContributor - 26 Nov 2006
    1.28 +
    1.29 +%COMMENT{}%
    1.30 +
    1.31 +
    1.32 +
    1.33 +
    1.34 +---+++ =top=
    1.35 +
    1.36 +%COMMENT{type="top"}%
    1.37 +
    1.38 +
    1.39 +
    1.40 +
    1.41 +---+++ =bottom=
    1.42 +
    1.43 +%COMMENT{type="bottom"}%
    1.44 +
    1.45 +
    1.46 +
    1.47 +
    1.48 +---+++ =above=
    1.49 +
    1.50 +
    1.51 +
    1.52 +Above comment output 1
    1.53 +
    1.54 +-- Main.TWikiContributor - 26 Nov 2006
    1.55 +
    1.56 +
    1.57 +Above comment output 2
    1.58 +
    1.59 +-- Main.TWikiContributor - 26 Nov 2006
    1.60 +%COMMENT{type="above"}%
    1.61 +
    1.62 +
    1.63 +
    1.64 +
    1.65 +---+++ =below=
    1.66 +
    1.67 +%COMMENT{type="below"}%
    1.68 +   * Below comment output 2 -- Main.TWikiContributor - 26 Nov 2006
    1.69 +   * Below comment output 1 -- Main.TWikiContributor - 26 Nov 2006
    1.70 +
    1.71 +
    1.72 +
    1.73 +
    1.74 +---+++ =bulletabove=
    1.75 +Example with =inputsize="20"=:
    1.76 +
    1.77 +   * Bullet above comment output 1
    1.78 +   * Bullet above comment output 2
    1.79 +%COMMENT{type="bulletabove" inputsize="20"}%
    1.80 +
    1.81 +
    1.82 +
    1.83 +
    1.84 +---+++ =threadmode=
    1.85 +
    1.86 +
    1.87 +
    1.88 +Threadmode comment output 1
    1.89 +
    1.90 +-- Main.TWikiContributor - 26 Nov 2006
    1.91 +
    1.92 +
    1.93 +Threadmode comment output 2
    1.94 +
    1.95 +-- Main.TWikiContributor - 26 Nov 2006
    1.96 +%COMMENT{type="threadmode"}%
    1.97 +
    1.98 +
    1.99 +
   1.100 +
   1.101 +---+++ =belowthreadmode=
   1.102 +
   1.103 +%COMMENT{type="belowthreadmode"}%
   1.104 +
   1.105 +---++++ Main.TWikiContributor - 26 Nov 2006 - 12:09
   1.106 +
   1.107 +Belowthreadmode comment output 2
   1.108 +
   1.109 +
   1.110 +---++++ Main.TWikiContributor - 26 Nov 2006 - 12:09
   1.111 +
   1.112 +Belowthreadmode comment output 1
   1.113 +
   1.114 +
   1.115 +
   1.116 +
   1.117 +---+++ =tableprepend=
   1.118 +
   1.119 +%COMMENT{type="tableprepend"}%
   1.120 +| Tablepreprend comment output 2 | Main.TWikiContributor | 26 Nov 2006 - 11:03 |
   1.121 +| Tablepreprend comment output 1 | Main.TWikiContributor | 26 Nov 2006 - 11:02 |
   1.122 +
   1.123 +
   1.124 +
   1.125 +
   1.126 +---+++ =tableappend=
   1.127 +
   1.128 +| Tableappend comment output 1 | Main.TWikiContributor | 26 Nov 2006 - 10:38 |
   1.129 +| Tableappend comment output 2 | Main.TWikiContributor | 26 Nov 2006 - 10:39 |
   1.130 +%COMMENT{type="tableappend"}%
   1.131 +
   1.132 +
   1.133 +
   1.134 +
   1.135 +---+++ =after=
   1.136 +
   1.137 +   * After comment output 1 -- Main.TWikiContributor - 26 Nov 2006
   1.138 +   * After comment output 2 -- Main.TWikiContributor - 26 Nov 2006
   1.139 +%COMMENT{type="after"}%
   1.140 +
   1.141 +
   1.142 +
   1.143 +
   1.144 +---+++ =action=
   1.145 +
   1.146 +(requires TWiki:Plugins/ActionTrackerPlugin)
   1.147 +
   1.148 +%ACTION{ due="1-Dec-2007" creator="Main.TWikiContributor" uid="000001" state="open" created="26-Nov-2006" who="Main.TWikiContributor" }% <<EOF
   1.149 +Action comment output 1
   1.150 +- Created by Main.TWikiContributor, 26 Nov 2006 - 10:58
   1.151 +EOF
   1.152 +%ACTION{ due="1-Jan-2008" creator="Main.TWikiContributor" uid="000003" state="open" created="26-Nov-2006" who="Main.TWikiContributor" }% <<EOF
   1.153 +Action comment output 2
   1.154 +- Created by Main.TWikiContributor, 26 Nov 2006 - 10:58
   1.155 +EOF
   1.156 +%COMMENT{type="action"}%
   1.157 +
   1.158 +
   1.159 +
   1.160 +
   1.161 +---+++ =table=
   1.162 +
   1.163 +| 1 Dec 2007 | Main.TWikiContributor | Athens |
   1.164 +| 1 Jan 2008 | Main.TWikiContributor | Beijing |
   1.165 +%COMMENT{type="table"}%
   1.166 +
   1.167 +
   1.168 +
   1.169 +
   1.170 +---+++ =toctalk=
   1.171 +
   1.172 +
   1.173 +---++++ 26 Nov 2006 - 00:45 Main.TWikiContributor: Toctalk output summary 1
   1.174 +Toctalk output message 1
   1.175 +
   1.176 +
   1.177 +---++++ 26 Nov 2006 - 11:09 Main.TWikiContributor: Toctalk output summary 2
   1.178 +Toctalk output message 2
   1.179 +
   1.180 +%COMMENT{type="toctalk"}%
   1.181 +
   1.182 +
   1.183 +
   1.184 +
   1.185 +---+++ =bookmark=
   1.186 +
   1.187 +   * [[http://twiki.org][Bookmark output link label]] %IF{" '' = '' " then="" else="- "}%
   1.188 +   * [[http://twiki.org][TWiki]] %IF{" 'Bookmark output comment' = '' " then="" else="- "}%Bookmark output comment
   1.189 +%COMMENT{type="bookmark"}%
   1.190 +
   1.191 +
   1.192 +
   1.193 +
   1.194 +---+++ =return=
   1.195 +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%
   1.196 +
   1.197 +<!--
   1.198 +   * Set COMMENT_TOPIC = Sandbox.CommentPluginExampleComments
   1.199 +-->
   1.200 +
   1.201 +_Comments:_
   1.202 +<blockquote>
   1.203 +%INCLUDE{%COMMENT_TOPIC%}%
   1.204 +</blockquote>
   1.205 +
   1.206 +---
   1.207 +%COMMENT{type="return" target="%COMMENT_TOPIC%"}% %BR%
   1.208 +
   1.209 +
   1.210 +
   1.211 +
   1.212 +
   1.213 +---+++ =noform=
   1.214 +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]].
   1.215 +
   1.216 +<form method="post" action="%SCRIPTURL{save}%/Sandbox/" enctype="application/x-www-form-urlencoded" name="noformcomment0" id="noformcomment0">
   1.217 +<input type="hidden" name="topicparent" value="CommentPluginExampleComments" />
   1.218 +<input type="hidden" name="comment_action" value="save" />
   1.219 +<input type="hidden" name="nonwikiword" value="off" />
   1.220 +<input type="hidden" name="onlywikiname" value="on" />
   1.221 +<div class="twikiFormSteps">
   1.222 +<div class="twikiFormStep">
   1.223 +*New topic name:* %BR%
   1.224 +<input class="twikiInputField" %DISABLED% type="text" size="40" name="topic" id="topic" value="" /> <span class="twikiGrayText">Enter a !WikiWord topic name</span>
   1.225 +</div>
   1.226 +<div class="twikiFormStep twikiLast">
   1.227 +*Topic text:* %BR%
   1.228 +%COMMENT{noform="on" button="Save"}%
   1.229 +</div>
   1.230 +</div>
   1.231 +</form>
   1.232 +
   1.233 +
   1.234 +
   1.235 +
   1.236 +#TemplateTopic
   1.237 +---+++ =templatetopic=
   1.238 +Example of a form definition in a topic. The comment template is located in Sandbox.CommentPluginTemplateExample.
   1.239 +
   1.240 +
   1.241 +#CommentDate1176024819
   1.242 +Main.TWikiContributor - 08 Apr 2007:
   1.243 +
   1.244 +templatetopic example comment output 1
   1.245 +
   1.246 +---
   1.247 +%COMMENT{noform="on" type="example" templatetopic="Sandbox.CommentPluginTemplateExample" target="%TOPIC%" button="Add comment" }%
   1.248 +
   1.249 +---
   1.250 +   * Bottom comment output 1 -- Main.TWikiContributor - 26 Nov 2006
   1.251 +   * Bottom comment output 2 -- Main.TWikiContributor - 26 Nov 2006