Closed (duplicate)
Project:
Voting API
Version:
6.x-2.0-rc2
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
7 Mar 2009 at 10:09 UTC
Updated:
9 Oct 2015 at 09:49 UTC
Jump to comment: Most recent
Comments
Comment #1
timlie commentedManaged to get it to work with a views tpl file, views-view-field--viewname--uid.tpl.php
and the following code:
I could have used a custom theme function as well but I'd like to have the default theme function.
Comment #2
altparty commentedI'm looking for a solution too! But I don't understand yours. Can you be a little more specific?
Comment #3
ntt commentedsubscribing
Comment #4
ntt commentedSee http://thedrupalblog.com/category/tags/views-view-fieldtplphp for more about the workaround provided by timlie.
I would think there should be an appropriate views relationship between the users table and the votingapi tables so that it would be easier to accomplish this.
Comment #5
altparty commentedPiece of cake now. Thanks.
Comment #6
eaton commented#327903: Add "Individual voter" relationship - fixed in the official 2.0 release. Thanks!
Comment #7
emartos commentedBe very careful, timlie. Your code has a security bug. When you override $user variable, you could be giving access to your backend to anonymous visitors.
It's always better to use another name, such as $testUser or something similar.
Comment #8
wasimhyder09 commentedIt is very simple to do.
All you need to do is:
And you are all set.
Hope this helps :)