WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Video Plugin
add support for ISeeIt.TV (5 posts)

  1. rkstar
    Member
    Posted 3 years ago #

    I added some code to the plugin for a new video site geared toward realtors that I'd like to get added to the plugin. It seems to work fine on the couple of installations I've tried it on:

    // ISeeIt.TV Code
    
    define("ISEEITTV_WIDTH",	675);
    define("ISEEITTV_HEIGHT",	380);
    define("ISEEITTV_REGEXP",	"/\[iseeittv (:print:+)\]/");
    define("ISEEITTV_TARGET",	"<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\"###WIDTH###\" height=\"###HEIGHT###\"><param name=\"movie\" value=\"http://www.iseeit.tv/video/###URL###\" /><param name=\"allowFullScreen\" value=\"true\" /><embed src=\"http://www.iseeit.tv/video/###URL###\" width=\"###WIDTH###\" height=\"###HEIGHT###\" allowFullScreen=\"true\" type=\"application/x-shockwave-flash\" /></object>");
    
    function iseeittv_plugin_callback( $match )
    {
    	$tag_parts = explode(" ", rtrim($match[0], "]"));
    	$output = ISEEITTV_TARGET;
    	$output = str_replace("###URL###", $tag_parts[1], $output);
    	if (count($tag_parts) > 2) {
    		if ($tag_parts[2] == 0) {
    			$output = str_replace("###WIDTH###", ISEEITTV_WIDTH, $output);
    		} else {
    			$output = str_replace("###WIDTH###", $tag_parts[2], $output);
    		}
    		if ($tag_parts[3] == 0) {
    			$output = str_replace("###HEIGHT###", ISEEITTV_HEIGHT, $output);
    		} else {
    			$output = str_replace("###HEIGHT###", $tag_parts[3], $output);
    		}
    	} else {
    		$output = str_replace("###WIDTH###", ISEEITTV_WIDTH, $output);
    		$output = str_replace("###HEIGHT###", ISEEITTV_HEIGHT, $output);
    	}
    	return ($output);
    }
    function iseeittv_plugin( $content )
    {
    	return (preg_replace_callback(ISEEITTV_REGEXP, 'iseeittv_plugin_callback', $content));
    }
    
    add_filter('the_content', 'iseeittv_plugin');
    add_filter('the_content_rss', 'iseeittv_plugin');
    add_filter('comment_text', 'iseeittv_plugin');
    add_filter('the_excerpt', 'iseeittv_plugin');

    I basically copied the Vimeo code and replaced the parts that needed to be to work with the iseeit.tv site.

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

  2. daburna
    Member
    Plugin Author

    Posted 3 years ago #

    Thanks rkstar! I added the code at version 0.75. Hope you are the same guy, that posted this code in the wiki and here.

  3. rkstar
    Member
    Posted 3 years ago #

    awesome! yes, i'm the same guy. :) thanks daburna.

  4. rkstar
    Member
    Posted 3 years ago #

    daburna, the ISeeIt.TV service has undergone a name change, can you swap out the code above with this code below please? Basically it's just a rename of ISEEIT to VODIFY.

    // Vodify Code
    
    define("VODIFY_WIDTH",	960);
    define("VODIFY_HEIGHT",	380);
    define("VODIFY_REGEXP",	"/\[vodify (:print:+)\]/");
    define("VODIFY_TARGET",	"<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\"###WIDTH###\" height=\"###HEIGHT###\"><param name=\"movie\" value=\"http://www.vodify.me/video/###URL###\" /><param name=\"allowFullScreen\" value=\"true\" /><embed src=\"http://www.vodify.me/video/###URL###\" width=\"###WIDTH###\" height=\"###HEIGHT###\" allowFullScreen=\"true\" type=\"application/x-shockwave-flash\" /></object>");
    
    function vodify_plugin_callback( $match )
    {
    	$tag_parts = explode(" ", rtrim($match[0], "]"));
    	$output = VODIFY_TARGET;
    	$output = str_replace("###URL###", $tag_parts[1], $output);
    	if (count($tag_parts) > 2) {
    		if ($tag_parts[2] == 0) {
    			$output = str_replace("###WIDTH###", VODIFY_WIDTH, $output);
    		} else {
    			$output = str_replace("###WIDTH###", $tag_parts[2], $output);
    		}
    		if ($tag_parts[3] == 0) {
    			$output = str_replace("###HEIGHT###", VODIFY_HEIGHT, $output);
    		} else {
    			$output = str_replace("###HEIGHT###", $tag_parts[3], $output);
    		}
    	} else {
    		$output = str_replace("###WIDTH###", VODIFY_WIDTH, $output);
    		$output = str_replace("###HEIGHT###", VODIFY_HEIGHT, $output);
    	}
    	return ($output);
    }
    function vodify_plugin( $content )
    {
    	return (preg_replace_callback(VODIFY_REGEXP, 'vodify_plugin_callback', $content));
    }
    
    add_filter('the_content', 'vodify_plugin');
    add_filter('the_content_rss', 'vodify_plugin');
    add_filter('comment_text', 'vodify_plugin');
    add_filter('the_excerpt', 'vodify_plugin');

    thanks!

  5. daburna
    Member
    Plugin Author

    Posted 3 years ago #

    Did they really changed the code? I tried it with [iseeittv cqns7lq0g6ua0p] and it still works, but [vodify cqns7lq0g6ua0p] did not work. Can you give me a valid ID for a vodify video?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic