Closed (outdated)
Project:
Activity
Version:
7.x-1.x-dev
Component:
Activity Contrib
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
24 Jan 2011 at 04:46 UTC
Updated:
29 Oct 2025 at 14:55 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
mooffie commentedThe code was taken straight from Flag (except the new "$info = _activity_activity_info()" line). I'm marking this "needs review" (though I myself won't be able to work on this: I'm not familiar with Activity).
Comment #2
jcmarco commentedTested and it works fine.
It doesn't require any change in the existing settings.
Comment #3
pribeh commentedsubscribing.
Comment #4
NathanM commentedsubscribing
Comment #5
mazdakaps commentedsubscribing
Comment #6
katbailey commentedNot sure if I should have opened a separate issue but here's a start at a D7 patch...
Comment #7
katbailey commentedThis version of the patch fixes tokenization and allows the patch to be used by drush make (i.e. rolled with --no-prefix).
Comment #8
katbailey commentedThis patch has just one extra line over the previous one: explicity declaring $realms as an empty array in flag_activity_api() in activity.contrib.module - this was causing my unit test to crap out...
Comment #9
katbailey commentedIt's amazing the things you find when you try running a few simple tests... here's another fix for the patch (there was a bad query that crapped out with table prefixes)
Comment #10
lesleyfernandes commentedsubscribing
Comment #11
katbailey commentedSo it turns out that the whole preparation of objects for tokenization bit was not in good shape at all. Here's yet another patch that hopefully gets this in decent shape. Curious to know if anybody else is waiting for this for D7 or am I the only one?
Comment #12
lesleyfernandes commentedI'm also waiting for the new version.
Comment #13
katbailey commentedSo, the objects created in the loadObjects method aren't only for the purposes of tokenization, we also need to grab the nid of hte activity from one of the objects. Yet another patch, this time overriding the determineNid method, so that it grabs the nid from the flag-action object we created during loadObjects.
Wheeeeeeeeee - having so much fun wiht this patch... all on my lonesome :-P
Comment #14
katbailey commentedFixing a NULL parameter being passed to url() instead of an empty array (this was affecting comment flagging). New patch...
Oh, and no more 2-part patches from me - I haz teh git rebase interactive skillz :-)
Comment #15
katbailey commentedI was incorrectly passing an array into user_load (as per the D6 way) causing entiy->load() to barf. New patch...
Comment #16
katbailey commentedYet another minor fix... I was using "current_user" as the message key for the person who performed the flagging - this works when the message is first generated, i.e.when the flagging actually takes place - but when an admin then does a bulk recreation of messages, the "You flagged..." message gets incorrectly set for the admin user who carried out the bulk operation rather than for the person who did the flagging.
Comment #17
katbailey commentedWith the fix in the previous version, I see no reason not to be able to batch regenerate flag-based activity messages now. Setting batch to TRUE in this version.
Comment #18
g76 commentedsubscribe
Comment #19
pribeh commentedHey, how easy will this be to backport to Activity for D6?
Comment #20
katbailey commented@pribeh my understanding is that the D7 version of activity module is a complete overhaul - I haven't looked at the D6 version at all so I can't say :-/
Comment #21
ngstigator commentedusing patch from #17, Fatal error: require_once() [function.require]: Failed opening required './sites/all/modules/contrib/activity/modules/flag.activity.inc'
fixed by moving "sites/all/modules/contrib/activity/flag.activity.inc" to "module" subfolder.
thanks for all the work, kat!
Comment #22
ngstigator commentedAre there any plans to make available the title of the node that was flagged in the flag entity hook?
Comment #23
katbailey commentedTo grab the node title of the flagged node, use [flag-action:content-title]. And yes, this should totally appear in the available tokens... ;-)
Comment #24
ngstigator commentedThx Katherine! I had a look at exposing those tokens and it was not intuitively obvious to me :-P
Another hidden token is [flag-action:content-url], so to display as a link we can do this:
<a href="[flag-action:content-url]">[flag-action:content-title]</a>Comment #25
likewhoa commentedsubscribing
Comment #26
_shyD7 reached its EOL back in January 2025, and there is no active release for D7 for this module anymore.
Development or support is not planned for D7. All D7-related issues are marked as outdated in a bunch.
If the issue remains relevant for D10+ versions, merge requests with proposed solutions for a new module version (D10+) are welcome in a new follow-up issue.
Thanks!