Posted by mrfelton on October 7, 2010 at 2:22pm
1 follower
| Project: | Image Caption |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Issue Summary
Image Caption uses hook_nodeapi to trigger the loading of the JavaScript. If you use Panels to override the ode display for certain content types (quite common), then the JS does not load, as hook_nodeapi() does not fire with the view op - it only uses the load op.
Another way could be to use something like
<?php
function image_caption_init() {
if (arg(0) == 'node' && is_numeric(arg(1)) & !arg(2)) {
....
}
}
?>Untested, but quite standard for detecting if you are on a node view page - technique used throughout core.
Comments
#1
Patch attached.