hook_block op view looks like this:
$block = array(
'subject' => '',
'content' => theme_google_admanager_block($id, $ad_slot),
);
When you call a theme function directly, rather than going through theme('...'), it cannot be overridden through the theme system.
This line should be changed to:
'content' => theme('google_admanager_block', $id, $ad_slot),
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | google_admanager-theme.patch | 1013 bytes | toemaz |
| #1 | google_admanager-fix-theme-function-530300-1.patch | 765 bytes | webchick |
Comments
Comment #1
webchickHere's a patch.
Comment #2
frankcarey commentedFor some reason i got a rejection on this patch. Probably because i already patched it with the block cache patch webchick also submitted. I hand edited the file with the same change and it works correctly. marking RTBC
Comment #3
frankcarey commentedcorrection, this is wrong. the module doesn't implement hook_theme, so though they are called theme_google_admanager_block(), they aren't going through the theme system. @webchick, do you have a patch that includes the theme function registrations?
Comment #4
frankcarey commentedoops, changing the status needs work
Comment #5
toemaz commentedFind attached a new patch implementing the missing hook_theme. (update module against 6.x-1.x first before applying)
Comment #6
toemaz commentedPatch applied on 6-1 branch. Review requested with the 6.x-1.x-dev release.
Comment #7
jaydub commentedpatch looks good here.
Comment #8
toemaz commentedOk, I'll consider it fixed then since the patch was already applied to the CVS. If it's not ok yet, don't hesitate to reopen this issue.