Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
jnm_recent_comments_unique
My first plugin. (excuse me for my broken english :) )
Description:
<txp:jnm_recent_comments_unique />
is similar to txp:recent_comments. It displays the latest comments with the following changes:
- It only displays one link per article with the number of comments enclosed in parenthesis.
- It display the names of latest commenters (optional)
Options:
You can use the standard txp:recent_comments options (label, break, wraptag and limit).
You can also use the following options:
- showcomments = Set to ‘y’ to display the commenters names. Default: “n”
- commbreak = String to separate the article’s link from the commenters names. Default: ”@<br/>@”
- commseparator = String to separate commenters names. Default: ”, ”
- commlimit = Display as much as this commenters. Default: 3
- commclass = If included, the commenters names are enclosed with a div with this class attribute.
- section = Restrict comments by this section. You can specify various sections separated by “,”
- autosection = Set to ‘y’ to autoselect comments based on the section being displayed. Default: “n”
- category = Restrict comments by this category. You can specify various categories separated by “,”.
- autocategory = Set to ‘y’ to autoselect comments based on the category being displayed. Not valid inside an article page. Default: “n”
- linktoarticle = ‘y’=article link links to article. ‘n’=article link links to latest comment. Default: ‘n’
- commentscount = Set to ‘n’ to not show comments count. Default: ‘y’
Examples:
<txp:jnm_recent_comments_unique break="li" />
Display the latest commented articles in an unordered list.
<txp:jnm_recent_comments_unique break="li" showcomments="y" commlimit="2" commclass="commenters"/>
Display the latest commented articles with as much as two commenters. The commenters names are enclosed in a <div class="commenters">
tag.
Version 0.5.2
History:
0.5.2- Display only published articles.
- Eliminated some warnings in debug mode.
- Added “category” and “autocategory” parameters to restrict comment by category.
- Added “linktoarticle” and “commentscount” parameter.
0.4
- Multi-section support.
0.3
- Added “section” and “autosection” parameters to restrict comments by section.
0.2
- Solved little bug that sometimes displays entries in bad order.
- Article link now links directly to the latest comment.
0.1
- Initial Realease
Last edited by juanjonavarro (2014-03-25 19:17:44)
Offline
Re: jnm_recent_comments_unique
Wow! You´ve read my mind! Thought about a plugin like this yesterday =)
Will try it and report back…
Edit: Question:
Can I choose to just display the latest commentators? Name but not the article name…
Last edited by skoggy (2005-10-01 20:05:27)
Offline
Re: jnm_recent_comments_unique
I don’t understand what do you want. Can you show me an example of output?
Last edited by juanjonavarro (2005-10-02 08:31:10)
Offline
Re: jnm_recent_comments_unique
Example:
Last commenters:
Mattias
James
Robin Hood
Sarah
G. Bush
Offline
Re: jnm_recent_comments_unique
So, the last commenters with link to the comment and with repeated articles? I mean can Mattias and James be commenters of article1 and Robin of article2?
P.S. Is it commenter or commentator in english?
Offline
Re: jnm_recent_comments_unique
Updated to version 0.2:
- Solved little bug that sometimes displays entries in bad order.
- Article link now links directly to the latest comment.
Offline
Re: jnm_recent_comments_unique
I remember looking for just this sort of thing a few months ago. This should come in very handy.
Offline
Re: jnm_recent_comments_unique
> juanjonavarro wrote:
> So, the last commenters with link to the comment and with repeated articles? I mean can Mattias and James be commenters of article1 and Robin of article2?
Yes :) Just the name of the person who posted the last comment. Is it possible?
My english is far from perfect so I don´t blame you…
Offline
Re: jnm_recent_comments_unique
> Yes :) Just the name of the person who posted the last comment. Is it possible?
Offline
Re: jnm_recent_comments_unique
Thanks for this plugin. It was a snap to setup.
You may want to add a functionality to restrict the returned commented articles by section(s). I could see that being very useful.
Offline
Re: jnm_recent_comments_unique
Thank you, arkham. Section and category restriction is on the todo list :-)
Offline
Re: jnm_recent_comments_unique
Updated to version 0.3:
Added “section” and “autosection” parameters to restrict comments by section.
- section = Restrict comments by this section
- autosection = Set to ‘y’ to autoselect comments based on the section being displayed. Default: “n”
Offline