Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
As far as I understand, now it's impossible to select user object as target for voting in fivestar widget field settings.
(I've checked fivestar_fivestar_target_info() and it's just nodereferences)
is it a problem with 2.x branch to implement user support? do you have plans to implement this?
Comment | File | Size | Author |
---|---|---|---|
#10 | fivestar_userref_fix.patch | 2.16 KB | segi |
#3 | fivestar_userref.patch | 2.2 KB | restyler |
Comments
Comment #1
ericduran CreditAttribution: ericduran commentedNo problem, just didn't write it. If someone wants to write it all patches are welcome.
Comment #2
ericduran CreditAttribution: ericduran commentedComment #3
restyler CreditAttribution: restyler commentedHere is the patch:
Comment #4
restyler CreditAttribution: restyler commented(against alpha1)
Comment #5
ericduran CreditAttribution: ericduran commented@restyler Awesome.
A couple of comments:
Those extra white spaces should be removed
We can avoid the if (module_exists(...)). I'm thinking we set up a fivestar.targets.inc
file and in there we can declare each module as a separate hook such as user_reference_fivestar_target_info() and node_reference_fivestar_target_info()
that way those options are only available when the modules exists and also every module get implemented correctly. :)
It'll also allow us to to a user_fivestar_target_info so we can target the Node Author, etc..
Thought? I think this would be better for the long run so we can start separating out the code. But besides that everything else looks Great.
Comment #6
restyler CreditAttribution: restyler commentedI agree, the hook approach should work fine here.
Comment #7
Shadlington CreditAttribution: Shadlington commented#3 works for me :)
Comment #8
Shadlington CreditAttribution: Shadlington commented-Deleted-
Comment #9
ericduran CreditAttribution: ericduran commentedJust making sure test pass. It should since most of this functionality isn't tested.
Comment #10
segi CreditAttribution: segi commentedIt works me too. I resubmit the patch with some minor coding standard fixing. I hope it will be the part of module, because it is waiting for a while.
Comment #11
whiteph CreditAttribution: whiteph commentedThanks everyone :)