Difference: CommentPlugin (15 vs. 16)

Revision 162011-03-28 - TWikiContributor

Line: 1 to 1
 

Comment Plugin

Changed:
<
<
>
>
 The Comment Plugin lets users quickly post comments to a page without an edit/preview/save cycle.

Related topics: CommentPluginTemplates, CommentPluginExamples

Line: 77 to 77
 
threadmode Wiki thread mode comment, signed and dated (server time)
tableprepend Comments, signed and dated (server time), formatted as an HTML table row, added below the anchor (which must be in an HTML <table>)
tableappend Comments, signed and dated (server time), formatted as an HTML table row, added above the anchor (which must be in an HTML <table>)
Changed:
<
<
action Action added to action table directly above comment box (see Plugin Installation Instructions below for immportant notes)
>
>
action Action added to action table directly above comment box (see Plugin Installation Instructions below for important notes)
 
table Tablerows adding on end
toctalk Talk using TOC adding on end
bookmark Create a list of annotated bookmarks
return Post to a different topic and return
Changed:
<
<
Your local installation may add more template types as well - see Customisation, below.
>
>
Your local installation may add more template types as well - see Customization, below.
 
Changed:
<
<

Customisation

>
>

Customization

 
Changed:
<
<
Customisation of the comment plugin requires
>
>
Customization of the comment plugin requires
 
Line: 96 to 96
  The plugin picks up these template definitions from a standard TWiki template file, templates/comments.tmpl. This allows different templates to be defined for different TWiki skins.
Added:
>
>
 

Defining custom templates

By default, templates/comments.tmpl includes the topic CommentPluginTemplate, which contains all the shipped standard templates and in turn includes TWiki.UserCommentsTemplate that can include non-standard customizations.

Line: 106 to 107
 
  1. To override templates on a web-by-web basis, add a topic UserCommentsTemplate to the web (this will replace TWiki.UserCommentsTemplate)
  2. To override templates for a specific skin, add them to TWiki.UserComments<Skin>Template (where <Skin> is the name of the skin with the first letter capitalized, e.g. Pattern)
Changed:
<
<
You can also define a comment template in a topic, by passing the topic location with templatetopic. For example:
>
>

Per topic custom comment template

You can also define a comment template in a topic, by passing the topic location with a templatetopic parameter. For example:

 
%COMMENT{type="blogpost" templatetopic="BlogPostCommentTemplate" target="%TOPIC%" button="Add comment" }%
Changed:
<
<
templatetopic accepts topic or web.topic syntax. See an example in CommentPluginExamples:templatetopic.
>
>
templatetopic accepts topic or web.topic syntax. See an example in CommentPluginExamples#TemplateTopic.
 
Added:
>
>
If you use any topic other than UserCommentTemplate, it is critically important that you include this line at the end of your comment template topic:
%TMPL:INCLUDE{"%SYSTEMWEB%.CommentPlugin"}%
Without this line your templates will not be picked up.
 
Changed:
<
<
ALERT! Templates are picked up by following the standard TWiki rules for locating template files. Note that you can use %TMPL:INCLUDE to include other files of templates.
>
>
ALERT! Templates are picked up by following the standard TWiki rules for locating template files. Note that you can use %TMPL:INCLUDE% to include other files of templates.
 ALERT! Note that from TWiki release 4.1.0 leading and trailing whitespace is no longer stripped. This means that when you upgrade to TWiki 4.1.X you may need to remove the first line break in your custom comment templates. See TWikiReleaseNotes04x01 for more information.
Changed:
<
<

Customisation example

>
>

Customization example

  Provide both a PROMPT and an OUTPUT definition:
Line: 185 to 192
 
Changed:
<
<

Customisation example with custom form template

>
>

Customization example with custom form template

  Write a custom form in a topic.
  • In the form set the location of the prompt with %COMMENTPROMPT%; the prompt will be positioned here.
Line: 259 to 266
 

Plugin Info

Changed:
<
<
Plugin Author: TWiki:Main/CrawfordCurrie http://www.c-dot.co.uk inspired by the work of TWiki:Main/DavidWeller and TWiki:Main/PeterMasiar
Copyright: © 2004, TWiki:Main/CrawfordCurrie;
© 2009 TWiki:Main/SopanShewale;
© 2004-2010 TWiki:TWiki/TWikiContributor
>
>
Plugin Author: TWiki:Main.CrawfordCurrie http://www.c-dot.co.uk inspired by the work of TWiki:Main.DavidWeller and TWiki:Main.PeterMasiar
Copyright: © 2004, TWiki:Main.CrawfordCurrie;
© 2009 TWiki:Main.SopanShewale;
© 2004-2011 TWiki:TWiki.TWikiContributor
 
License: GPL (GNU General Public License)
Changed:
<
<
Plugin Version: 18706 (2010-05-29)
>
>
Plugin Version: 20818 (2011-05-03)
 
Change History:
<-- versions below in reverse order -->
 
Added:
>
>
2011-03-28: TWikibug:Item6672 - doc improvements: Adding link to HIDE
2010-12-11: TWikibug:Item6530 - doc improvements -- TWiki:Main.ScottGutman
 
2010-05-16: TWikibug:Item6433 - doc improvements
2010-03-19 TWikibug:Item6404 Use $br in newline parameter for break tag instead of turning off encoding -- TWiki:Main/PeterThoeny
2010-02-27 TWikibug:Item6276 Cannot specify percentBRpercent for newline value -- TWiki:Main/SopanShewale
 
This site is powered by the TWiki collaboration platformCopyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.CommentPlugin.