Closed (duplicate)
Project:
Flag
Version:
7.x-3.x-dev
Component:
Flag core
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
29 Mar 2012 at 19:40 UTC
Updated:
16 Oct 2012 at 19:31 UTC
Jump to comment: Most recent
Comments
Comment #1
webroru commentedThis topic interests me as well. Did you manage to find a solution?
Comment #2
mikemadison commentedI haven't heard anything back, and to the best of my knowledge it is still not functioning.
Comment #3
miklThe same request, in reverse, on the Search API issue queue: #1634620: Flag module integration?.
Comment #4
mgriebe commented+1
Comment #5
joachim commentedUpping the version.
Comment #6
mikemadison commentedThere is some code over in the SearchAPI side of this request that works, but not as I was hoping. See - http://drupal.org/node/1634620#comment-6417498
My solution was to use the http://drupal.org/project/views_php module to add a php field, and then just used the flag api to pass in the link. So, the contents of my php field were:
bookmark being the type of flag, and $data->entity being the node id. In this case, I would never have anything but a nid in the entity itself.
I'm going to mark this as closed a dup of http://drupal.org/node/1634620 since for my purposes, it is effectively "ok" given the API call. Feel free to reopen if someone wants to take the request in a different direction.
Comment #7
joachim commentedUsing views_php is not an adequate fix IMO -- it's a hack, not a solution.
However, the code on that other issue seems to show this can be fixed with #1315850: Add support for Entity API properties.
Comment #8
mikemadison commentedAgree that it's not adequate, but given no real progress in a few months, it was better than the cobwebs I had =)
Comment #9
grasmash commentedTo get flag count data into the index, try this:
I'm considering writing something that would also store the UIDs of 'flaggers' on the entity as well, but that may simply be too inefficient. The goal is to be able to search for nodes flagged by current user, or user x.
Comment #10
joachim commentedPlease see the issue I linked to and help there if you can.
Comment #11
grasmash commented@joachim
I'll work on an updated version of the patch, with your suggestions included, and flag count snippet from #1634620: Flag module integration?.
Comment #12
user654 commented.