This module works great in a template based scenario, but what if we just want to use this effect on inline images in the body of a blog post. Seems like I should be able to use the 'insert' module to insert a scaled down image inline, then link it to the original image and add the class 'cloud_zoom' or cloud_zoom_preset, but this doesn't work.

Comments

Clint Eagar’s picture

I'm trying to figure this out too.

zach harkey’s picture

By default, the drupal module only loads the cloud_zoom js and css file when needed. Your theme can force these to load on all pages by adding something like the following to your theme's template.php:

if (module_exists(cloud_zoom)) {
  // Add the cloud zoom JS and CSS
  drupal_add_js(drupal_get_path('module', 'cloud_zoom') .'/cloud-zoom/cloud-zoom.1.0.2.min.js');
  drupal_add_css(drupal_get_path('module', 'cloud_zoom') .'/cloud-zoom/cloud-zoom.css');  
}

Then all you have to do is add class="cloud_zoom" to the link and you will get the defaults which can be overriden by adding properties to the rel attribute (see the professor cloud demo page source code for examples).

neokrish’s picture

solution mentioned in #2 is the way to go, unless the maintainer takes this as a new feature and adds a settings page like lightbox2 does to add js to all pages.

For the solution #2 to work, the class name should be 'cloud-zoom' instead of "cloud_zoom", as mentioned by Zach Harkey

dakku’s picture

Issue summary: View changes
Status: Active » Closed (outdated)