Fivestar & Views

miloso - May 26, 2007 - 12:39
Project:Fivestar
Version:5.x-1.5
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

Hello,

I want to build a table view with jokes from school (schoolboy howlers?), one row = one joke and I want that every visitor can rate a joke directly from this table view, not only on a node with this joke. Is there any posibility to create a column with Fivestar widget? Something like in my attachment, but with the possibility to vote. Now it's – AFAIK – possible to display rating only.

AttachmentSize
hodnoceni.png52.75 KB

#1

miloso - June 2, 2007 - 16:41

Is there anybody in there? :-)

Am I requesting this feature on wrong place, am I asking for stupid and easy as pie thing, am I propounding duplicate question or is this feature „work-in-progress“? Please, answer me, I'm hopeless now.

#2

quicksketch - June 5, 2007 - 04:25

You'll need to use the standard table (or list) view, displaying your 'joke' field. That's all that will need to be done in views. Then using the views theme wizard, create a theme function for your view. Paste the code into the places it tells you. In your .tpl.php file for the view use:

<?php
print fivestar_widget_form($node);
?>

to print out the fivestar rating widget for that node.

#3

miloso - June 5, 2007 - 14:37

Thank you very much, I'll try it :-)

#4

quicksketch - July 3, 2007 - 07:43
Category:feature request» support request
Status:active» closed
 
 

Drupal is a registered trademark of Dries Buytaert.