Smooth Slider PLUS Image Magnification
-
I’m trying to integrate Smooth Slider with NextEnd Image Magnifier so that people can zoom into the slideshow images.
One way NextEnd adds magnification to an image is to generate a shortcode that looks like this:
[magny image="http://localhost/location.jpg" title="" description="" align="center" click="1" scroll_zoom="1" small_image="" canvas_mode="1" maxwidth="505px" zoom="3" dia="330px" skin="new-im-frame-photo,new-title-below,new-description-off,new-slider-below,new-im-magnifier-light" ]
So I’m trying to modify Smooth Slider so that this shortcode is outputted to the user. I’ve modified sslider-get-the-image-functions.php (in the includes folder) at line 312. The original code at line 312 looks like this:
$html = '<img src="' . $image['url'] . '" alt="' . esc_attr( strip_tags( $image_alt ) ) . '" class="' . esc_attr( $class ) . '"' . $width . $height . $style .' />';
I’ve changed it to this:
$html = '[magny image="' . $image['url'] . '" alt="' . esc_attr( strip_tags( $image_alt ) ) . '" class="' . esc_attr( $class ) . '" description="" align="center" click="1" scroll_zoom="1" small_image="" canvas_mode="1" zoom="3" dia="330px" skin="new-im-frame-photo,new-title-below,new-description-off,new-slider-below,new-im-magnifier-light"' . $width . $height . $style .' ]';
The page loads and doesn’t crash so the single- and double-quotes all seem to be in the right place, but for some reason the code isn’t processed as shortcode—or something else—because instead of a magnifiable image, I see just the shortcode text. Below is HTML given to my browser using the original Smooth Slider code and then HTML given to my browser with my changes:
Original Smooth Slider code:
<img src="http://localhost/The%20Funny%20Times/Websites/WP%20Test/wordpress/wp-content/uploads/2013/04/32bitgrphx-624x272.jpg" alt="Sample_Page_01" class="large smooth_slider_thumbnail" width="624" style="float:left;margin:0 10px 0 0px;max-height:500px;border:1px solid #000000;width:624px;">
My changes:
[magny image="http://localhost/The%20Funny%20Times/Websites/WP%20Test/wordpress/wp-content/uploads/2013/04/32bitgrphx-624x272.jpg" alt="Sample_Page_01" class="large smooth_slider_thumbnail" description="" align="center" click="1" scroll_zoom="1" small_image="" canvas_mode="1" zoom="3" dia="330px" skin="new-im-frame-photo,new-title-below,new-description-off,new-slider-below,new-im-magnifier-light" width="624" style="float:left;margin:0 10px 0 0px;max-height:500px;border:1px solid #000000;width:624px;" ]
Thoughts? Has anyone gotten images to magnify any other way?
Settings:
•Google Chrome (displays extra quotes around the shortcode)
•Firefox (doesn’t display quotes but also doesn’t display the image)•In Smooth Slider settings, under the Slide Panel tab, I’ve set the thumbnail image to “Scan images from the post, in case there is no attached image to the post.”
- The topic ‘Smooth Slider PLUS Image Magnification’ is closed to new replies.