[Plugin: vSlider Multi Image Slider for WordPress] TimThumb breaks in Multi-Site setup
-
I upgraded vSlider to the most recent 4.1 version and noticed that the slider stopped working. When I looked into the code it generates, I noticed that you introduced TimThumb script into the plugin. TimThumb links to images via relative path. In case of Mult-Site setup (that’s what I have) – the relative path has to look like /blogs.dir/1/files/2011/8/myimage.jpg As you can see it has to reference the “blogs.dir” where all the files are + the ID of the blog that current files belong to. I tweaked the vslider.php by adding the following on line 872:
function vslider($option='vslider_options'){ global $blog_id; if(isset($blog_id)){ $blogs_dir = '/blogs.dir/' . $blog_id; } ...
and then simply added $blogs_dir variable into 3 instances of $img_url
on line 894:
$img_url = WP_CONTENT_URL.'/plugins/vslider/timthumb.php?src='. $blogs_dir . $thumbnailSrc.'&w='.$options['width'].'&h='.$options['height'].'&zc=1&q='.$options['quality'];
line 910
$img_url = WP_CONTENT_URL.'/plugins/vslider/timthumb.php?src='.urlencode($blogs_dir . $image).'&w='.$options['width'].'&h='.$options['height'].'&zc=1&q='.$options['quality'];
and line 929
‘$img_url = WP_CONTENT_URL.’/plugins/vslider/timthumb.php?src=’.urlencode($blogs_dir . $image).’&w=’.$options[‘width’].’&h=’.$options[‘height’].’&zc=1&q=’.$options[‘quality’];’
And now it seem to work for me. If you could address this issue and include into the next release that would be great.
- The topic ‘[Plugin: vSlider Multi Image Slider for WordPress] TimThumb breaks in Multi-Site setup’ is closed to new replies.