I'm a maintainer of the User Comment module, and in the process of adding integration with activity. Usercomment allows users to approve comments on their own nodes, and I've created a trigger to run when a comment is approved.
So far I've been able to get activity to notice the trigger and record the message, but there are no tokens listed as available in the template edit screen. The strange thing is that I'm able to use tokens like [activity-comment-author-link] and [user], but they're not listed for the site builder.
I'm wondering if anyone really familiar with Activity can give me any pointers? Attached is a copy of Usercomment with the unfinished activity integration patch already applied. The functions for trigger and activity integration are at the bottom of usercomment.module. Thanks in advance to anyone who can help!
| Comment | File | Size | Author |
|---|---|---|---|
| usercomment-DRUPAL-6--2.tar_.gz | 6.89 KB | rschwab |
Comments
Comment #1
rschwab commentedoops, here is the correct url http://drupal.org/project/usercomment
:\
Comment #2
Scott Reynolds commentedThe token issue is related to the types handled to theme_activity_token_help in activity.module.
Figure out how that is working and you should be able to solve it.
Comment #3
pribeh commentedThis is great. I already use user comments rschwab. Thanks for attempting integration.
Comment #4
rschwab commentedThank you Scott! With your help I've got the tokens showing up correctly, and all is working... with one exception: The message for the comment author doesn't show - they see the public message instead. The database is showing the correct uid for my realm (usercomment_author), but no message. In the activity_messages table the message isn't recorded for the author, just the approving user and public messages.
I'm not sure what I'm messing up, but if I figure it out I'll post here. Here is the code so far:
And for reference, $context in my trigger is:
Comment #5
Scott Reynolds commentedAdd into your objects the 'author'
Comment #6
rschwab commentedThanks again Scott! With your help usercomment is now working with activity.