Download & Extend

How to add Alignment Tags to the Badge Image?

Project:User Badges
Version:6.x-1.4
Component:User interface
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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

Comments

#1

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

Status:fixed» closed (fixed)

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