/* Store other string constants we'll use later */
/* youtube */
- $youtubeUrlPattern="youtube.com";
+ $youtubeUrlPattern="youtube";
$youtubeApiUrl="http://gdata.youtube.com/feeds/api/";
$youtubeThumbnailUrl="http://img.youtube.com/vi/";
/* We can't extract the server size from youtube */
$youtubeHeight="350";
/* google */
- $googleUrlPattern="video.google.com";
+ $googleUrlPattern="video.google";
$googlePlayer="http://video.google.com/googleplayer.swf";
/* We can't extract the server size from google video */
$googleWidth="400";
$googleHeight="326";
/* yahoo */
- $yahooUrlPattern="video.yahoo.com";
+ $yahooUrlPattern="video.yahoo";
$yahooThumbnailUrl="http://thmg01.video.search.yahoo.com/image/";
/* metacafe */
- $metacafeUrlPattern="metacafe.com";
+ $metacafeUrlPattern="metacafe";
$metacafeThumbnailUrl="http://www.metacafe.com/thumb/";
/* revver */
- $revverUrlPattern="revver.com";
+ $revverUrlPattern="revver";
$revverThumbnailUrl="http://frame.revver.com/frame/120x90/";
/* dailymotion */
- $dailymotionUrlPattern="dailymotion.com";
+ $dailymotionUrlPattern="dailymotion";
$dailymotionThumbnailUrl="http://www.dailymotion.com/thumbnail/160x120/video/";
/* divshare */
- $divshareUrlPattern="divshare.com";
+ $divshareUrlPattern="divshare";
$divshareThumbnailUrl="http://www.divshare.com/direct/video_thumb/";
/* stickam */
- $stickamUrlPattern="stickam.com";
+ $stickamUrlPattern="stickam";
$stickamThumbnailUrl="http://static.stickam.com/";
/* myspace */
- $myspaceUrlPattern="vids.myspace.com";
- $myspaceUrlPattern2="myspacetv.com";
+ $myspaceUrlPattern="vids.myspace";
+ $myspaceUrlPattern2="myspacetv";
$myspaceThumbnailUrl="http://mediaservices.myspace.com/services/rss.ashx?type=video&videoID=";
/* vimeo */
"Unable to extract vid id from url: $url"),null,null);
}
- /* Grab the contents of the webpage used to display the video on video.google.com */
+ /* Grab the contents of the webpage used to display the video */
list ($successfullyCopied, $contents, $response, $headers) =
GalleryCoreApi::fetchWebPage($url, $extraHeaders);
if (!$successfullyCopied) {
"Unable to extract item id from url: $url"),null,null);
}
- /* Grab the contents of the webpage used to display the video on video.google.com */
+ /* Grab the contents of the webpage used to display the video */
list ($successfullyCopied, $contents, $response, $headers) =
GalleryCoreApi::fetchWebPage($url, $extraHeaders);
if (!$successfullyCopied) {
"Unable to extract item id from url: $url"),null,null);
}
- /* Grab the contents of the webpage used to display the video on video.google.com */
+ /* Grab the contents of the webpage used to display the video */
list ($successfullyCopied, $contents, $response, $headers) =
GalleryCoreApi::fetchWebPage($url, $extraHeaders);
if (!$successfullyCopied) {
"Unable to extract item id from url: $url"),null,null);
}
- /* Grab the contents of the webpage used to display the video on video.google.com */
+ /* Grab the contents of the webpage used to display the video */
list ($successfullyCopied, $contents, $response, $headers) =
GalleryCoreApi::fetchWebPage($url, $extraHeaders);
if (!$successfullyCopied) {
"Unable to extract item id from url: $url"),null,null);
}
- /* Grab the contents of the webpage used to display the video on video.google.com */
+ /* Grab the contents of the webpage used to display the video */
list ($successfullyCopied, $contents, $response, $headers) =
GalleryCoreApi::fetchWebPage($url, $extraHeaders);
if (!$successfullyCopied) {
"Unable to extract item id from url: $url"),null,null);
}
- /* Grab the contents of the webpage used to display the video on video.google.com */
+ /* Grab the contents of the webpage used to display the video */
$url=preg_replace("/&/","&",$url);
list ($successfullyCopied, $contents, $response, $headers) =
GalleryCoreApi::fetchWebPage($url, $extraHeaders);
}
/* Format the description to hold a reference to the embedded video */
- if(preg_match('/input type.+?'.$item_id.'.+?value="(.+?)"/', $contents, $matches)) {
+ if(preg_match('/readonly value="(.+?)"/', $contents, $matches)) {
$description=$matches[1];
$description=preg_replace("/"/","'",$description);
$description=preg_replace("/</","<",$description);
"Unable to extract video id from url: $url"),null,null);
}
- /* Grab the contents of the webpage used to display the video on video.google.com */
+ /* Grab the contents of the webpage used to display the video */
list ($successfullyCopied, $contents, $response, $headers) =
GalleryCoreApi::fetchWebPage($url, $extraHeaders);
if (!$successfullyCopied) {
"Unable to extract video id from url: $url"),null,null);
}
- /* Grab the contents of the webpage used to display the video on video.google.com */
+ /* Grab the contents of the webpage used to display the video */
list ($successfullyCopied, $contents, $response, $headers) =
GalleryCoreApi::fetchWebPage($url, $extraHeaders);
if (!$successfullyCopied) {
*/
if($unsupported_url == 1) {
return array(GalleryCoreApi::error(ERROR_UNSUPPORTED_FILE_TYPE,__FILE__,__LINE__,
- "Unable to embed video from: $url"),null,null);
+ "The URL you have supplied is unsupported (check the list of supported URLs, they must match exactly). You tried to embed a video from this url: $url"),null,null);
}