To make the both of the following possible:
a) You commented on your own node
b) Karl commented on your node

It is necessary to add another field to the comment activity template for when comment and node author is the same uid. Otherwise you will have to choose between a) and b) and then most would choose b) with the following result when you comment on you own node:

Your-own-name commented on your node - which is confusing.

On a related note: When comment author and node author is the same uid how does the system decide whether to send the "comment created" message or the "your node was commented upon" message when a comment is made?

Comments

lennart’s picture

To clarify:

The case in which "the comment author and the node author is the same uid" (when a particular user comments on one of his or her *own* nodes) must be distinguishable from the case in which uid/7 makes a comment on a node by uid/3 (when a user comments on *another* user's node).

sirkitree’s picture

Hrm, yeah this makes sense. So ideally we would want the following messages:

Comment author, node author:
"You commented on your [node-type], [node-title]."

Comment author, not node author:
"You commented on [author-name]'s [node-type], [node-title]."

Node author, not comment author:
"[comment-author-name] commented on your [node-type], [node-title]."

Public:
"[comment-author-name] commented on [author-name]'s [node-type], [node-title]."

Sound about right?

lennart’s picture

Exactly right!

lennart’s picture

Title: new comment activity field for when comment and node author is the same person » Add comment activity message field for when comment author and node author is the same user

Clarifying title. Also, see #2

Scott Reynolds’s picture

OO this is tricky!

Might need to change either comment modules trigger, or have this done on an _alter().

...tricky...

Scott Reynolds’s picture

Status: Active » Needs review
StatusFileSize
new2.25 KB

Ok give this a try

I added a drupal_alter() for the objects. This allows the comment module to add its logic to say if comment->uid == node->uid add in this object

Pretty clean it seems. I like it a lot.

I do need help with the form label. http://skitch.com/supermanscott/ndfek/activity-comment-author

What do you think that should be?

Scott Reynolds’s picture

StatusFileSize
new2.2 KB

The unset() broke the public message. This works and doesn't break public message

http://skitch.com/supermanscott/ndfue/edit-scotts-contrib

Scott Reynolds’s picture

Status: Needs review » Fixed
lennart’s picture

Thanks!

Yes, the second iteration of the form label is definitely better. Makes sense.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.