It seems to me that there's no chance to fire actions upon flag change but only when reaching or falling below a certain threshold.
I need to execute an action each time an user click the 'bookmark this' link.
Am I missing something?

Comments

mooffie’s picture

It seems to me that there's no chance to fire actions upon flag change

You're right.

You can easily do what you want using the Rules integration.

(Drupal's own Actions/Triggers mechanism is quite limited, that's why we can't, or shouldn't, provide a more extensive integration for it. We shouldn't give our users the false impression Actions/Triggers can solve their problems.)

quicksketch’s picture

I thought about this scenario when first writing the "Flag Actions" module, and I'd certainly like to enhance it to work in this situation. My idea was to provide a "Repeat this action for every [ x] flagging(s)". So you could setup something like "Perform this actions after [10] flaggings and repeat this action for every [5] additional flagging(s)".

But like Mooffie says, there are only a limited amount of situations that core's actions will be able to handle. However, I think this is common enough that it would be excellent to include.

paganwinter’s picture

Hi,

@bob_hirnlego
Sometime back I had read an article/guide on flag that talked about being able to call custom Javascript functions on setting/un-setting of flags.

The handbook section has gone haywire and I just can't seem to find that article again.
Could someone point out where I could find that?

Edit:
Below is the link:
http://drupal.org/node/336122

bob_hirnlego’s picture

@paganwinter
I resolved using (more or less) the same approach. Thanks for the resource anyway.

paganwinter’s picture

I used Block Refresh along with the above snippet to refresh a Views block upon flagging/unflagging of certain nodes.

mitchell’s picture

Status: Active » Fixed

Seems fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.