1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

As Designed Vine video issues

Discussion in 'Media Gallery Resolved Bugs' started by tommydamic68, Dec 7, 2014.

  1. tommydamic68

    tommydamic68 Well-Known Member

    I get this with Vine videos.

    Screen Shot 2014-12-07 at 8.22.32 AM.png
  2. Chris D

    Chris D XenForo Developer Staff Member


    It usually requires custom code to pull the thumbnails through.

    Some simpler options are available in Admin CP > Applications > Gallery Options > Media Sites:


    e.g. you could select Vine from the drop down and supply the path to an image you'd like to use as a thumbnail, that would give each Vine video the same thumbnail, but at least that might be more desirable than the stock "no thumbnail" image.

    Aside from Facebook, the other ones in the screenshot are actually PHP classes. This is where you could get some custom code written to retrieve the thumbnail from Vine programmatically.

    There is another option, but it depends very much on the media site. This is as an example which obviously won't work because I've not looked into it, but if a Vine URL is like this:


    And Vine thumbnail URLs are like this:


    Then you could just enter:


    That would only work if there's a 1:1 relation between the ID they use for their videos and the ID they use in their thumbnails. This is surprisingly rare, so far in the default media sites, only YouTube provide an easy URL for their thumbnails.

    Finally, the other option is for each video that is uploaded, you can "Change Media Thumbnail" and upload your own thumbnail.
    Last edited: Dec 7, 2014
  3. tommydamic68

    tommydamic68 Well-Known Member

    I found this, perhaps if you ever decide to have it function as one would desire, this may help. It was on a few sites referencing this issue.

    function get_vine_thumbnail( $id )
        $vine = file_get_contents("http://vine.co/v/{$id}");
        preg_match('/property="og:image" content="(.*?)"/', $vine, $matches);
        return ($matches[1]) ? $matches[1] : false;
    echo get_vine_thumbnail('bv5ZeQjY352');
  4. Chris D

    Chris D XenForo Developer Staff Member

    We would only support that in the Gallery if XenForo supported Vine officially, which it doesn't.

    An add-on developer should be able to implement that for you quite easily. Actually I think @JoshyPHP has done a few thumbnail classes for Media Gallery thumbnails if he is available for custom work it may be worth asking him.
    JoshyPHP likes this.
  5. tommydamic68

    tommydamic68 Well-Known Member

    Ok, just strange then that "unsupported" video sites would be an Xenforo Gallery "option" if the function of the thumbs or any other particular gallery look or function doesn't work as one would expect, or desire. At this time I wouldn't be interested in paying additional money on top of the Gallery price for that feature to work properly, thanks for the suggestion though. :)
  6. Jeremy

    Jeremy XenForo Moderator Staff Member

    The option drop down is built dynamically via your list of media sites.
  7. Chris D

    Chris D XenForo Developer Staff Member

    The feature does work properly, thank you.

    You have chosen to customise XenForo by adding a non supported media site, hence to have that properly supported in the Media Gallery it would require additional code.

    I'm sure you can appreciate it isn't feasible for XenForo to support every single video site out there, nor is it feasible for us to write a load of code "just in case" someone wishes to generate thumbnails from an unsupported site.

Share This Page