Tags:
create new tag
view all tags

Comment Plugin Template for Support Question Comments

This page defines a custom CommentPlugin template to add comments to SupportForum pages.

Input form definition:

%TMPL:DEF{PROMPT:support_comment}%<div style="margin: -5px 0 5px 0;">
%IF{
 "istopic '%SYSTEMWEB%.ScrollBoxAddOn'"
 then="$percntINCLUDE{ \"%SYSTEMWEB%.ScrollBoxAddOn\" section=\"scroll_box_engine\" }$percnt $percntINCLUDE{ \"%SYSTEMWEB%.ScrollBoxAddOn\" section=\"static_box_start\" boxstyle=\"padding: 7px; width: auto; background-color: #f6f6fb;\" }$percnt"
 else="<nop>"
}%
<div>
<textarea %DISABLED% rows="%rows|14%" cols="%cols|90%" name="comment" class="twikiTextarea" wrap="soft" style="width: 100%" onfocus="if(this.value=='%MESSAGE%')this.value=''" onblur="if(this.value=='')this.value='%MESSAGE%'">%MESSAGE%</textarea>
</div>
<div style="padding: 5px 0 0 0;">
<input %DISABLED% type="submit" value="%button|Add comment%" class="twikiButton" />
&nbsp; &nbsp; &nbsp;
Change status to: <select %DISABLED% name="Status">
<option %IF{"'%FORMFIELD{Status}%'='Asked'" then="selected='selected'"}% value="Asked">Asked question</option>
<option %IF{"'%FORMFIELD{Status}%'='Answered'" then="selected='selected'"}% value="Answered">Answered question</option>
<option %IF{"'%FORMFIELD{Status}%'='Unanswered'" then="selected='selected'"}% value="Unanswered">Closed unanswered</option>
</select>
</div>
%IF{
 "istopic '%SYSTEMWEB%.ScrollBoxAddOn'"
 then="$percntINCLUDE{ \"%SYSTEMWEB%.ScrollBoxAddOn\" section=\"static_box_end\" }$percnt"
 else="<nop>"
}%
</div>%TMPL:END%

Output format definition: (specify encode="off" to preserve special characters, use encode="safe" to escape special characters (e.g. for verbatim text))

%TMPL:DEF{OUTPUT:support_comment}%%POS:BEFORE%
%URLPARAM{ "comment" encode="safe" }%

%STARTSECTION{ type="expandvariables" }%%IF{ "defined 'BUBBLESIGNATUREFORMAT'" then="$percntBUBBLESIGNATUREFORMAT$percnt" else="-- $percntWIKIUSERNAME$percnt - $percntDATE$percnt" }%%ENDSECTION{ type="expandvariables" }%

%TMPL:END%

Include generic comment templates:

%TMPL:INCLUDE{"%SYSTEMWEB%.CommentPlugin"}%

Related: SupportForumMaintenance, SupportForum, AskSupportQuestion, WebTopicEditTemplate, SupportHeader, CommentPlugin, WebPreferences

-- PeterThoeny - 2012-07-03

Edit | Attach | Watch | Print version | History: r47 < r46 < r45 < r44 < r43 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r47 - 2015-12-03 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.