EE2 extension that enables per-Matrix-row commenting
PHP
Switch branches/tags
Nothing to show
Latest commit aac14a7 Jan 31, 2011 @brandonkelly brandonkelly 1.0.2

README.textile

Matrix Comments

This extension for ExpressionEngine 2 enables per-row commenting with EE’s Comment module.

Requirements

Installation

  • Upload the matrix_comments folder to system/expressionengine/third_party/
  • Enable Matrix Comments in Add-Ons → Extensions
  • Add the comment_entries_query extension hook outlined in mod.comment.php.diff to system/expressionengine/modules/comment/mod.comment.php

Usage

There are two steps involved in enabling per-row commenting.

Note: The following examples assume that your URL structure contains a Matrix row ID in the 4th segment. You may have to modify things a bit to get it working.

First, tell the Comment Submission Form to associate submitted comments with a particular Matrix row by adding a hidden input somewhere inside the form:

{exp:comment:form ... }
  <input type="hidden" name="matrix_row_id" value="{segment_4}" />
  ...
{/exp:comment:form}

Second, tell the Comment Entries Tag to only grab comments associated with a particular Matrix row by adding the matrix_row_id= parameter:

{exp:comment:entries ... matrix_row_id="{segment_4}"}
  ...
{/exp:comment:form}

That’s it!

A Caveat

There’s no simple way to get comment subscriptions to respect Matrix row associations. We’ve gone down that path, and come up with a mostly working implementation, but in the end decided that it was just too complicated and would be too burdensome on future EE upgrades to be worth including in the final release.