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 |
Jump to:
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.
| Attachment | Size |
|---|---|
| hodnoceni.png | 52.75 KB |

#1
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
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:
<?phpprint fivestar_widget_form($node);
?>
to print out the fivestar rating widget for that node.
#3
Thank you very much, I'll try it :-)
#4