How about porting the flag integration to D7?

CommentFileSizeAuthor
#6 1157660-6.patch2.78 KBswentel
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

swentel’s picture

Status: Active » Closed (works as designed)

Flags come up as soon as the $links variable is placed into a layout, so not sure what else I could do here.

attiks’s picture

I created a sandbox that exposes flags as fields, for the moment only for nodes.

AdamGerthel’s picture

I found a very old thread recommending putting this in a custom field:

<?php return flag_create_link('favorites', $object->nid); ?>

But that doesn't work. Trying to flag something returns:

An HTTP error 404 occurred.
http://siteurl.dev/flag/flag/favorites/?destination=wall&token=k-siGS_fH...

I'm gonna try your sandbox

swentel’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Status: Closed (works as designed) » Active

Will try to integrate this during the sprint this weekend.

AdamGerthel’s picture

The sandbox project in #2 works

swentel’s picture

Status: Active » Fixed
FileSize
2.78 KB

Committed this in extras module.

Status: Fixed » Closed (fixed)

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

AdamGerthel’s picture

Is the sandbox version the same code that was committed to dev? I just discovered (when using the sandbox module) that it only works when there's just a single content type checked (in the settings screen for that particular flag). If you choose to have the flag available for more than one content type, the field disappears.

attiks’s picture

Status: Closed (fixed) » Active
szantog’s picture

Status: Active » Closed (fixed)

#8 The flag integration is done, moved into separate issue: #1710522: Wrong ui limit settings on flag fields