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

andrewjj - June 25, 2007 - 05:41

Sorry that should have read:
Could you please show me how to use an image instead of the 'Stumble' text link.

Thanks.

#2

Christefano - January 20, 2008 - 03:22
Title:Using an image» Add "stumble-link" class to allow theming of the "Stumble" link (using an image)
Status:active» needs review

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;
}

AttachmentSize
stumble-themelink.patch 328 bytes

#3

Dave Reid - March 3, 2008 - 07:11
Title:Add "stumble-link" class to allow theming of the "Stumble" link (using an image)» Add "stumble" class to allow theming of the "Stumble" link (using an image)
Assigned to:Anonymous» Dave Reid
Status:needs review» fixed

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

Anonymous (not verified) - March 17, 2008 - 07:12
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.