Removing reply link in comments and forums

The following code will remove the reply link in comments. This includes comments in forums ie, the reply to a topic. The following code goes in the template.php file in the theme.

function _phptemplate_variables($hook, $vars = array()) {
    switch ($hook) {     
    case 'comment':
    $linksexpl = explode("</li>", $vars['links']);
    $link1 =  "$linksexpl[0]</li>";
    $link2 = "$linksexpl[1]</li>";
    $link3 = "$linksexpl[2]</li>";
    $link4 = "$linksexpl[3]</li>";
    $vars['links'] = $link1. $link2. $link4;
  }
  return $vars;

Add new comment