This plugin lets a user determine how many comments to show, what order to show them, and whether or not results should be paged. Replaces the <%comments(templatename)%> skinvar in Item Pages skin part.
| General Plugin info | |
|---|---|
| Author: | Frank Truscott |
| Current Version: | 1.30 |
| Download: | 1.30 zip 4kb 1 file |
| Code: | |
| Forum Thread: | Forum |
Only works on Item Pages. Replaces <%comments(templatename)%> skinvar.
<%ShowComments(templatename, NumToShow, SortOrder, Page)%>
where
It is only valid in the Item Pages part of a skin, so go to the Skins admin area and find yoru skin's Item Pages part. Where you see the <%comments(templatename)%> skin var, add <%ShowComments(…)%> like this:
Using the default skin as an example, where you find
<%comments(default/item)%>
you can put
<%ShowComments(default/item)%>
to do the exact same as the comments skin var
Or you can put
<%ShowComments(default/item,10,desc)%>
to show only the 10 most recent comments.
Or your can put
<%ShowComments(default/item,20,asc,yes)%>[/code] to show comments in the normal order, but only display 20 at a time.
Or you can put
<%ShowComments(default/item,5,random)%>
to show 5 random comments.
As of version 1.11, the plugin will read a parameter of scbegin=last in the URL string as a request to view the page containing the latest comment. This can be used to make it compatible with NP_LatestComments with the following modifications to NP_LatestComments.php (example from LatestComments v 1.83)
Lines 247-250 look like this:
$out .= str_replace("%u", $displayedName, $com_templ);
$out = str_replace("%l", $IndexURL.$itemlink."#".$row->cnumber, $out);
$out = str_replace("%P", $IndexURL.$itemlink, $out);
$out = str_replace("%c", $ctext, $out);
After these lines add this line:
$out = str_replace("%n", $row->cnumber, $out);
Now in the plugin options change the comments formatting option to this:
<li><a href="%P&scbegin=last#%n" title="Posts to: %p">%u</a> says %c</li>
NP_ShowComments version 1.30 works with Nucleus CMS version 3.64. - 2012-03-08 ftruscot