Render a single
BlogComment
Note, the use of hardcoded rights in REDDOT{grant="..."}
in the "format" section below
as long as the
RedDotPlugin does not support
TWikiGroups natively. Replace
it with your main
BlogAuthor or remove the
grant="..." completely to allow
guests to get reddots to their comments.
see also:
RenderDocNavigation
Parameters
Implementation
Main
%STARTINCLUDE%
%~~ DBCALL{"RenderDocNavigation"
~~~ NAME="%NAME%"
~~~ WHERE="BlogRef='%DBQUERY{topic="%NAME%" format="$formfield(BlogRef)"}%'"
~~~ ORDER="created"
~~~ }%
%~~ DBQUERY{topic="%NAME%"
~~~ format="
*~~ <div class=\"blogRef\">
~~~ %STOPALIASAREA%$n<noautolink>
~~~ <h3>On
~~~ <a href=\"$percntSCRIPTURLPATH{\"view\"}$percnt/$web/$expand(BaseRef)\"
~~~ title=\"link to <nop>$expand(BaseRef)\">
~~~ \"$expand(@BaseRef.Headline or BaseRef)\"
~~~ <span class=\"blogDate\">
~~~ ($formatTime(@BaseRef.createdate, '$day, $mon $year'))
~~~ </span>
~~~ </a>
~~~ </h3>
~~~ </noautolink>$n%STARTALIASAREA%$n
~~~ </div>
~~~ <div class=\"blogComment\">
~~~ %DBCALL{"%TOPIC%" section="format"}%
~~~ </div>"
~~~ }%
%~~ DBCALL{"RenderDocNavigation"
~~~ NAME="%NAME%"
~~~ WHERE="BlogRef='%DBQUERY{topic="%NAME%" format="$formfield(BlogRef)"}%'"
~~~ ORDER="created"
~~~ }%
%STOPINCLUDE%
Format
%STARTSECTION{"format"}%
*~~ <h3 style=\"margin-bottom:0px;padding-bottom:0px\">
~~~ <a name=\"$topic\"></a><a name=\"$expand(Nr)\"></a>
~~~ <span class=\"blogCommentNr\">$expand(Nr)</span>
~~~ $percntIFDEFINEDTHEN{\"$expand(Url)\"}$percnt
~~~ [[$test][$expand(Name)]]
~~~ <a href=\"$percntSCRIPTURLPATH{\"view\"}$percnt/$web/$topic\"
~~~ title=\"link to <nop>$topic\">
~~~ $percntELSEDEFINED$percnt
~~~ $percntCALC{
~~~ \"$dollarIF($dollarEXISTS(%MAINWEB%.$expand(Name)),
~~~ [[%MAINWEB%.$expand(Name)][$expand(Name)]]
~~~ <a href=\\"$percntSCRIPTURLPATH{\"view\"}$percnt/$web/$topic\\"
~~~ title=\\"link to <nop>$topic\">,
~~~ <a href=\\"$percntSCRIPTURLPATH{\"view\"}$percnt/$web/$topic\\"
~~~ title=\\"link to <nop>$topic\\">$expand(Name))\"
~~~ }$percnt
~~~ $percntFIDEFINED$percnt
~~~ <span class=\"blogDate\">
~~~ replied
~~~ $percntTIMESINCE{
~~~ from=\"$expand(@BaseRef.createdate)\"
~~~ to=\"$expand(createdate)\"
~~~ format=\"$time after the incident\"
~~~ null=\"immediately\"
~~~ }$percnt
~~~ </span></a>
*~~ $percntREDDOT{\"$web.$topic\" grant=\"MichaelDaum\"}$percnt
~~~ </h3>$n
~~~ <noautolink>$n
~~~ $percntIFDEFINEDTHEN{\"$expand(Headline)\" glue=\"off\"}$percnt$n
~~~ <h4>$test</h4>$n
~~~ $percntFIDEFINED$percnt$n
~~~ %STARTALIASAREA%$n
~~~ <div class=\"blogCommentText\">$n
~~~ $expand(Text)
~~~ …
*~~ <a href=\"$percntSCRIPTURLPATH{\"view\"}$percnt/$web/$topic#bottomComment\"
~~~ title=\"comment on <nop>$topic\">reply</a>
~~~ </div>$n
~~~ %STOPALIASAREA%$n
~~~ </noautolink>
*~~
%ENDSECTION{"format"}%
Test
Calls to 'RenderBlogComment'