Closed (fixed)
Project:
Rate
Version:
7.x-1.1-beta1
Component:
Code
Priority:
Major
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
6 Mar 2011 at 20:49 UTC
Updated:
25 Oct 2011 at 13:20 UTC
I created a rate widget with tag "user_rating". In views when I try to create a Vote results relationship, the only selections under vote tag are 'No filtering' and 'Normal vote'. The widget does not display in the view. I'm sure I'm missing something, but tried to follow the readme...what am I doing wrong? thanks a million in advance for any help.
Comments
Comment #1
restyler commentedI got the same problem. it looks like rate module authors forgot to register new tags in votingapi.
To fix it, add this code to the end of rate.module:
Comment #2
TimelessDomain commentedit works (#1)! thanks
Comment #3
TimelessDomain commented#1 seems to work for everything except for "options" Values Type
I tried every possible setup & have narrowed it down to the fact that "Options" cannot be selected in the "Value: Type" drop-down of the "Relationship: Content: Vote results"
Comment #4
restyler commentedHere is the code to fix options (replace the whole function with new code)
Comment #5
TimelessDomain commentedThanks restyler.
This brought up the different options within an option rate widget under the aggregation function, but the "Value Type" is still missing "Options". Thus the options widget still won't display in views
Comment #6
craspouille commentedHi!
Has anyone managed to display the options widget in views?
thanks :-)
Comment #7
leewoodman commentednot yet...
Comment #8
rogical commentedthis features is very important, hope to see this soon!
Comment #9
nyoz commented+1 For now, no Views integration is possible without this issue being fixed... :(
Comment #10
nyoz commentedComment #11
msypes commentedsubscribing.
Actually, I'm not seeing any integration with views. I'd like to be able set up the ability to vote on a node via a view rather than needing to get to the node display itself.
Comment #12
Sylense commented+1
Comment #13
Sylense commentedI've applied the patch but I think I'm in need of the same thing mentioned in #11. I can embed a widget on the node page with no problem using the php embed code or views. But what I need is the ability to display the widget on a views display, e.g...
Node A has a rate widget displayed on itself
Node B has a rate widget displayed on itself
Node C has a rate widget displayed on itself
View 1 has a listing of all nodes (A, B, C)
I need the ability to print the rate widget on the View as a field so you can vote not only from the actual node but from the view. Am I just missing something? This is a MAJOR necessity for a site I'm working on and I'd be willing to offer a bounty to have the Rate module for D7 fully functional with maybe Field UI support
Comment #14
Sylense commentedUpdate, in case anyone else might need to accomplish something similar:
I've been able to achieve alot of what I want using the patch/code above in combination with views and entity views attachment. I am also using the fivestar module in addition to the rate module and everything so far seems to work ok.
Comment #15
msypes commentedSylense,
Your goal in comment #13 is exactly what I'm trying to do as well. I'd certainly appreciate you posting any other details on how you accomplished this.
Thanks.
Comment #16
Sylense commentedI just created an "Entity Content" view using the entity views module. In the view I have my Rate/vote relationship set up and added Vote results field using that relationship. Entity views then allows you to use the view as a field in the content type so I just placed it where I wanted using Display suite. Seems to work perfectly thus far.
Comment #17
dangko commented#13 and #15
+1
I'm trying exactly the same thing.
I'm using thumbs up with the rate-widget and I'm trying to display the rate-widget to enable voting on a node in a slider-view.
Something similar: the Service_links-module appears as a field-option when I'm creating the view. And whenever a different item(node) is being dispIayed, the servicelinks change change accordingly with the main-item in the slider.
I'm trying something similar for the rate-widget, but I'm only able to fetch results in a view. Not the ability to vote itself.
any help would be appreciated
Regards
Comment #18
dangko commentedI think I actually managed to create this with a bit of coding:
I installed views_php module: http://drupal.org/project/views_php
Which enables PHP code for fields in the Views module.
I added the following code in rate.module
Which is a slight variation of the rate_embed function.
In Views-fields we can't pass on entire $node objects, but we HAVE access to the $row->nid (node_id). if we have a hidden field with content:node-id.
So basically instead of using the $node object (to pass on the id) I wrote the code in rate.module to directly use the nodeid.
So we can now create a PHP field in the viewsmodule. In the output field you can use the following code:
Where the systemname is the system name of the widget you've created.
Another thing I've noticed is that you should order all fields containing data you want to use BEFORE the php-field.
Hope this helps for those who were struggling with the same problem I had.
Comment #19
mauritsl commentedVotingAPI 6.x had the possibility to fill in your own tag, but D7 doesn't. Rate indeed doesn't register this tag like restyler said in comment #1. I've added this to Rate now. This makes the option value type showing too.
Commited to GIT.
A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.
Comment #20
nafmarcus commentedTo clarify:
Any idea when to expect the next official release for D7?
Will this release have widget integration with views without needing a patch or will the patch still be necessary?
Comment #21
mauritsl commentedThis is already in the 7.x-1.2 release. There is no need for a patch anymore.