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?
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | activity_565748.patch | 2.2 KB | Scott Reynolds |
| #6 | activity_565748.patch | 2.25 KB | Scott Reynolds |
Comments
Comment #1
lennart commentedTo 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).
Comment #2
sirkitree commentedHrm, 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?
Comment #3
lennart commentedExactly right!
Comment #4
lennart commentedClarifying title. Also, see #2
Comment #5
Scott Reynolds commentedOO this is tricky!
Might need to change either comment modules trigger, or have this done on an _alter().
...tricky...
Comment #6
Scott Reynolds commentedOk 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?
Comment #7
Scott Reynolds commentedThe unset() broke the public message. This works and doesn't break public message
http://skitch.com/supermanscott/ndfue/edit-scotts-contrib
Comment #8
Scott Reynolds commentedcommitted: http://drupal.org/cvs?commit=274922
Comment #9
lennart commentedThanks!
Yes, the second iteration of the form label is definitely better. Makes sense.