Révision d756b39a
Ajouté par Assos Assos il y a environ 8 ans
drupal7/sites/all/modules/fivestar/includes/fivestar.field.inc | ||
---|---|---|
80 | 80 |
$form['allow_revote'] = array( |
81 | 81 |
'#type' => 'checkbox', |
82 | 82 |
'#title' => t('Allow users to re-vote on already voted content.'), |
83 |
'#default_value' => isset($instance['settings']['allow_revote']) ? $instance['settings']['allow_revote'] : FALSE,
|
|
83 |
'#default_value' => isset($instance['settings']['allow_revote']) ? $instance['settings']['allow_revote'] : TRUE,
|
|
84 | 84 |
'#return_value' => 1, |
85 | 85 |
); |
86 | 86 |
|
87 | 87 |
$form['allow_ownvote'] = array( |
88 | 88 |
'#type' => 'checkbox', |
89 | 89 |
'#title' => t('Allow users to vote on their own content.'), |
90 |
'#default_value' => isset($instance['settings']['allow_ownvote']) ? $instance['settings']['allow_ownvote'] : FALSE,
|
|
90 |
'#default_value' => isset($instance['settings']['allow_ownvote']) ? $instance['settings']['allow_ownvote'] : TRUE,
|
|
91 | 91 |
'#return_value' => 1, |
92 | 92 |
); |
93 | 93 |
|
... | ... | |
133 | 133 |
else { |
134 | 134 |
$rating = (isset($items[$delta]['rating'])) ? $items[$delta]['rating'] : 0; |
135 | 135 |
} |
136 |
$target = _fivestar_field_target($entity, $field, $instance, $item, $langcode);
|
|
136 |
$target = _fivestar_field_target($entity, $field, $instance, $item, $langcode); |
|
137 | 137 |
if (!empty($target)) { |
138 | 138 |
if ($entity_type == 'comment' && $op == 'delete') { |
139 | 139 |
$target['vote_source'] = $entity->hostname; |
... | ... | |
358 | 358 |
), |
359 | 359 |
), |
360 | 360 |
'fivestar_formatter_rating' => array( |
361 |
'label' => t('Rating (i.e. 4.2/5)'),
|
|
361 |
'label' => t('Rating (e.g. 4.2/5)'),
|
|
362 | 362 |
'field types' => array('fivestar'), |
363 | 363 |
), |
364 | 364 |
'fivestar_formatter_percentage' => array( |
365 |
'label' => t('Percentage (i.e. 92)'),
|
|
365 |
'label' => t('Percentage (e.g. 92)'),
|
|
366 | 366 |
'field types' => array('fivestar'), |
367 | 367 |
), |
368 | 368 |
); |
Formats disponibles : Unified diff
Weekly update of contrib modules