Different fivestar widget display for different node types

jonga - December 8, 2008 - 09:10
Project:Fivestar
Version:6.x-1.13
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

Is it possible to have different widget set for different node types?

Also, which function should I call to get user rating, average rating and votes for a given node and user?

#1

asterix - June 17, 2009 - 17:30

This is exactly what I'm looking for as well...

#2

czeky - August 22, 2009 - 19:36

Hi, for me this is working..

1. fivestar widget is in the user profile page (using content profile module)
2. wanted to display this users profile rating + some other data from profile on every node created by this user..

<?php
global $user;
$account = user_load(array('uid'=>$node->uid));
$nodeprofile = content_profile_load('profile', $account->uid);
//print some of the cck fields..
print check_plain($nodeprofile->field_profile_whatever_cck_field[0]['value']);
//and finally the widget
print fivestar_widget_form($nodeprofile);
?>

now, just looking how to display only stars, without clickable widget

#3

totaldrupal - August 23, 2009 - 17:58

Also looking for different widget set for different node types, is this possible?

#4

Sotek - October 12, 2009 - 17:47

Hello,

can anyone tell me how to just display the static results as stars?

I have disabled the indiscriminate full content print on my nodes, so the stars do not appear anymore, and I would like to know the php command to display it.

By the way, users do not vote, only the author the node can (book reviews).

Thank you !

 
 

Drupal is a registered trademark of Dries Buytaert.