WordPress.org

Ready to get started?Download WordPress

Forums

vSlider Multi Image Slider for WordPress
TimThumb breaks in Multi-Site setup (7 posts)

  1. Max Chirkov
    Member
    Posted 2 years ago #

    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.

    http://wordpress.org/extend/plugins/vslider/

  2. Mr. Vibe
    Member
    Plugin Author

    Posted 2 years ago #

    @maxchirkov: Thank you! we will try to address this in our next plugin update.

    ( v )

  3. shackep
    Member
    Posted 2 years ago #

    When will this be added to the plugin. I have tried this but every time I add:
    `function vslider($option='vslider_options'){
    global $blog_id;
    if(isset($blog_id)){
    $blogs_dir = '/blogs.dir/' . $blog_id;
    }
    ...`
    it breaks the site. The other bits add alright.
    Thanks,
    Peter

  4. D2DesignsLLC
    Member
    Posted 2 years ago #

    shackep, you need to add the final "}" to that function.

    I've tried this snippet but i'm not able to add vSliders onto sites that aren't the main site.

  5. badjesus
    Member
    Posted 2 years ago #

    I just did this as well. The line numbers don't add up anymore, and I couldn't get it to work at all.

  6. secao9_tiago
    Member
    Posted 2 years ago #

    Hi

    I made the changes, but now the site is returning error 400.

    And I cannot create new banners in another sites.

    Somebody have a solution?

    Thanks!!!

  7. soumyabg
    Member
    Posted 2 years ago #

    I got the solution. It is a database issue. vSlider tries add a row in a non-existent Table in the Database. Here is the solution - http://soumyabg.tumblr.com/post/26064528102/solution-for-vslider-wp-multisite-problem

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags