Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter khermann

    (@khermann)

    Hello,
    i just tried something and saw, that my custom-field is
    “_featured_video” and is an array.

    The videourl is stored in
    “_featured_video[the_post_video]”, but when i put it in in settings of the plugin, it doesn’t work.

    With “echo _featured_video[the_post_video]” it puts out the right video.

    Thread Starter khermann

    (@khermann)

    Update:
    With a new created custom-field it only works for
    youtube.com/… links, not for [youtube id=””] shortcodes.

    Why does video shortcodes not work? In debug-menu it finds a thumbnail?

    How to work with the custom-field array?

    Thread Starter khermann

    (@khermann)

    Update:
    I fixed the Problem with the custom-field array in following way:

    In Line 278 of video-thumbnails.php:

    $temp = get_post_meta( $post_id, $this->settings->options['custom_field'], true );
    
    $markup = end($temp);

    Now the plugin reads my custom-field Array.

    But the Plugin is now only working with clear-links (https://youtube…) not with my shortcode like [youtube id=”xxx”] or other providers

    Could someone write a filter-code for the shortcode Version in the provider-classes? Maybe the filter could cut the string unto the id and put the id in another variable. I’ve got about 400 posts with shortcode videos.

    My php is not enough for this shortcode-filter.

    Thread Starter khermann

    (@khermann)

    $temp2 = str_replace('[youtube id="','https://www.youtube.com/watch?v=',$temp);
    
    $temp2 = str_replace('[vimeo id="','https://vimeo.com/',$temp2);
    $temp2 = str_replace('[dailymotion id="','https://www.dailymotion.com/embed/video/',$temp2);
    $temp2 = str_replace('[vine id="','https://vine.co/v/',$temp2);
    $temp2 = str_replace('[metacafe id="','https://www.metacafe.com/embed/',$temp2);
    $temp2 = str_replace('[ted id="','https://www.ted.com/talks/',$temp2);
    $temp2 = str_replace('[iframe id="https://embed-ssl.ted.com/talks/','https://www.ted.com/talks/',$temp2);
    $temp2 = str_replace('[collegehumor id=','https://www.collegehumor.com/video/6851812/',$temp2);
    $temp2 = str_replace('[funnyordie id="','https://www.funnyordie.com/videos/',$temp2);
    $temp2 = str_replace('"',' ',$temp2);
    $temp2 = str_replace('"]',' ',$temp2);
    
    $markup = end($temp2);

    I just played around and it works by converting the shortcode into usual links.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Custom Field Video doesn't work…’ is closed to new replies.