The HTML returned by contact.author-panel.inc does not include a link title or include the correct tags to pull in the email icon from CSS. (The HTML generated by privatemsg.author-pane.inc does do this.) I modified my contact.author-pane.inc file so that it returns the same structure as the private message code.

The original code is commented out and the new code is immediately below that.

function contact_preprocess_author_pane(&$variables) {
  // Check if this preprocess needs to be run given who's calling it.
  if (!author_pane_run_preprocess('contact', $variables['caller'])) {
    return;
  }

  //$variables['contact'] = l(t('Send Email'), 'user/' . $variables['account']->uid . '/contact', array('attributes' => array('class' => array('author-pane-link'))));

  if (_contact_personal_tab_access($variables['account'])) {
	$variables['contact'] =
	l('<span>' . t('Send Email') . '</span>', 'user/' . $variables['account']->uid . '/contact',
		array('attributes' =>
			array('class' => array('author-pane-link'),
			'title' => t('Send ' . $variables['account']->name . ' an email.')),
			'html' => TRUE
		)
	);
  }
}

Not sure if this is the correct place to make that modification, but using the private message code as an example it seems so. Hopefully this will help others who are searching for the missing email icon in Advanced Forums and it can be incorporated into the production code stream.

B

Comments

SimonLitt’s picture

There are an mistake at the fix.
Insted:

'title' => t('Send ' . $variables['account']->name . ' an email.')),

should be

'title' => t('Send @accountname an email.', array('@accountname' => $variables['account']->name))),
SimonLitt’s picture

Issue summary: View changes

Updated pasted code to include complete function.

jay.lee.bio’s picture

Hi guys, thanks so much. And if anyone's using the Real Name module, just remember to replace "name" with "realname".

Scyther’s picture

Status: Active » Fixed

Fixed and commited.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.