How to add Alignment Tags to the Badge Image?

navs - May 29, 2009 - 07:42
Project:User Badges
Version:6.x-1.4
Component:User interface
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

How do I add a align=absmiddle tag along with the badge image?

I would like to add alignment tags, how can I do this?
Thanks
Navs

#1

Likeless - August 6, 2009 - 14:30
Status:active» fixed

You want to use the theme system. Individual badges are themed using the theme label 'user_badge'.

Here's the current default theme function:

<?php
/**
* Return html representation of a badge image
* (note: theme_image does the check_plaining)
*/
function theme_user_badge($badge) {
 
$image = theme('image', $badge->image, $badge->name, $badge->name);
  if (
$badge->href != "") {
    return
l($image, $badge->href, array('html' => TRUE));
  }
  else {
    return
$image;
  }
}
?>

For general instructions on how to override this theme function, you'll need the Drupal help pages and forums on that topic.

#2

System Message - August 20, 2009 - 14:40
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.