/ Published in: PHP
Drupal FiveStar change any of the settings as necessary to create a completely customized widget, regardless of the node type settings.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php $votes = fivestar_get_votes($content_type, $content_id, $tag); $node_type = $node->type; 'average' => (int)$value, ); 'stars' => variable_get('fivestar_stars_'. $node_type, 5), 'allow_clear' => variable_get('fivestar_unvote_'. $node_type, FALSE), // If the user has setup this content type to use smart stars, display // the smart version instead of just the average. 'style' => variable_get('fivestar_style_'. $node_type, 'average') != 'smart' ? 'average' : 'smart', 'text' => $summary ? variable_get('fivestar_text_'. $node_type, 'dual') : 'none', 'content_type' => 'node', 'content_id' => $node->nid, 'tag' => $tag, 'autosubmit' => TRUE, 'title' => FALSE, 'feedback_enable' => $summary ? variable_get('fivestar_feedback_'. $node_type, 1) : FALSE, 'labels_enable' => $summary ? variable_get('fivestar_labels_enable_'. $node_type, 1) : FALSE, ); print drupal_get_form('fivestar_custom_widget', $values, $settings); ?>
URL: http://drupal.org/node/313968