Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-10-01 18:44:30

juanjonavarro
Plugin Author
From: Valencia, Spain
Registered: 2005-05-16
Posts: 485
Website

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.
0.5.1
  • Eliminated some warnings in debug mode.
0.5
  • 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
INFO:

Last edited by juanjonavarro (2014-03-25 19:17:44)

Offline

#2 2005-10-01 19:55:48

skoggy
Member
From: Westcoast of Sweden
Registered: 2005-03-27
Posts: 209
Website

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

#3 2005-10-02 06:35:14

juanjonavarro
Plugin Author
From: Valencia, Spain
Registered: 2005-05-16
Posts: 485
Website

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

#4 2005-10-02 18:59:39

skoggy
Member
From: Westcoast of Sweden
Registered: 2005-03-27
Posts: 209
Website

Re: jnm_recent_comments_unique

Example:

Last commenters:

Mattias
James
Robin Hood
Sarah
G. Bush

Offline

#5 2005-10-02 19:04:43

juanjonavarro
Plugin Author
From: Valencia, Spain
Registered: 2005-05-16
Posts: 485
Website

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

#6 2005-10-11 15:50:31

juanjonavarro
Plugin Author
From: Valencia, Spain
Registered: 2005-05-16
Posts: 485
Website

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

#7 2005-10-11 18:59:14

michaelkpate
Moderator
From: Avon Park, FL
Registered: 2004-02-24
Posts: 1,379
Website GitHub Mastodon

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

#8 2005-10-11 19:37:06

skoggy
Member
From: Westcoast of Sweden
Registered: 2005-03-27
Posts: 209
Website

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

#9 2005-10-14 11:26:34

juanjonavarro
Plugin Author
From: Valencia, Spain
Registered: 2005-05-16
Posts: 485
Website

Re: jnm_recent_comments_unique

> Yes :) Just the name of the person who posted the last comment. Is it possible?

Done!

Offline

#10 2005-10-18 15:03:08

arkham
Member
Registered: 2005-03-27
Posts: 102
Website

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

#11 2005-10-19 15:25:59

juanjonavarro
Plugin Author
From: Valencia, Spain
Registered: 2005-05-16
Posts: 485
Website

Re: jnm_recent_comments_unique

Thank you, arkham. Section and category restriction is on the todo list :-)

Offline

#12 2005-10-23 20:06:47

juanjonavarro
Plugin Author
From: Valencia, Spain
Registered: 2005-05-16
Posts: 485
Website

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

Board footer

Powered by FluxBB