This module integrates the Zoomify applet into Drupal. Zoomify is a Flash applet that displays large images by allowing to pan and zoom into them. Images are first preprocessed in order for Zoomify to work.

The integration into Drupal is done by detecting images within nodes. When the module detects that a new image has a resolution larger than some specified size (in Zoomify settings), it invokes the preprocessing script that cuts up the image into tiles. It also adds a tab to the node that displays a new page containing the Zoomify Flash viewer.

The following image types are currently handled:

Drupal 6

Drupal 7

  • Drupal core Image module

INSTALLATION

Drupal 7

See README.txt in the module package.

Drupal 6

After unpacking the zoomify module, download the latest Flash Zoomify Viewer component (available in the Zoomify Express package) and copy the extracted ZoomifyViewer.swf file to the module's folder. You can then make sure you point to the right file in Zoomify settings.

In order to create the tiles, you have the choice of using the bundled PHP processing script or a more robust Python backend.

  • The PHP preprocessing script was derived from work by Wes Wright and published by Justin Henry.
  • For the Python backend, download ZoomifyImage and extract it anywhere on your server. Then point to it in Zoomify settings. You need Python installed, as well as the Python Image Library (PIL) package.
  • You can also instruct the module to *not* automatically create tiles, in which case you can process the image offline and upload a zip file containing the tiles.

CREDITS AND SPONSORSHIP

Drupal 6

Sponsored by OpenCraft. Thank you for your generous support.

Drupal 7

Sponsored by Pure Sign and Jack hutton / Tiberian Design.

If you feel this module is useful to your business, please consider the following:

Thanks!

FAQ

How can I set Zoomify to be the default image display in my node type?

Drupal 7

Go to your content type settings, select "Manage displays" and configure the formatter for the appropriate file fields to use Zoomify.

Drupal 6

Override the node theme. For example, to override the Image content type, you would create a node-image.tpl.php file in your theme with the following:

<?php
if (zoomify_check($node)) {
  print
zoomify_display($node);
 
// Display remainder of node content here.
}
else {
  print
$content;
}
?>

Alternatively, you can override a module-specific theme function such as theme('image_body') in the case of Image module. In this case, write your function in template.php to look something like:
<?php
function YourThemeName_image_body($node, $size) {
  if (
zoomify_check($node)) {
    return
zoomify_display($node) ;
  }
  else {
    return
image_display($node, $size);
  }
}
?>

For the ImageField module, do the following:
<?php
function YourThemeName_imagefield_formatter_image_plain($element) {
 
$node = $element['#node'];
  if (
zoomify_check($node)) {
    return
zoomify_display($node) ;
  }
  else {
   
module_load_include('inc', 'imagefield', 'imagefield_formatter');
    return
theme_imagefield_formatter_image_plain($element);
  }
}
?>

You can then turn OFF the option "Show tab" in the Zoomify settings. Thanks to chawl and to mrb@drupal.org for contributing this tip.

The Zoomify Viewer does not appear in the Zoomify tab. Help! (Drupal 6)

Make sure you entered a relative URL to the Zoomify Viewer in your settings. This URL would likely look like sites/all/modules/zoomify/ZoomifyViewer.swf.

Even though I think I installed Zoomify correctly, I still get "Error loading: http://www.example.com/sites/default/files/zoomify/xxx/yyy". What's happening?

If your Zoomify Viewer base URL is in any way different from the images URL that is reported above, the Flash runtime will prevent the Viewer from accessing those images. This is a security measure built into Flash to prevent cross-site scripting. To get around this issue, you can do the following:

  • Make sure the Viewer's URL and the images' URL have the same domain name. Subdomains are considered different. Technically, be aware that Zoomify generates the URL for images using the Drupal file_create_url function.
  • Create a crossdomain.xml file at the root of your Web server that contains something like:
    <?xml version="1.0"?>
    <!DOCTYPE cross-domain-policy SYSTEM
    "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
    <cross-domain-policy>
    <allow-access-from domain="*.example.com"/>
    </cross-domain-policy>
    <!-- End of file. -->

    This example file would allow any subdomain to work. If you have different TLDs (top-level domains) then you would need to add an allow-access-from entry for each TLD.

How can I pull images from nodes using other than Image or ImageField?

The module can be extended for other types of image-bearing modules through hook_zoomify_images($node) that returns an array($fid => $filepath) of image files found in the given node. Refer to zoomify_image.module for an example.

Project Information

Downloads