Support » Plugins » [Plugin: Viper’s Video Quicktags] Thumbnails Problem – Videos work great, but jpgs dont show up

  • Resolved marcfragstein

    (@marcfragstein)


    Dear all,

    i have a problem concerning the thumbnails. What I want to achieve: whenever there is a img in the Post, the thumbnail should show the image, even if inside the post a video is coming afterwards. Now I have the problem, that images are completely ignored during the creation of thumbnails, that means, if the post contains only an img, no thumbnail is generated at al, if it contains a img and after that a video, the thumbnail shows the video and not the image….

    Here is the link to the site : http://meisterplan.com/wordpress/

    I already tried to implement a search pattern for img in the functions.php but I failed.
    The plugins I use are :
    Register Plus
    Revisionary
    Sidebar Login
    Vipers Videotags (obviously)
    WP-mail-smtp
    WP authors

    I made a copy of the functions.php available under the following link, maybe somebody could have a look at it :

    http://meisterplan.com/functions.html

    Any help would be much appreciated!

Viewing 1 replies (of 1 total)
  • Hey Guys, found the solution myself. Somehow I had to change the regex in the function “print_video_thumb_first_post_image”. Below the code that works for me, in case somebody has a similar problem.

    function print_video_thumb_first_post_image($post,&$thumb_url) {

    $content = $post->post_content;

    if (preg_match(‘#<\s*img [^\>]*src\s*=\s*([“\’])(.*?)\1#im’,$content, $match)) {

    $thumb_url = $match[2];
    return 1;
    }
    }

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Viper’s Video Quicktags] Thumbnails Problem – Videos work great, but jpgs dont show up’ is closed to new replies.