WordPress.org

Ideas

WordPress Video Plugin Stage6 Adaptation

  1. ygor
    Member

    Script to allow redim in WP Video Plugin (video.php) :

    // Stage6 code

    define("STAGE6_WIDTH", 640);
    define("STAGE6_HEIGHT", 480);
    define("STAGE6_REGEXP", "/\[stage6 ([[:print:]]+)\]/");
    define("STAGE6_TARGET", "<object codebase=\"http://download.divx.com/webplayer/stage6/windows/AutoDLDivXWebPlayerInstaller.cab\"
    width=\"###WIDTH###\" height=\"###HEIGHT###\" classid=\"clsid:67DABFBF-D0AB-41fa-9C46-CC0F21721616\">
    <param name=\"autoplay\" value=\"false\"></param>
    <param name=\"src\" value=\"http://video.stage6.com/###URL###/.divx\"></param>
    <param name=\"custommode\" value=\"Stage6\" /><param name=\"showpostplaybackad\" value=\"false\" />
    <embed type=\"video/divx\" src=\"http://video.stage6.com/###URL###/.divx\" showpostplaybackad=\"false\" custommode=\"Stage6\"
    autoplay=\"false\" width=\"###WIDTH###\" height=\"###HEIGHT###\"></embed></object>");

    function stage6_plugin_callback($match)
    {
    // code to allow dim [stage6 width height]
    $output = STAGE6_TARGET;
    $data=explode(" ",$match[1]);
    $output = str_replace("###URL###", $data[0], $output);
    if ($data[1]." "!=" ") {
    $output = str_replace("###WIDTH###", $data[1], $output);
    } else {
    $output = str_replace("###WIDTH###", STAGE6_WIDTH, $output); // default value
    }
    if ($data[2]." "!=" ") {
    $output = str_replace("###HEIGHT###", $data[2], $output);
    } else {
    $output = str_replace("###HEIGHT###", STAGE6_HEIGHT, $output); // default value
    }
    return ($output);
    }

    function stage6_plugin($content)
    {
    return (preg_replace_callback(STAGE6_REGEXP, 'stage6_plugin_callback', $content));
    }

    add_filter('the_content', 'stage6_plugin');
    add_filter('comment_text', 'stage6_plugin');

    Posted: 10 years ago #
  2. theapparatus
    Member

    12345

    There's already a number of plugins that support stage6. Not sure why you're posting this here.

    Posted: 10 years ago #
  3. Justin Shreve
    Member

    This is just code. Also see above.

    stage6 plugins specifically:

    http://wordpress.org/extend/plugins/search.php?q=stage6&sort=

    Posted: 8 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.

  • Rating

    12345
    1 Vote
  • Status

    This is plugin territory