From 6873be3aaa2b28177e7d880086479211b9ea4120 Mon Sep 17 00:00:00 2001
From: "Alan J. Pippin" <ajp@server.pippins.net>
Date: Tue, 23 Sep 2008 23:17:02 -0600
Subject: [PATCH] Fixed vimeo embed parsing algorithm

---
 ItemAddEmbedVideo.inc           | 23 ++++++++++++-----------
 templates/ItemAddEmbedVideo.tpl |  1 +
 2 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/ItemAddEmbedVideo.inc b/ItemAddEmbedVideo.inc
index d598ee2..4e16f42 100644
--- a/ItemAddEmbedVideo.inc
+++ b/ItemAddEmbedVideo.inc
@@ -798,18 +798,19 @@ class ItemAddEmbedVideo extends ItemAddPlugin {
 	       }
 
 	       /* Format the description to hold a reference to the embedded video */
-	       $description = '<object type="application/x-shockwave-flash" width="'.$width.'" height="'.$height.'"';
-	       $description.= 'data="http://www.vimeo.com/moogaloop.swf?clip_id='.$video_id;
-	       $description.= '&amp;server=www.vimeo.com&amp;fullscreen=1&amp;show_title=1'.$autoStartStr;
-	       $description.= '&amp;show_byline=1&amp;show_portrait=0&amp;color=">';
-	       $description.= '<param name="quality" value="best" />';
+	       $description = '<object width="'.$width.'" height="'.$height.'">';
 	       $description.= '<param name="allowfullscreen" value="true" />';
-	       $description.= '<param name="scale" value="showAll" />';
-	       $description.= '<param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id='.$video_id;
-	       $description.= '&amp;server=www.vimeo.com&amp;fullscreen=1&amp;show_title=1'.$autoStartStr;
-	       $description.= '&amp;show_byline=1&amp;show_portrait=0&amp;color=" />';
-	       $description.= '</object>';
-	       
+	       $description.= '<param name="allowscriptaccess" value="always" />';
+	       $description.= '<param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id='.$video_id;
+	       $description.= '&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;'.$autoStartStr;
+	       $description.= 'show_portrait=0&amp;color=&amp;fullscreen=1"/ >';
+	       $description.= '<embed src="http://vimeo.com/moogaloop.swf?clip_id='.$video_id;
+	       $description.= '&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;'.$autoStartStr;
+	       $description.= 'show_portrait=0&amp;color=&amp;fullscreen=1"';
+	       $description.= 'type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always"';
+	       $description.= 'width="'.$width.'" height="'.$height.'">';
+	       $description.= '</embed></object>';
+		  	       
 	   /*
 	    **********************************
 	    * Embed a remote .swf file
diff --git a/templates/ItemAddEmbedVideo.tpl b/templates/ItemAddEmbedVideo.tpl
index 43d0e73..1ea2807 100644
--- a/templates/ItemAddEmbedVideo.tpl
+++ b/templates/ItemAddEmbedVideo.tpl
@@ -31,6 +31,7 @@
     <b>Stickam:</b> http://www.stickham.com/editMediaComment.do?method=load&mId=xxxxxxxxx<br>
     <b>Myspace1:</b> http://vids.myspace.com/index.cfm?fuseaction=vids.individual&VideoID=xxxxxxxx<br>
     <b>Myspace2:</b> http://myspacetv.com/index.cfm?fuseaction=vids.individual&videoid=xxxxxxxx<br>
+    <b>Vimeo:</b> http://www.vimeo.com/xxxxxx<br>
     <b>Generic:</b> Any webpage with an '&lt;object ... &lt;embed ...' style video on its page<br>
     <br>
     <b><u>Supported File Types:</u></b><br>
-- 
2.34.1