I can't get the stylesheet included when using the following line in a custom panel:

print theme('fivestar_static', tel_get_votes('node', arg(0), $tag = 'scherm', $uid = NULL), '5', 'scherm');

It does wrap the output in the <div>'s for fivestar, but the stylesheet is not included.

Comments

Michsk’s picture

Issue summary: View changes
didn't show correctly
moallemi’s picture

Version: 7.x-2.x-dev » 7.x-2.0-alpha1

I have the same problem

raphael apard’s picture

There is a problem in fivestar.theme.inc (function theme_fivestar_static) :

if($widget['name'] != 'default') {
  drupal_add_css($widget['css']);
}

So you have to define "'widget' => array('name' => 'basic', 'css' => $path_to_fivestar . '/widgets/basic/basic.css')".
And fivestar is not added.

This code works for me :

$path = drupal_get_path('module', 'fivestar');
drupal_add_css($path . '/css/fivestar.css');
$widget = theme('fivestar_static', array(
  'rating' => $note,
  'stars' => 5,
  'tag' => 'vote',
  'widget' => array('name' => 'basic', 'css' => $path . '/widgets/basic/basic.css'),
));

but if someone have some time to add automatically css (based on widget name). It will be better.

raphael apard’s picture

Issue summary: View changes

again

dbt102’s picture

Issue summary: View changes
Status: Active » Closed (outdated)