Forums

[Plugin: Viper's Video Quicktags] Only Preview Images shown, no Video? (4 posts)

  1. navjotjsingh
    Member
    Posted 4 weeks ago #

    I am using the following code to retrieve posts and show only plugin shortcodes as videos(don't want to show complete post and mess up):

    $pattern = get_shortcode_regex();
    $pattern = str_replace('(.?)', '', $pattern);
    $pattern = str_replace('2', '3', $pattern);
    $content = $post->post_content;
    $shortcodes = preg_replace("/.*($pattern).*?/s", '$1', $content);
    echo do_shortcode($shortcodes);

    Now the problem is that shortcodes do get parsed but instead of loading the video, it shows only the preview image. Video is not shown. Here's the demo: http://www.geneliaonline.in

    I tried disabling the option: Only load the Javascript file if it's needed. Disable this to post Quicktime videos in the sidebar text widget. but this did not help.

    How to fix this?

  2. Viper007Bond
    Member
    Posted 4 weeks ago #

    There is a the_content filter that runs late and outputs the SWFObject Javascript. Without it, embeds won't work.

  3. navjotjsingh
    Member
    Posted 3 weeks ago #

    So any solution to display the video in sidebar too instead of only thumbnail?

  4. Viper007Bond
    Member
    Posted 3 weeks ago #

    Just drop the shortcode into a text widget.

    Or do this:

    <?php echo apply_filters( 'the_content', '[youtube]blah[/youtube]' ); ?>

Reply

You must log in to post.

About this Topic