Threaded Discussions

Function: RenderSubComments

Render all comments recursively

Parameters

  • NAME: topic name whose comments are rendered

Implementation

%STARTINCLUDE%
%~~ DBQUERY{"TopicRef='%NAME%'" 
~~~   order="Timestamp" 
~~~   web="%BASEWEB%"
~~~   hidenull="on"
~~~   header="$percntTWISTY{
~~~       mode=\"div\"
~~~       prefix=\"<div>\"
~~~       suffix=\"</div>\"
~~~       start=\"show\"
~~~       showlink=\"show thread\"
~~~       hidelink=\"hide thread\"
~~~       showimgleft=\"%ICONURLPATH{toggleopen}%\"
~~~       hideimgleft=\"%ICONURLPATH{toggleclose}%\"
~~~     }$percnt
~~~     <div class=\"blogSubComments\">"
~~~   footer="</div>$percntENDTWISTY$percnt"
~~~   format="
*~~     <div class=\"blogSubComment\">
~~~       <noautolink>
~~~       <h3>
~~~       <a name=\"$topic\"></a><a name=\"$formfield(Nr)\"></a>
~~~       <span class=\"blogCommentNr\">$formfield(Nr)</span>
~~~       $expand(Summary or Name)
~~~       <span class=\"blogDate\">
~~~         $percntIFDEFINED{\"$expand(Summary)\" then=\"$expand(Name), \"}$percnt
~~~         $formatTime(Timestamp)
~~~       </span>
*~~       $percntREDDOT{\"$web.$topic\"}$percnt</h3>
~~~       <div class=\"blogCommentText\">
~~~         $formfield(Text)
~~~         &hellip;
~~~         <a class=\"blogReply\" href=\"$percntSCRIPTURLPATH{\"view\"}$percnt/$web/$topic#$topic\"
~~~            title=\"comment on <nop>$topic\">reply</a>
~~~       </div>
~~~       </noautolink>
~~~       $percntDBCALL{\"Applications.DiscussionApp.RenderSubComments\" NAME=\"$topic\"}$percnt
*~~     </div>"
~~~ }%
*~~
%STOPINCLUDE%

Test

Calls to 'RenderSubComments'

Applications.ApplicationTopic
TopicType: TopicFunction
Summary: Render all comments recursively
TWikiApplication: DiscussionApp
r0 - 10 Aug 2007 - 16:49:35 - TWikiContributor
© giant orange extension cord that reeks hip-hop, funk & soul