User Tools

Site Tools


code

Advertisement

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

code [2013/01/04 22:30]
daburna release version 0.758
code [2013/05/05 18:33] (current)
daburna release version 0.759
Line 6: Line 6:
 Plugin Name: Wordpress Video Plugin Plugin Name: Wordpress Video Plugin
 Plugin URI: http://www.daburna.de/blog/2006/12/13/wordpress-video-plugin/ Plugin URI: http://www.daburna.de/blog/2006/12/13/wordpress-video-plugin/
-Description: The Wordpress Video Plugin adds a filter for WordPress that allows easy video embedding of 65 supported video sites. Enter [videosite id] at a post and you will see a video. For using the plugin, read the <a href="http://www.daburna.de/dokuwiki/doku.php/instruction" title="wordpress video plugin instruction">instruction page</a> or readme file! +Description: The Wordpress Video Plugin adds a filter for WordPress that allows easy video embedding of 66 supported video sites. Enter [videosite id] at a post and you will see a video. For using the plugin, read the <a href="http://www.daburna.de/dokuwiki/doku.php/instruction" title="wordpress video plugin instruction">instruction page</a> or readme file! 
-Version: 0.758+Version: 0.759
 Author: Oliver Wunder  Author: Oliver Wunder 
 Author URI: http://www.daburna.de/ Author URI: http://www.daburna.de/
Line 16: Line 16:
  
  
 +// Archive.org Code
  
 +define("ARCHIVEORG_WIDTH", 640); // default width
 +define("ARCHIVEORG_HEIGHT", 480); // default height
 +define("ARCHIVEORG_REGEXP", "/\[archive ([[:print:]]+)\]/");
 +define("ARCHIVEORG_TARGET", "<iframe src=\"http://archive.org/embed/###URL###\" width=\"###WIDTH###\" height=\"###HEIGHT###\" frameborder=\"0\" webkitallowfullscreen=\"true\" mozallowfullscreen=\"true\" allowfullscreen></iframe>");
 +
 +function archiveorg_plugin_callback($match)
 +{
 + $tag_parts = explode(" ", rtrim($match[0], "]"));
 + $output = ARCHIVEORG_TARGET;
 + $output = str_replace("###URL###", $tag_parts[1], $output);
 + if (count($tag_parts) > 2) {
 + if ($tag_parts[2] == 0) {
 + $output = str_replace("###WIDTH###", ARCHIVEORG_WIDTH, $output);
 + } else {
 + $output = str_replace("###WIDTH###", $tag_parts[2], $output);
 + }
 + if ($tag_parts[3] == 0) {
 + $output = str_replace("###HEIGHT###", ARCHIVEORG_HEIGHT, $output);
 + } else {
 + $output = str_replace("###HEIGHT###", $tag_parts[3], $output);
 + }
 + } else {
 + $output = str_replace("###WIDTH###", ARCHIVEORG_WIDTH, $output);
 + $output = str_replace("###HEIGHT###", ARCHIVEORG_HEIGHT, $output);
 + }
 + return ($output);
 +}
 +function archiveorg_plugin($content)
 +{
 + return (preg_replace_callback(ARCHIVEORG_REGEXP, 'archiveorg_plugin_callback', $content));
 +}
 +
 +add_filter('the_content', 'archiveorg_plugin');
 +add_filter('the_content_feed', 'archiveorg_plugin');
 +add_filter('comment_text', 'archiveorg_plugin');
 +add_filter('the_excerpt', 'archiveorg_plugin');
  
  
Line 58: Line 95:
 add_filter('comment_text', 'mpora_plugin'); add_filter('comment_text', 'mpora_plugin');
 add_filter('the_excerpt', 'mpora_plugin'); add_filter('the_excerpt', 'mpora_plugin');
- 
- 
  
 // VZAAR Code // VZAAR Code
Line 1429: Line 1464:
 add_filter('the_excerpt', 'sumotv_plugin'); add_filter('the_excerpt', 'sumotv_plugin');
  
-// 123video.nl code+/// 123video.nl code
  
-define("VIDEONL_WIDTH", 420); +define("VIDEONL_WIDTH", 608); 
-define("VIDEONL_HEIGHT", 339);+define("VIDEONL_HEIGHT", 362);
 define("VIDEONL_REGEXP", "/\[123videonl ([[:print:]]+)\]/"); define("VIDEONL_REGEXP", "/\[123videonl ([[:print:]]+)\]/");
-define("VIDEONL_TARGET", "<object width=\"".VIDEONL_WIDTH."\" height=\"".VIDEONL_HEIGHT."\"><embed src=\"http://www.123video.nl/123video_share.swf?mediaSrc=###URL###\" type=\"application/x-shockwave-flash\" quality=\"high\" width=\"".VIDEONL_WIDTH."\" height=\"".VIDEONL_HEIGHT."\"&gt;&lt;/embed></object>");+define("VIDEONL_TARGET", "<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\id=\"123movie_###URL###\" width=\"###WIDTH###\" height=\"###HEIGHT###\"><param name=\"movie\" value=\"http://www.123video.nl/123videoPlayer.swf?mediaSrc=###URL###\/><param name=\"quality\" value=\"high\" /><param name=\"allowScriptAccess\" value=\"always\"/> <param name=\"allowFullScreen\" value=\"true\"></param><embed src=\"http://www.123video.nl/123videoPlayer.swf?mediaSrc=###URL###\" quality=\"high\" width=\"###WIDTH###\" height=\"###HEIGHT###\allowfullscreen=\"true\" type=\"application/x-shockwave-flash\ allowscriptaccess=\"always\" pluginspage=\&quot;http://www.macromedia.com/go/getflashplayer\&quot; /></object>");
  
 function videonl_plugin_callback($match) function videonl_plugin_callback($match)
 { {
-        $output = VIDEONL_TARGET; + $tag_parts = explode(" ", rtrim($match[0], "]")); 
-        $output = str_replace("###URL###", $match[1], $output); + $output = VIDEONL_TARGET; 
-        return ($output);+ $output = str_replace("###URL###", $tag_parts[1], $output); 
 + if (count($tag_parts) > 2) { 
 + if ($tag_parts[2] == 0) { 
 + $output = str_replace("###WIDTH###", VIDEONL_WIDTH, $output); 
 + } else { 
 + $output = str_replace("###WIDTH###", $tag_parts[2], $output); 
 +
 + if ($tag_parts[3] == 0) { 
 + $output = str_replace("###HEIGHT###", VIDEONL_HEIGHT, $output); 
 + } else { 
 + $output = str_replace("###HEIGHT###", $tag_parts[3], $output); 
 +
 + } else { 
 + $output = str_replace("###WIDTH###", VIDEONL_WIDTH, $output); 
 + $output = str_replace("###HEIGHT###", VIDEONL_HEIGHT, $output);  
 +
 + return ($output);
 } }
  
Line 1918: Line 1969:
 define("VIMEO_HEIGHT", 225); // default height define("VIMEO_HEIGHT", 225); // default height
 define("VIMEO_REGEXP", "/\[vimeo ([[:print:]]+)\]/"); define("VIMEO_REGEXP", "/\[vimeo ([[:print:]]+)\]/");
-define("VIMEO_TARGET", "<iframe src=\"http://player.vimeo.com/video/###URL###\" width=\"###WIDTH###\" height=\"###HEIGHT###\" frameborder=\"0\"></iframe>");+define("VIMEO_TARGET", "<iframe src=\"http://player.vimeo.com/video/###URL###\" width=\"###WIDTH###\" height=\"###HEIGHT###\" frameborder=\"0\" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>");
  
 function vimeo_plugin_callback($match) function vimeo_plugin_callback($match)
Line 2001: Line 2052:
 define("MYVIDEO_HEIGHT", 406); define("MYVIDEO_HEIGHT", 406);
 define("MYVIDEO_REGEXP", "/\[myvideo ([[:print:]]+)\]/"); define("MYVIDEO_REGEXP", "/\[myvideo ([[:print:]]+)\]/");
-define("MYVIDEO_TARGET", "<object style=\"width:###WIDTH###px;height:###HEIGHT###px;\"type=\";application/x-shockwave-flash\"data=\"http://www.myvideo.de/movie/###URL###\"> <param name=\"movie\" value=\"http://www.myvideo.de/movie/###URL###\" /> <param name=\"AllowFullscreen\" value=\"true\" /> </object>");+define("MYVIDEO_TARGET", "<iframe src='http://www.myvideo.de/embed/###URL###' style='width:###WIDTH###px;height:###HEIGHT###px;border:0px none;padding:0;margin:0;' width='###WIDTH###' height='###HEIGHT###' frameborder='0' scrolling='no'></iframe>");
  
 function myvideo_plugin_callback($match) function myvideo_plugin_callback($match)
Line 2063: Line 2114:
 // Sevenload Code // Sevenload Code
  
-define("SEVENLOAD_WIDTH", 400); +define("SEVENLOAD_WIDTH", 500); 
-define("SEVENLOAD_HEIGHT", 258);+define("SEVENLOAD_HEIGHT", 281);
 define("SEVENLOAD_REGEXP", "/\[sevenload ([[:print:]]+)\]/"); define("SEVENLOAD_REGEXP", "/\[sevenload ([[:print:]]+)\]/");
-define("SEVENLOAD_TARGET", "<object type=\"application/x-shockwave-flash\" data=\"http://de.sevenload.com/pl/###URL###/".SEVENLOAD_WIDTH."x".SEVENLOAD_HEIGHT."/swf\" width=\&quot;".SEVENLOAD_WIDTH."\" height=\"".SEVENLOAD_HEIGHT."\"><param name=\";allowFullscreen\" value=\"true\" /><param name=\"allowScriptAccess\" value=\"always\" /><param name=\"movie\" value=\"http://de.sevenload.com/pl/###URL###/";.SEVENLOAD_WIDTH.";x";.SEVENLOAD_HEIGHT."/swf\" /></object> ");+define("SEVENLOAD_TARGET", "<iframe src='http://embed.sevenload.com/widgets/singlePlayer/###URL###/?autoplay=false&amp;env=slcom-ext' style='width:###WIDTH###px;height:###HEIGHT###px;overflow:hidden;border:0 solid #000;' webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>");
  
- +function sevenload_plugin_callback($match) 
-function sevenload_plugin_callback($match) {+{ 
 + $tag_parts = explode(" ", rtrim($match[0], "]"));
  $output = SEVENLOAD_TARGET;  $output = SEVENLOAD_TARGET;
- $output = str_replace("###URL###", $match[1], $output);+ $output = str_replace("###URL###", $tag_parts[1], $output); 
 + if (count($tag_parts) > 2) { 
 + if ($tag_parts[2] == 0) { 
 + $output = str_replace("###WIDTH###", SEVENLOAD_WIDTH, $output); 
 + } else { 
 + $output = str_replace("###WIDTH###", $tag_parts[2], $output); 
 +
 + if ($tag_parts[3] == 0) { 
 + $output = str_replace("###HEIGHT###", SEVENLOAD_HEIGHT, $output); 
 + } else { 
 + $output = str_replace("###HEIGHT###", $tag_parts[3], $output); 
 +
 + } else { 
 + $output = str_replace("###WIDTH###", SEVENLOAD_WIDTH, $output); 
 + $output = str_replace("###HEIGHT###", SEVENLOAD_HEIGHT, $output);  
 + }
  return ($output);  return ($output);
 } }
Line 2152: Line 2219:
 define("YOUTUBE_HEIGHT", 344); // default height define("YOUTUBE_HEIGHT", 344); // default height
 define("YOUTUBE_REGEXP", "/\[youtube ([[:print:]]+)\]/"); define("YOUTUBE_REGEXP", "/\[youtube ([[:print:]]+)\]/");
-define("YOUTUBE_TARGET", "<iframe width=\"###WIDTH###\" height=\"###HEIGHT###\" src=\"http://www.youtube.com/embed/###URL###?wmode=transparent\" frameborder=\"0\" allowFullScreen> </iframe>");+define("YOUTUBE_TARGET", "<iframe width=\"###WIDTH###\" height=\"###HEIGHT###\" src=\"http://www.youtube.com/embed/###URL###?wmode=transparent\" frameborder=\"0\" allowfullscreen> </iframe>");
   
 function youtube_plugin_callback($match) function youtube_plugin_callback($match)
Line 2185: Line 2252:
 add_filter('comment_text', 'youtube_plugin'); add_filter('comment_text', 'youtube_plugin');
 add_filter('the_excerpt', 'youtube_plugin'); add_filter('the_excerpt', 'youtube_plugin');
 +add_filter('widget_text', 'youtube_plugin');
  
 load_plugin_textdomain('ow_wvp', false, basename( dirname( __FILE__ ) ) . '/lang' ); load_plugin_textdomain('ow_wvp', false, basename( dirname( __FILE__ ) ) . '/lang' );
code.txt · Last modified: 2013/05/05 18:33 by daburna