Support » Plugin: WordPress Video Plugin » [Plugin: WordPress Video Plugin] Adding More Video Players

  • The plugin: http://wordpress.org/extend/plugins/wordpress-video-plugin/

    It would be great if these video players were added:


    Zshare

    Videobb

    These ones would also be great to have:


    Videozer

    Novamov

    Ru Tube

    It’s not all that tricky to edit the player codes for a new one, but I’ve no idea how to add iframe ones. I’ve spent hours on end trying different codes, it must be missing something obvious.

    Help with adding these players would be greatly appreciated by myself and others!

Viewing 1 replies (of 1 total)
  • I’ve added Videobb:

    / Videobb code by Divayth Fyr
    
    define("obb_WIDTH", 664); // default width
    define("obb_HEIGHT", 440); // default height
    define("obb_REGEXP", "/\[Videobb (:print:+)\]/");
    define("obb_TARGET", "<object width=\"###WIDTH###\" height=\"###HEIGHT###\"><param name=\"movie\" value=\"http://videobb.com/e/###URL###\" /><param name=\"allowScriptAccess\" value=\"always\" /><param name=\"allowFullScreen\" value=\"true\" /><embed src=\"http://videobb.com/e/###URL###\" type=\"application/x-shockwave-flash\" width=\"###WIDTH###\" height=\"###HEIGHT###\" allowScriptAccess=\"always\" allowFullScreen=\"true\"></embed></object>");
    
    function obb_plugin_callback($match)
    {
    	$tag_parts = explode(" ", rtrim($match[0], "]"));
    	$output = obb_TARGET;
    	$output = str_replace("###URL###", $tag_parts[1], $output);
    	if (count($tag_parts) > 2) {
    		if ($tag_parts[2] == 0) {
    			$output = str_replace("###WIDTH###", obb_WIDTH, $output);
    		} else {
    			$output = str_replace("###WIDTH###", $tag_parts[2], $output);
    		}
    		if ($tag_parts[3] == 0) {
    			$output = str_replace("###HEIGHT###", obb_HEIGHT, $output);
    		} else {
    			$output = str_replace("###HEIGHT###", $tag_parts[3], $output);
    		}
    	} else {
    		$output = str_replace("###WIDTH###", obb_WIDTH, $output);
    		$output = str_replace("###HEIGHT###", obb_HEIGHT, $output);
    	}
    	return ($output);
    }
    function obb_plugin($content)
    {
    	return (preg_replace_callback(obb_REGEXP, 'obb_plugin_callback', $content));
    }
    
    add_filter('the_content', 'obb_plugin');
    add_filter('the_content_rss', 'obb_plugin');
    add_filter('comment_text', 'obb_plugin');
    add_filter('the_excerpt', 'obb_plugin');

    And 4Shared:

    // 4Shared code by Divayth Fyr
    
    define("four_WIDTH", 664); // default width
    define("four_HEIGHT", 440); // default height
    define("four_REGEXP", "/\[4S (:print:+)\]/");
    define("four_TARGET", "<object width=\"###WIDTH###\" height=\"###HEIGHT###\"><param name=\"movie\" value=\"http://www.4shared.com/embed/###URL###\" /><param name=\"allowScriptAccess\" value=\"always\" /><param name=\"allowFullScreen\" value=\"true\" /><embed src=\"http://www.4shared.com/embed/###URL###\" type=\"application/x-shockwave-flash\" width=\"###WIDTH###\" height=\"###HEIGHT###\" allowScriptAccess=\"always\" allowFullScreen=\"true\"></embed></object>");
    
    function four_plugin_callback($match)
    {
    	$tag_parts = explode(" ", rtrim($match[0], "]"));
    	$output = four_TARGET;
    	$output = str_replace("###URL###", $tag_parts[1], $output);
    	if (count($tag_parts) > 2) {
    		if ($tag_parts[2] == 0) {
    			$output = str_replace("###WIDTH###", four_WIDTH, $output);
    		} else {
    			$output = str_replace("###WIDTH###", $tag_parts[2], $output);
    		}
    		if ($tag_parts[3] == 0) {
    			$output = str_replace("###HEIGHT###", four_HEIGHT, $output);
    		} else {
    			$output = str_replace("###HEIGHT###", $tag_parts[3], $output);
    		}
    	} else {
    		$output = str_replace("###WIDTH###", four_WIDTH, $output);
    		$output = str_replace("###HEIGHT###", four_HEIGHT, $output);
    	}
    	return ($output);
    }
    function four_plugin($content)
    {
    	return (preg_replace_callback(four_REGEXP, 'four_plugin_callback', $content));
    }
    
    add_filter('the_content', 'four_plugin');
    add_filter('the_content_rss', 'four_plugin');
    add_filter('comment_text', 'four_plugin');
    add_filter('the_excerpt', 'four_plugin');

    As well as a few others, but I’m having trouble with the iframe ones still.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: WordPress Video Plugin] Adding More Video Players’ is closed to new replies.