+
+
+ /*
+ **********************************
+ * Embed a remote .swf file
+ **********************************
+ */
+ } else if(preg_match("/.*\/(.+?)\.swf/i",$url,$matches)) {
+
+ /* Set the title and summary to the name of the file */
+ $title = $matches[1];
+ $summary = $matches[1];
+
+ /*
+ * Set the thumbnail to some generic jpg image,
+ * since we can't extract it from the remote swf file.
+ * If no parameter is set, set it to a default value.
+ */
+ if(preg_match("/\w+/", $flvThumbnail)) {
+ $thumbnail = $flvThumbnail;
+ } else {
+ $thumbnail = $gallery2_url.$gallery2_flv_thumbnail;
+ }
+
+ /*
+ * Check to make sure the URL to the remote swf file is valid
+ * (That the file exists at the URL given)
+ */
+ list ($successfullyCopied, $response, $headers) =
+ $this->fetchWebFileHeaders($url, $extraHeaders);
+ if (!$successfullyCopied) {
+ return array(GalleryCoreApi::error(ERROR_BAD_PATH,__FILE__,__LINE__,
+ "Unable to find the video at url: $url - $response"),NULL,NULL);
+ }
+
+ /*
+ * Format the description to hold a reference to the embedded video
+ */
+
+ /* Format the description to hold a reference to the embedded video */
+ $description ='<embed src="'.$url.'">';
+