Need to Grab OpenURL Image in theme

libsys - March 28, 2007 - 15:20
Project:Bibliography Module
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:libsys
Status:closed
Description

A minor fix, the dev snapshot doesn't currently pull the openurl image in the theme function as it should.

So This:

function theme_biblio_openurl($openURL) {
if($openurl_image !='')
  {
    $output .= '<div class="biblio-openurl-image"><a href="'.  $openURL . '"><img border="0" src="' . $openurl_image . '" /></a></div>';
  } else {
    $output .= '<div class="biblio-openurl-text"><a href="'.  $openURL . '">'.t('Find It Via OpenURL!').'</a></div>';

  }
return $output;
}

should look like this:

function theme_biblio_openurl($openURL) {
    $openurl_image = variable_get('biblio_openurlimage','');
if($openurl_image !='')
  {
    $output .= '<div class="biblio-openurl-image"><a href="'.  $openURL . '"><img border="0" src="' . $openurl_image . '" /></a></div>';
  } else {
    $output .= '<div class="biblio-openurl-text"><a href="'.  $openURL . '">'.t('Find It Via OpenURL!').'</a></div>';

  }
return $output;
}

I've attached a patch as well.

Thanks.

AttachmentSize
biblio_openurlimg.patch395 bytes

#1

rjerome - March 28, 2007 - 16:05

Oops, sorry about that, it's fixed now.

Ron.

#2

rjerome - March 29, 2007 - 21:43
Status:active» fixed

#3

rjerome - April 3, 2007 - 12:32
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.