| 1 |
<?php |
<?php |
| 2 |
// $Id: fivestar.module,v 1.25 2009/07/01 03:06:11 quicksketch Exp $ |
// $Id: fivestar.module,v 1.26 2009/07/01 03:28:09 quicksketch Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 466 |
function fivestar_nodeapi(&$node, $op, $teaser, $page) { |
function fivestar_nodeapi(&$node, $op, $teaser, $page) { |
| 467 |
switch ($op) { |
switch ($op) { |
| 468 |
case 'view': |
case 'view': |
| 469 |
if (!in_array($node->build_mode, array(NODE_BUILD_PREVIEW, NODE_BUILD_SEARCH_INDEX, NODE_BUILD_SEARCH_RESULT)) && !isset($node->modr8_form_teaser) && variable_get('fivestar_'. $node->type, 0)) { |
$exclude_modes = array( |
| 470 |
|
NODE_BUILD_PREVIEW, |
| 471 |
|
NODE_BUILD_SEARCH_INDEX, |
| 472 |
|
NODE_BUILD_SEARCH_RESULT, |
| 473 |
|
NODE_BUILD_RSS, |
| 474 |
|
); |
| 475 |
|
if (!in_array($node->build_mode, $exclude_modes) && !isset($node->modr8_form_teaser) && variable_get('fivestar_'. $node->type, 0)) { |
| 476 |
if ($teaser) { |
if ($teaser) { |
| 477 |
$position = variable_get('fivestar_position_teaser_'. $node->type, 'above'); |
$position = variable_get('fivestar_position_teaser_'. $node->type, 'above'); |
| 478 |
} |
} |