Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-08-25 22:49:18

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 999
Website

Extending comment functionality

I’m trying to create a comment experience for a discussion site I’m building. Here are a few things I’d like to accomplish, if possible:

Comment Categorization

I want to enable users to both review and discuss articles in my index.

I’d like to publish discussion comments chronologically by thread, and the default comment functionality would be suitable for this. I haven’t implemented peg_nested_comments yet, but I’d be happy if that worked too.

For reviews, I’d like to publish them like the product reviews at Amazon: As a list sorted by user-rating.

For each article in my index, I’d like to have a separate div for each of these comment categories; something like this:

<div id="discussion">
    <txp:comments category="discussion" />
    ...
<div>
<div id="reviews">
    <txp:comments category="reviews" />
    ...
</div>

Is there any way to give comments a semantic distinction like this, either using Textpattern’s native flexibility, or with existing plugins? I’d even be willing to create a new table in my database and use <txp:php with guidance.

Comment Rating

How can I enable users to give a rating to individual comments? I’ve seen this implemented in several ways, any of which would be useful for the project I’m working on.

  1. Get Satisfaction allows users to add a smily to their comment, and outputs a mood-graph for each discussion. I’m very interested in allowing users to attach data like this to individual comments, and to express the aggregate data on each article-discussion— both on the page and elsewhere.
  2. Assetbar is another site that has magnificent comment functionality. Logged-in users can flag a comment as either helpful or lame. Comments that have been rated helpful by a certain number of users are highlighted in the discussion, and comments that are lamed too many times are removed from the flow. In action, this is a great way to prevent trolling.
  3. Amazon also allows users to rate comments by marking them as helpful or not, and helpful reviews are given priority in the sort order.

That’s all for now. If anyone can offer any advice, I’ll be very grateful. Thanks in advance!

Offline

#2 2008-08-26 12:50:46

stopsatgreen
Member
Registered: 2008-07-03
Posts: 50

Re: Extending comment functionality

Take a look at tcm_rating to start with; it apparently isn’t compatible with 4.06, but might work with a bit of tweaking.

Offline

Board footer

Powered by FluxBB