Is it possible to flag one thing to decrease the number of flags on something else. This would create 2 buttons for an up-down functionality.

Comments

chadchandler’s picture

I'll help the module maintainers out here and say "anything is possible", but this is not the functionality of this module currently. If you are looking for a "voting" solution check out the vote up down module as well as extra voting forms.

Flying Drupalist’s picture

Category: support » feature

Yes, I have a great voting API implementation of this already. But voting API does not integrate with actions currently, and flag does! If flag can add a few more features to become a more generic voting solution, I think that would be quite nifty. So I guess I'm changing the category of this issue.

Thanks for answering the question Prodigy. I'm interested if a maintainer thinks it's possible for flags to go into this direction. Thanks for listening.

chadchandler’s picture

mooffie’s picture

Is it possible to flag one thing to decrease the number of flags on something else.

It's about to be possible.

Today you can already do "If this node is flagged using the 'spam' flag, send e-mail". It's as simple to make it do "If this node is flagged using the 'agree' flag, unflag this node using the 'disagree' flag".

What's missing is a 'flag/unflag' action.

A 'flag/unflag' action will be provided with the Rules intergration. A 'flag/unflag' action is not currently provided with the standard Actions integration.

But there's another issue: refreshing the display. You'd want to refresh both the 'agree' and 'disagree' links when one of them is updated. You can do this right now by turning off the 'ajax' feature (and thereby refreshing the whole page), but some other solution is desired (I'm intereseted in such a feature).

Flying Drupalist’s picture

Thanks mooffie! I'm awaiting eagerly. I didn't even think about the refreshing problem. Perhaps to solve that you can enable the user to set a relationship between two flags?

mooffie’s picture

Status: Active » Fixed

Miraploy, I've opened a new issue:

#312241: Refreshing a group of links

mooffie’s picture

And, of course, Prodigy is right in saying that there are better solutions for voting.

Flying Drupalist’s picture

Thanks again, I'll stick with my voting API modules until flag becomes ready, and switching the moment it does. :D

Anonymous’s picture

Status: Fixed » Closed (fixed)

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