- Timestamp:
- 11/08/08 13:16:17 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Release04x02/twikiplugins/CommentPlugin/data/TWiki/CommentPlugin.txt
r11 r463 32 32 #StandardAttrs 33 33 Write =%<nop>COMMENT{<i>attributes</i>}%= anywhere in a TWiki topic. 34 %INCLUDE{"% TWIKIWEB%.VarCOMMENT" section="comment_attributes"}%34 %INCLUDE{"%SYSTEMWEB%.VarCOMMENT" section="comment_attributes"}% 35 35 (See also [[#MoreAttrs][additional attributes]]) 36 36 … … 50 50 %COMMENT{type="above" target="%MAINWEB%.PersonalRemarks#InsertHere"}% 51 51 </verbatim> 52 This uses a standard TWiki in-topic anchor as the insertion location. See % TWIKIWEB%.TextFormattingRules for more about TWiki anchors.52 This uses a standard TWiki in-topic anchor as the insertion location. See %SYSTEMWEB%.TextFormattingRules for more about TWiki anchors. 53 53 54 54 ---++++ Location relative to an arbitrary text string … … 91 91 Customisation of the comment plugin requires 92 92 * familiarity with HTML forms 93 * some familiarity with the [[% TWIKIWEB%.TWikiTemplates][TWiki templating language]].93 * some familiarity with the [[%SYSTEMWEB%.TWikiTemplates][TWiki templating language]]. 94 94 95 95 To define a comment type, you have to provide two simple template definitions in the template file; one for the prompt box, and one for the generated output. If we have a template type "mytype", these are named =PROMPT:mytype= and =OUTPUT:mytype= respectively. See =comments.tmpl= in the templates directory for examples. … … 98 98 99 99 ---+++ Defining custom templates 100 By default, =templates/comments.tmpl= includes the topic % TWIKIWEB%.CommentPluginTemplate, which contains all the shipped standard templates and in turn includes %TWIKIWEB%.<nop>UserCommentsTemplate that can include non-standard customisations.100 By default, =templates/comments.tmpl= includes the topic %SYSTEMWEB%.CommentPluginTemplate, which contains all the shipped standard templates and in turn includes %SYSTEMWEB%.<nop>UserCommentsTemplate that can include non-standard customisations. 101 101 102 102 This allows for several levels of customisation: 103 103 1 To *override all default templates, everywhere*, change =comments.tmpl= to include a different topic (this customisation will be lost next time you upgrade, though). 104 1 To add *site-wide local template customisations*, add them to % TWIKIWEB%.UserCommentsTemplate (create if it does not exist yet). You can redefine the standard templates here if you want, and your definitions will override the standard definitions.105 1 To override templates on a *web-by-web basis*, add a topic =UserCommentsTemplate= to the web (this will replace % TWIKIWEB%.<nop>UserCommentsTemplate)106 1 To override templates *for a specific skin*, add them to % TWIKIWEB%.<nop>UserComments<Skin>Template (where <Skin> is the name of the skin with the first letter capitalised, e.g. Pattern)104 1 To add *site-wide local template customisations*, add them to %SYSTEMWEB%.UserCommentsTemplate (create if it does not exist yet). You can redefine the standard templates here if you want, and your definitions will override the standard definitions. 105 1 To override templates on a *web-by-web basis*, add a topic =UserCommentsTemplate= to the web (this will replace %SYSTEMWEB%.<nop>UserCommentsTemplate) 106 1 To override templates *for a specific skin*, add them to %SYSTEMWEB%.<nop>UserComments<Skin>Template (where <Skin> is the name of the skin with the first letter capitalised, e.g. Pattern) 107 107 108 108 You can also define a *comment template in a topic*, by passing the topic location with =templatetopic=. For example: … … 215 215 | =%<nop>COMMENTPROMPT%= | Use with a custom form. If present, the comment prompt will be positioned here. | 216 216 217 All the usual TWikiVariables that can be used in a topic template can also be used in an =OUTPUT= template. See % TWIKIWEB%.TWikiVariables for details.217 All the usual TWikiVariables that can be used in a topic template can also be used in an =OUTPUT= template. See %SYSTEMWEB%.TWikiVariables for details. 218 218 219 219 ---++ Settings 220 220 <!-- required for compatibility 221 221 * Set SHORTDESCRIPTION = Allows users to quickly post comments to a page without an edit/preview/save cycle. 222 * Name of file in the 'templates' directory that contains the comment templates. The default 'comments.tmpl' automatically includes user templates from % TWIKIWEB%.CommentPluginTemplate222 * Name of file in the 'templates' directory that contains the comment templates. The default 'comments.tmpl' automatically includes user templates from %SYSTEMWEB%.CommentPluginTemplate 223 223 * Set TEMPLATES = comments 224 224 * Default template type (if not present, defaults to "below") … … 227 227 Two TWiki Preference variables are recognised by the CommentPlugin: 228 228 | *Preference* | *Default* | *Description* | 229 | =%<nop>COMMENTPLUGIN_TEMPLATES%= | =comments= | Name of template file in the 'templates' directory that contains the comment templates. The default 'comments.tmpl' automatically includes user templates from % TWIKIWEB%.CommentPluginTemplate, which in turn includes %TWIKIWEB%.UserCommentsTemplate. |229 | =%<nop>COMMENTPLUGIN_TEMPLATES%= | =comments= | Name of template file in the 'templates' directory that contains the comment templates. The default 'comments.tmpl' automatically includes user templates from %SYSTEMWEB%.CommentPluginTemplate, which in turn includes %SYSTEMWEB%.UserCommentsTemplate. | 230 230 | =%<nop>COMMENTPLUGIN_DEFAULT_TYPE%= | =above= | Default template type | 231 231 These can be set in !TWikiPreferences, in !WebPreferences or in individual topics. … … 266 266 | 8788 | TWikibug:Item1465 Item1577: reverted 8433 to fix inclusion of correct user templates | 267 267 | 8787 | TWikibug:Item1573 renamed standard templates topic to avoid naming clash on Windows, where filenames are case-insensitive | 268 | 8433 | TWikibug:Item1465 Fix 'TWiki.' to '% TWIKIWEB%.'; also fixed include 'UserComments' to 'UserCommentsTemplate' (at least that is what the doc suggests) |268 | 8433 | TWikibug:Item1465 Fix 'TWiki.' to '%SYSTEMWEB%.'; also fixed include 'UserComments' to 'UserCommentsTemplate' (at least that is what the doc suggests) | 269 269 | 7427 | TWikibug:Item845 removed duplicate date in default comments; stick with server time | 270 270 | 7251 | TWikibug:Item810 fix for user template inclusion; reorganised templates to make customisation easier | … … 286 286 | Feedback: | TWiki:Plugins/%TOPIC%Dev | 287 287 288 __Related Topics:__ % TWIKIWEB%.TWikiPreferences, %TWIKIWEB%.TWikiPlugins288 __Related Topics:__ %SYSTEMWEB%.TWikiPreferences, %SYSTEMWEB%.TWikiPlugins 289 289 290 290 %META:FILEATTACHMENT{name="wikiringlogo20x20.png" attr="h" comment="" version="1"}%
Note: See TracChangeset
for help on using the changeset viewer.
