Closed (fixed)
Project:
Flag
Version:
6.x-2.0-beta3
Component:
Flag core
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
27 Jul 2010 at 22:37 UTC
Updated:
11 Aug 2010 at 20:40 UTC
I was hoping one of you smart folks could help me out with a little problem I am running into:
I would like to have my users be able to use flag "A" throughout my site. When they navigate to a certain page (probably the /user page) I need to be able to:
I think I need to use flag_get_user_flags() to return the NID's... but I am not sure, I am just getting into real PHP development (Newb would be fair!). Any nudge in the right direction would be GREATLY appreciated, I have been banging my head into the wall for hours on this!
Comments
Comment #1
quicksketch1. Use flag_get_user_flags() like you have found.
2. Loop through and call the flag() function for each piece of content.
3. In that same loop call the flag() function and pass in the $op = 'unflag'.
I don't provide support on writing custom code in the issue queue.
Comment #2
thechanceg commentedI see. I think I can pull it off with some trial and error. Thank you for confirming I was using the right function.
Comment #3
thechanceg commentedGot it!!!!
Thank you for the great commenting in the flag.module file.
Here is the code that I used:
Comment #4
quicksketchSuper, thanks for the followup.