🌍
English
Hello,
I am using facnybox plugin, it works well for me even thou its not showing completable with 2.5.
the only problem is, it opens same medium size picture when I click on the image, how can I open full size picture
here is the code from the plugin
add_event_handler('render_element_content','winson_picture_content',EVENT_HANDLER_PRIORITY_NEUTRAL+10,2); function winson_picture_content($content, $element_info) { preg_match('/<\s*img\s+[^>]*?src\s*=\s*(\'|\")(.*?)\\1[^>]*?\/?\s*>/i',$content,$match); if(isset($match) && count($match)>0){ $content = str_replace($match[0],'<a id="single_image" href="'.$element_info['element_url'].'">'.$match[0].'</a>',$content); } return $content; }
thank you
Offline
By default, the plugin will open the image size to fix with your browser screen(autoScale), if you want to show the original image size, just set the 'autoScale' to false that's ok:
following is the javascript code in the main.inc.php file:
var $var143 = jQuery.noConflict(); $var143(document).ready(function() { $var143("a#single_image").fancybox({ "hideOnContentClick": true, "padding":2, "margin":10, "autoScale":true // change it to false }); });
Offline