Closed (duplicate)
Project:
Flag
Version:
6.x-2.0-beta3
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
16 Sep 2010 at 15:19 UTC
Updated:
27 Oct 2010 at 12:02 UTC
Hey guys,
I've a "like" button yet like facebook, but I want a "dislike" too. When a user click on "like", he shouldn't be able to "dislike" a node. Should I do that with css and rules?
What would you do?
Thanks
Yannick
Comments
Comment #1
quicksketchI would use Vote Up/Down module instead of Flag.
#704184: Vote Up Down Module vs. Flags
#563520: Can I use this module as a voting system?
#319448: Tri-state flags - yes/no/maybe
Comment #2
yannickooBut we have so much views with flag yet. But it's possible to unflag a node if it's glag as "dislike" or?
Thanks
Yannick
Comment #3
quicksketchFlag is not meant to be a 3-way system. You can try and contruct one using 2 flags (one for like and one for dislike), but it will not provide you with the level of information you'd be wanting. You really should use Vote Up/Down if you want a "point-based" system that can go both up and down.
Comment #4
yannickooNo, I don't want a point-system, I just want give users the option to dislike somethink and display which nodes are disliked.
And: If a node is liked, it can't be disliked.
No more :)
Comment #5
mooffie commentedOne option is to use the Flag Classes module, which, using CSS, lets you easily hide/show (or dim/highlight) elements that aren't relevant. So you could show only the relevant link (either 'like' or 'dislike').
But to actually enforce the access control you'd need to implement hook_flag_access(). It's possible that we'll have an easier-to-use feature: #952114: Have hook_flag_validate().
I'm marking this a duplicate of #952114: Have hook_flag_validate().