Download & Extend

Image Caption and Panels node override compatibility issue

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

Status:active» needs review

Patch attached.

AttachmentSize
934676-image_caption-panels-support.patch 1.03 KB