Imagine implementing a "vote up/down" system using this module. Flagging using "agree" would unflag using "disagree", and vice versa. But we then need to refresh _both_ links. Refreshing the whole page is a solution, but isn't a very elegant one.

Another scenario:

Implementing a semaphore. The Rules integration has a "trim" flag, which enables us to mimic NodeQueue's "size of queue". Suppose we limit our queue to 1. Flagging one node would unflag all others. Again, we need a way to refresh all links.

Comments

Flying Drupalist’s picture

subscribe

mooffie’s picture

The Rules integration has a "trim" flag

A typo. I meant "a 'trim' action".

mooffie’s picture

Component: Code » Flag core
Status: Postponed » Closed (duplicate)

I'm marking this issue a duplicate, of the following things:

- The Flag Classes module can help with the pyrotechnics.

- And #952114: Have hook_flag_validate() for access control.

- (Another pyrotechnic-related issue is #926252: Factor out the JavaScript info building , which allows us, by implementing hook_flag_javascript_info_alter(), to send a rendition of the updated links to the browser.)