Theme Function Unavailable

rho_ - December 7, 2007 - 02:09
Project:Flickr
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:rho_
Status:closed
Description

When accessing the module's theme functions in template.php the theme_flickr_photo function is unavailable to be overridden. I believe this is because of the calls in flickr_block.module (line 196)

<?php
function theme_flickr_block_photo($p, $size = NULL) {
  return
theme_flickr_photo($p, $size);
}
?>

and in flickr_filter.module (line 107)
<?php
function theme_flickr_filter_photo($p, $size, $attribs) {
  return
theme_flickr_photo($p, $size, NULL, $attribs);
}
?>

If the call is changed to:
<?php
 
return theme('flickr_photo', $p, $size, /* ...etc */ );
?>

theme_flickr_photo would be passed to template.php.

#1

andrewlevine - December 7, 2007 - 04:43
Category:feature request» bug report

thanks, this is a bug. no time to fix now, but if you submit a patch it will be committed.

#2

rho_ - December 8, 2007 - 01:46
Assigned to:Anonymous» rho_
Status:active» needs review

Here's the patch. Was done from sites/all/modules directory. Peace.

AttachmentSize
theme_flickr.patch 1.59 KB

#3

rho_ - January 1, 2008 - 07:50

BUMP Anyone tested this patch yet? Its worked great for me, and I think it would really help people themeing with this module if it were committed.

#4

HorsePunchKid - January 3, 2008 - 16:07
Status:needs review» reviewed & tested by the community

Hi, Rho_pare. I came across your tip on using thickbox with this module, and before I noticed that you had submitted a patch, I had already filed a duplicate issue along with a patch (*slaps forehead*). Your patch is identical to mine except that mine patches the same two functions in the block module, too.

I have tested it out, and I think it's working just fine. Applies to 5.x-1.1 and should apply to the dev version, too.

Thanks for the tip on using thickbox. :)

#5

drewish - February 3, 2008 - 00:00
Status:reviewed & tested by the community» fixed

Rho_pare, thanks for the patch it's been committed to DRUPAL-5.
HorsePunchKid, thanks for the review and your other patches.

#6

Anonymous (not verified) - February 17, 2008 - 00:02
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.