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.
We can set a node as a voting target when using the node reference cck field.
Would it be possible to set a term as voting target, since in D7 we work with entity's we now could rate a term, so we also could create a review node for a term.
Comments
Comment #1
ericduran CreditAttribution: ericduran commentedYes, totally possible, Also not extremely hard, someone just needs to write the code.
Comment #2
mfoda CreditAttribution: mfoda commenteddoes that mean that this is not possible right now with the current release (7.x-2.0-alpha2)?
Comment #3
Michsk CreditAttribution: Michsk commentedyes, it is as this moment not possible to rate terms.
Comment #4
mfoda CreditAttribution: mfoda commentedwould either of you guys be willing to help me with writing the code for this? I managed to set my voting target to the taxonomy term itself (using an entity reference field), and I also added the fivestar rating fields under the term's page. So I don't see why this wouldn't work since terms are also entities.
Please let me know. If not, I will go ahead and create a node for each taxonomy term and target the votes on the node reference field instead of the term reference. I would rather not do it though.
Thanks
Comment #5
Michsk CreditAttribution: Michsk commentedYou didn't understand correctly.
It is possible, but not right out of the box.
Comment #6
mfoda CreditAttribution: mfoda commentedCan you please explain. How can I make it work if it's possible? Do I need custom code?
Comment #7
mfoda CreditAttribution: mfoda commentedBy the way I have installed the patch to enable targeting fields from the entity reference module. So I can actually target the term reference field in the widget's settings. It's just that when I add the fivestar field in my views it shows zero votes if I enforce the entity reference relationship. I think it's because in my relationships I have "Content: vote results" but I actually need "term: vote results". Couldn't get this to work.
Comment #8
krem CreditAttribution: krem commentedHi there,
Could you confirm that what I need is also possible, if so I will work on the code :
User A creates taxonomy terms corresponding to games he plays, for exemple he could create on his profile the terms 'Modern Warfare / Diablo III / Grand theft Auto'.
I would like to let users rate (Noob -> Expert) each other terms :
+ User C rates as 'Noob' User A in 'Modern Warfare'
+ User D rates as 'Normal' User A in 'Modern Warfare'
In the end I want to get ratings for each term of each user, do you think it's possible ? Do you see a better solution ? Do you need me to explain better my needs ?
Best Regards,
Clem
UPDATE:
I believe I found a solution in my case by simply creating nodes with a taxonomy term field and rate field
Comment #9
warmth CreditAttribution: warmth commentedI'm also trying to create a rating system for terms.
One user update a file and create/select up to 3 tags for it. Other users grade the content tagged from 1 to 5 but also they can review each tag so if the user tagged the file with a fake tag that tag will get a very bad rating so I can rearrange a view to display the contact tagged with X tag by how much that tag represents the content.
Is that possible?