Add "stumble" class to allow theming of the "Stumble" link (using an image)
andrewjj - June 25, 2007 - 05:39
| Project: | Stumble |
| Version: | 5.x-1.0 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Dave Reid |
| Status: | closed |
Description
Hi, this is a great module!
Could you please should me how to use an image instead of the 'Stumble' text link.
Thanks.
Andrew

#1
Sorry that should have read:
Could you please show me how to use an image instead of the 'Stumble' text link.
Thanks.
#2
This is untested but it should work. Replace the stumble_link() function in the Stumble module with this code (or apply the attached patch) and then add the appropriate CSS in your theme's CSS to theme the new "stumble-link" element.
function stumble_link($type, $node = NULL, $teaser = FALSE) {
$links = array();
if ($type == 'node' && !$teaser) {
$links['stumble'] = array(
'title' => t('Stumble'),
'href' => 'node/'. stumble_get_nid(),
'attributes' => array(
'class' => 'stumble-link',
),
);
}
return $links;
}
#3
Just pushed out a 5.x-1.1 release that adds a 'stumble' class to the link.
As for using an image, I'm not quite sure what CSS you'd use on your site's theme exactly, but I'm sure someone does know around here.
#4
Automatically closed -- issue fixed for two weeks with no activity.