Hi,

I'm theming the links in the Author Pane to look like buttons. As I'm theming in a way that allows the button to be expanded to take any length of text, I need to have a span tag wrapped around the anchor text.

The span tag is already included for the PM system as shown below.

Like:
<a href="/messages/new/20" class="author-pane-link" title="Send Andreas a private message"><span>Send PM</span></a>

However the contact 'email' doesn't include a span tag. I found this in the contact.author-pane.inc file.

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

How can I edit this to force it to include the span tag?

Thanks

Comments

AusJohn’s picture

...

AusJohn’s picture

Issue summary: View changes

edited mistake

Scyther’s picture

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

Scyther’s picture

Issue summary: View changes
Status: Active » Fixed

Best way to change it is in your templete.php file in your theme folder.

You add this code


function THEMENAME_preprocess_author_pane(&$variables) {
  $variables['contact'] = l('<span>' . t('Email') . '</span>', 'user/' . $variables['account']->uid . '/contact', array('attributes' => array('class' => array('author-pane-link'))));
}

Status: Fixed » Closed (fixed)

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