Moved Forums

ThemeSnap.com Forums have Moved! Please note that our forums have moved here: New ThemeSnap.com Forums. You will still be able to read forum threads in the forum categories or threads below. However, you will not be able to post new forum topics or replies to existing threads. Please post any new forum posts in our new forum section by registering a new account.

Printer-friendly icon bug

No replies
clemente
clemente's picture
Offline
Joined: 05/14/2008
Points: 0

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. If you have a Gravatar account associated with the e-mail address you provide, it will be used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <strong> <code>
  • Lines and paragraphs break automatically.
  • Each email address will be obfuscated in a human readable fashion or (if JavaScript is enabled) replaced with a spamproof clickable link.

More information about formatting options

Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.