Hello,
It will be cool if we could integrate VotingApi in Activity module.
I'm not a developer, so I can't help a lot... :(
Activity module provide an extensible API to allow other modules to integrate by using Activity hooks.
Here the Activity issue about integrate VotingApi to Activity #455906: Integration with Votingapi.
I attach DEVELOPER.txt file from Activity module.
I hope someone could help :)
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | votingapi_564904-8.patch | 4.79 KB | Scott Reynolds |
| #7 | votingapi_564904-7.patch | 5.09 KB | Scott Reynolds |
| #6 | votingapi_564904-6.patch | 4.67 KB | Scott Reynolds |
| #4 | votingapi_564904-3.patch | 4.97 KB | Scott Reynolds |
| DEVELOPER.txt | 8.66 KB | junro |
Comments
Comment #1
junro commentedComment #2
junro commentedComment #3
Scott Reynolds commentedHere is a patch for it. So it provides the following features
1.) Record voting api activity to streams for node and comment content_types (users are hard, will come back to why later).
2.) After User A votes on the node 14, all Activity around that node 14 can be placed in that User's A Activity stream via Activity Access Votingapi: User voted on node.
3.) After User A votes on comment 34, all Activity around that comment can be placed in User's A stream via Activity Access Votingapi: User voted on same Comment
4.) After User A votes on comment 65 on node 17, all Activity around node 17 can be placed in User's A stream via Activity Access Votingapi: User voted on node.
User voting activity is hard, because of Token. Using token, you can only have one 'user' object for the entire string. So in this case, the 'user' object is the user who does the activity. See votingapi_activity_objects_alter(). So it becomes a little complicated.
Comment #4
Scott Reynolds commentedforgot the patch.
Comment #5
Scott Reynolds commentedAdded the tag so i can find this again
Comment #6
Scott Reynolds commentedtypo in the table name (comment != comments)
Comment #7
Scott Reynolds commentedReroll, as the hook_activity_grants() arguments changed.
Comment #8
Scott Reynolds commentedForgot the --no-prefix and --relative arguments to git diff for this. Here is the reroll
Comment #9
jcmarco commentedTested and working fine
Nice feature for Voting API
Thank you.
Comment #10
gddTrying this out for a new site we're building and it is working very well. I think this is well worthy of inclusion.
Comment #11
gausarts commentedYo, great work for community site. Thanks a lot
Comment #12
mcpuddin commentedWorks well for me. What can we do to get this integrated in voting api?
Comment #13
junro commentedHello,
Just at least try this patch but I can't really have what I would like:
How to display the value of the user vote with the activity message?
For exemple:
[user] has given [value] to [title].
Right now: I can only have: [user] has vote [title] and the activiy message is displayed only on node author profile not in the user profil who give the vote.
Comment #14
Fidelix commentedThis would be ultimately awesome.
A big SUBSCRIBE right here is a must.
Comment #15
Scott Reynolds commentedPlease don't subscribe without trying it out. Its really easy to apply patches: http://drupal.org/patch/apply
Votingapi issues take a long time to get in.
Comment #16
Fidelix commentedSorry Scott, i was refering to this:
I subscribed because that is what i need for my project, and for what i understand this is not possible yet.
If it is, please tell me. I will CERTAINLY try it out and give all the feedback i can.
----
...thinking about it, i believe this is possible, and is not very hard to accomplish, but some php/mysql knowledge would be needed.
I'll see what i can do, i will try to do this next week.
Comment #17
Scott Reynolds commentedjust need to write an hook_token_info and hook_token_value for those things.
Its just token integration not activity integration that is missing from what you would need.
Comment #18
Fidelix commentedOh, OK.
Do you have any plans to write this functionality Scott?
Regards.
Comment #19
bflora commentedAnyone available to walk me through setting this up? I don't see how it's possible right now. When someone votes for a story, I want it to generate an activity item.
Comment #20
bflora commentedHi, Scott,
I've applied the patch from #8. I can now create activity publishing templates for when someone votes for a story.
However, they're not showing up in my activity view. Do I need to add a specific relationship or something to my view to get them to appear in the feed? Thanks.
Comment #21
jtse commentedTested the patch. Works. Great work Scott! The issue I have is that I can't create separate activity feeds for comments and votes on the same node. So let's say I have two activity templates defined:
1. When User votes on Article, then activity feed should say: User A voted on Article 1.
2. When User comments on Article, then activity feed should say: User A commented on Article 1.
When the user votes, it appears as a comment (i.e., only the second template gets displayed).
Ideas?
Jim
[UPDATE] -- Never mind, it seems to be working now.
Comment #22
liliplanet commentedsubscribe thx!
Comment #23
eL commentednice, is this in DEV version now?
Comment #24
mastermtg commentedYa is this in the developer version now?
Comment #25
torotil commentedSorry for picking this up after such a long time. I took over this module last autumn. Do you still use this integration? Does it still work with the current 7.x-2.x version?
Comment #26
torotil commentedComment #27
tr commentedThe activity module development seems to have stalled at D6. The last commit to the 7.x branch was over 7 years ago, and there has never been a D7 release of this module, not even a -dev release.
Also, there doesn't seem to be any community support for this integration anymore.
I think the realistic status for this issue is "Won't fix"
If you still want this, the first step would be to get the Activity module up and running again in D7 or D8, then post a new patch here in the Voting API queue for the integration. I won't consider a new patch until Activity is being maintained and has a current working release, because that would just be a waste of time at this point.