NP_LatestComments.php

This plugin shows the latest comments added to your blog

General Plugin info
Author: anand, moraes, admun, e-Musty, PiyoPiyoNaku, rork
Current Version: v1.85
Download: here (old version: v1.84)
Forum Thread: forum here

Installing

  1. Download the code from above
  2. Upload it to /plugins directory
  3. Install it at plugin admin menu
  4. Modify the formatting templates and other options, if needed.
    • %t == comment time
    • %U == commenter
    • %u == shortened commenter
    • %C == comment
    • %c == shortened comment
    • %P == item
    • %p == shortened item
    • %L == url to post
    • %l == url to comment
    • %i == comment id
  5. Put <%LatestComments%> somewhere in your skin, ie left/right column
  6. Add anchor tag in the detailed item template (under comments body): <a name=<%commentid%> ></a> after say “<h4 class=”c_userlink“><%userlink%> wrote:</h4>”

SkinVar

The plugin can be called in many ways:

<%LatestComments(numOfPost,mode)%>

where mode can be:

  • nothing, for all blogs
  • actual, current blog
  • default, default blog
  • blog#, a specific blog

To have output similar to NP_MemberComments: <%LatestComments(,,member)%>

Compatibility with other plugins

NP_LatestComments v1.85 is compatible with NP_BBCode v0.6, comments can be shown with or without markup. BBCode that's broken because of shortening of the image will be closed at the end of the comment. Images and youtube movies can be replaced by text (including bbcode). When shortening the comments the length of text inside tags is ignored, yet the url between image or youtube tags is regarded as normal text. Therefore it's probably best to replace them.

History

  • v0.91
    • Fixed XHTML warning
  • v1.0
    • Performance enhancement
  • v1.1
    • option to add extra <br /> between comment
    • change LatestComments(#,0) to LatestComments(#,actual) to display comment to actual/current blog…. the old code didn't work for some reason
    • added anchor to comment
  • v1.2
    • e-Musty (krank@krank.hu), 17/07/2004 supportsFeature function was missing, however the code itself has been already based on its support. This function has been added. Now compatible with Nucleus 3.
  • v1.3
    • improve comment tag naming
    • add ”…” only when the comment is longer than comment display length (Thanks to JH)
  • v1.4
    • add template formatting
  • v1.5
    • add %l, change %u and %p
  • v1.5a
    • add %P for URL to post
  • v1.6
    • add emoticons support via NP_Smiley
  • v1.7
  • v1.71
    • fix a little typo in the history
    • mod by PiyoPiyoNaku, added compatibility with NP_Alias
  • v1.8
    • adds third skinvar parameter LatestComments(,,member) to have output similar to NP_MemberComments
  • v1.81 - mod by PiyoPiyoNaku, 11-Mar-2007
    • code cleaning regarding compatibility with NP_Alias [Must use the new NP_Alias v1.3 to make the compatibility works]
  • v1.82 - mod by PiyoPiyoNaku, 12-Mar-2007
    • language support for Japanese-utf8
  • v1.83 - mod by PiyoPiyoNaku, 16-Mar-2007
    • maximum number of characters for each name
  • v1.84 - mod by Rork
    • maximum number of characters for each title
    • support for complete and shortened title/name/comment
    • optional appended dots for shortened name
    • no comments message
    • support for commentid (%i)
    • add %T %C %L %i, changed %t, %P
  • v1.85 - mod by Rork
    • support for NP_BBCode
    • support for different odd / even comments
    • check if comment doesn't break with a word already

Plugin review

NP_LatestComments version 1.83 works with Nucleus CMS 3.31 - 2007-10-29 admun

latestcomments.txt · Last modified: 2011/10/08 13:29 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki