00001 <?php 00002 00008 class views_handler_field_comment_link_reply extends views_handler_field_comment_link { 00009 function access() { 00010 //check for permission to reply to comments 00011 return user_access('post comments'); 00012 } 00013 00014 function render_link($data, $values) { 00015 $text = !empty($this->options['text']) ? $this->options['text'] : t('reply'); 00016 $nid = $this->get_value($values, 'nid'); 00017 $cid = $this->get_value($values, 'cid'); 00018 00019 $this->options['alter']['make_link'] = TRUE; 00020 $this->options['alter']['path'] = "comment/reply/" . $nid . '/' . $cid; 00021 00022 return $text; 00023 } 00024 }