Printer-friendly icon bug

Posts: 3
Joined: 2008-05-14
User is offline
Printer-friendly icon bug

When you have more node footer link than just "write a comment", and you add, for example, the printer.friendly module, or bookmark, the icon of "write a comment" shift always to the last link. I think it's wrong to rely on link order to add the correct icon ;-)

I changed the code in themes/efficient/template.php:

// Add first and last classes to the list of links to help out themers.
      $extra_class = '';
      if (strstr($link['href'], "comment") != FALSE) {
        $extra_class .= 'comment ';
      }
      if (strstr($link['href'], "node") != FALSE) {
        $extra_class .= 'read ';
      }
      if (strstr($link['href'], "print") != FALSE) { 
        $extra_class .= 'print ';
      }
      $output .= '<li class="'. $extra_class . $class .'">';

And consequently the style.css file:

 .nodelinks li.read {
  background: url(images/readmore-mn.gif) no-repeat;
  margin-left: 6px;
  padding: 2px 3px 0 22px;
}

.nodelinks li.comment {
  background: url(images/comment-mn.gif) no-repeat;
  margin-left: 4px;
  padding: 2px 3px 0 22px;
}

.nodelinks li.print {
  background: url(images/printer-friendly.gif) no-repeat;
  margin-left: 4px;
  padding: 2px 3px 0 22px;
}

 

 

Now it works.  


Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
Are you a human visitor or just some spam droid?