Threaded Discussions

Function: RenderListOfComments

Render a list of recent comments

Documentation

List a set of most recent comments

See also: RenderListOfDiscussions, Discussions

Parameters
  • THEWEB: search in the given web, defaults to BASEWEB
  • LIMIT: max nr of discussions to show, defaults to all

Implementation

%STARTINCLUDE%
~~~ <noautolink> 
%~~ DBQUERY{"TopicType=~'\bComment\b'"
~~~    web="%IFDEFINED{"%THEWEB%" then="%THEWEB%" else="%BASEWEB%"}%"
~~~    order="Timestamp"
~~~    reverse="on"
~~~    %IFDEFINED{"%LIMIT%" then="limit=\"%LIMIT%\"" glue="off"}%
~~~   hidenull="on"
~~~   header="$percntTABLE{tablewidth=\"100%\"}$percnt$n
~~~           | *Nr*
~~~           | *Title*
~~~           | *By*
~~~           | *Date*
~~~           | *In*
~~~           |$n"
~~~   format="| $index
~~~           | <a href=\"%SCRIPTURLPATH{"view"}%/$web/$expand(TopicRef)#$topic\">
*~~                $expand(Summary or name)</a>
~~~           | <nobr>[[%MAINWEB%.$formfield(Name)][$percntSPACEOUT{$formfield(Name)}$percnt]]</nobr>
~~~           | <nobr>$formatTime(Timestamp)</nobr>
~~~           | [[$web.$formfield(BaseRef)][$expand(@BaseRef.Summary)]]
~~~           |"
~~~   footer="$n"
~~~ }%
~~~ </noautolink>
~~~
%STOPINCLUDE%

Test

Calls to 'RenderListOfComments'

Copyright

© 2006-2007 Michael Daum http://wikiring.de

This file is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. For more details read the LICENSE.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY, to the extent permitted by law; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Applications.ApplicationTopic
TopicType: DocuTopic, TopicFunction
Summary: Render a list of recent comments
TWikiApplication: DiscussionApp
r0 - 26 Aug 2007 - 05:49:47 - TWikiContributor
© giant orange extension cord that reeks hip-hop, funk & soul