Hi everyone,

thanks for making this module work under drupal 7.

I installed the module and wanted to add a "unflag" link to my view but can't find it in the available fields.

Does anyone have the same issue?

Comments

zhuber’s picture

The only views field for this module is the 'Clear flag link' field. I'm still working on getting the unflag view field to work with user specific 'unflag' links. The issue is getting the UID from the flag relationship, it is not currently available so I will need a way to figure out how to get these values.

baschke’s picture

okay. thx for the reply

so there is no way yet to unflag a user specific node flag right?

zhuber’s picture

There is a menu entry for it, but no views handler.
The menu item is:
unflag/user/%/%/% (unflag/user/[entity-id]/[flag-id]/[user-id])

For example, you could put something like this in your node tpl:

  print l('Unflag', '/unflag/user/' . $node->nid . '/custom-flag/' . $user->uid);

This would print a link out to unflag the current node for a given user.

The difficult part is getting the user ID and flag ID from a views argument. I'm hoping to settle this one day, but don't have the time right now.

zhuber’s picture

Status: Active » Needs work

I'm going to add a view that allows you to select which content and user to unflag.

zhuber’s picture

Assigned: Unassigned » zhuber
zhuber’s picture

Status: Needs work » Fixed

I've created a new views field handler that allows you to add an 'Unflag' field to your views. This field requires a flag user field to be output. This means you will need the following relationships:

  1. Flags
  2. Flags: User

As well as one of the following:

  • User: Name (flags_user)
  • User: Uid (flags_user)
  • Flags: User uid (flags_user)
zhuber’s picture

Status: Fixed » Closed (fixed)