*** fivestar.module.orig 2007-12-21 23:17:56.000000000 -0600 --- fivestar.module 2007-12-22 13:48:55.000000000 -0600 *************** *** 727,732 **** --- 727,759 ---- } } + + /** + * Implementation of hook_link() + * + * Add a "rate" link to node teaser. + */ + function fivestar_link($type, $node = NULL, $teaser = FALSE, $links = array()) + { + $links = array(); + + // Add "rate" link to teaser if rating form isn't already displayed. + if ($teaser) { + $position = variable_get('fivestar_position_teaser_'. $node->type, 'above'); + if ($position == "hidden") { + $links['rate'] = array( + 'title' => t('Rate'), + 'href' => "node/$node->nid", + 'fragment' => 'rate', + 'attributes' => array('title' => t('Rate this article.')), + ); + } + } + + return $links; + } + + function fivestar_block($op = 'list', $delta = 0, $edit = array()) { global $user; switch ($op) { *************** *** 750,756 **** } function fivestar_widget_form($node) { ! return drupal_get_form('fivestar_form_node_' . $node->nid, 'node', $node->nid); } /** --- 777,785 ---- } function fivestar_widget_form($node) { ! $output = ""; ! $output .= drupal_get_form('fivestar_form_node_' . $node->nid, 'node', $node->nid); ! return $output; } /**