Vi ste ovdje

Drupal 7 custom privatemsg block - count new messages

Adaptivetheme

 

file -> preprocess.inc

function theme-name_privatemsg_new_block($count) {
  $count = $count['count'];
  if ($count == 0) {
    $text = '<div></div>';
return '<div class="pm">'.
l('<img src="//www.aranea-web.eu/sites/all/themes/theme-name/css/images/privmsg.gif"
alt="PM" />', 'messages', array('html' => TRUE)).'</div>';
  }
  else {
    $text = format_plural($count, '1', '@count');
return '<div class="pm">'.
l('<img src="//www.aranea-web.eu/sites/all/themes/theme-name/css/images/privmsg.gif"
alt="PM" />', 'messages', array('html' => TRUE)).'<div class="newpm">'.
l($text, 'messages', array('attributes' => array('id' => 'privatemsg-new-link'))).
'</div></div>';
  }
 
}