diff options
author | Steve Clay <steve@mrclay.org> | 2012-04-09 17:05:57 -0400 |
---|---|---|
committer | Steve Clay <steve@mrclay.org> | 2012-04-09 17:05:57 -0400 |
commit | f399afdd2e3cc072efaca069b7a874c7801b31f6 (patch) | |
tree | a2f5d4fb13f5d2b142953451f37294d4b8981598 /lib/vimeo.php | |
parent | e80bb29671b7887d5749a9eb147be38e6f0401f4 (diff) | |
download | elgg-f399afdd2e3cc072efaca069b7a874c7801b31f6.tar.gz elgg-f399afdd2e3cc072efaca069b7a874c7801b31f6.tar.bz2 |
switched to platform classes. see https://github.com/Elgg/videolist/issues/4
Diffstat (limited to 'lib/vimeo.php')
-rw-r--r-- | lib/vimeo.php | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/lib/vimeo.php b/lib/vimeo.php deleted file mode 100644 index 0433c5a94..000000000 --- a/lib/vimeo.php +++ /dev/null @@ -1,31 +0,0 @@ -<?php - -function videolist_parseurl_vimeo($url) { - $parsed = parse_url($url); - $path = explode('/', $parsed['path']); - - if ($parsed['host'] != 'vimeo.com' || !(int) $path[1]) { - return false; - } - - return array( - 'videotype' => 'vimeo', - 'video_id' => $path[1], - ); -} - -function videolist_get_data_vimeo($parsed){ - $video_id = $parsed['video_id']; - - $buffer = file_get_contents("http://vimeo.com/api/v2/video/$video_id.xml"); - $xml = new SimpleXMLElement($buffer); - - $videos = $xml->children(); - $video = $videos[0]; - - return array( - 'title' => sanitize_string($video->title), - 'description' => strip_tags($video->description), - 'thumbnail' => sanitize_string($video->thumbnail_medium), - ); -} |