OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
reeliv
/
inc
/
simplepie
/
library
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
09/04/2024 10:58:49 AM
rwxr-xr-x
📁
SimplePie
-
09/04/2024 10:59:59 AM
rwxr-xr-x
📄
SimplePie.php
93.21 KB
09/04/2024 10:58:49 AM
rw-r--r--
📄
simplepie_youtube.php
3.56 KB
09/04/2024 10:58:49 AM
rw-r--r--
Editing: simplepie_youtube.php
Close
<?php /** * SimplePie Add-on for YouTube * * Copyright (c) 2004-2007, Peet Sneekes * All rights reserved. License matches the current SimplePie license. */ if (!defined('SIMPLEPIE_NAMESPACE_YOUTUBE')) { define('SIMPLEPIE_NAMESPACE_YOUTUBE', 'http://search.yahoo.com/mrss/'); } class SimplePie_Item_YouTube extends SimplePie_Item { /** * @var bool is this a youtube item? * @access private */ var $is_youtube = true; // New method function get_youtube_player_url() { $data = $this->get_item_tags(SIMPLEPIE_NAMESPACE_YOUTUBE, 'player'); return $data[0]['attribs']['']['url']; } // New method function get_youtube_thumbnail_url() { $data = $this->get_item_tags(SIMPLEPIE_NAMESPACE_YOUTUBE, 'thumbnail'); return $data[0]['attribs']['']['url']; } // New method function get_youtube_thumbnail_width() { $data = $this->get_item_tags(SIMPLEPIE_NAMESPACE_YOUTUBE, 'thumbnail'); return $data[0]['attribs']['']['width']; } // New method function get_youtube_thumbnail_height() { $data = $this->get_item_tags(SIMPLEPIE_NAMESPACE_YOUTUBE, 'thumbnail'); return $data[0]['attribs']['']['height']; } // New method function get_youtube_title() { $data = $this->get_item_tags(SIMPLEPIE_NAMESPACE_YOUTUBE, 'title'); return $data[0]['date']; } // New method function get_youtube_author() { $data = $this->get_item_tags(SIMPLEPIE_NAMESPACE_YOUTUBE, 'credit'); return $data[0]['data']; } // Overloading the categories method function get_categories() { $categories = array(); foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'category') as $category) { $term = null; $scheme = null; $label = null; if (isset($category['attribs']['']['term'])) { $term = $this->sanitize($category['attribs']['']['term'], SIMPLEPIE_CONSTRUCT_TEXT); } if (isset($category['attribs']['']['scheme'])) { $scheme = $this->sanitize($category['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); } if (isset($category['attribs']['']['label'])) { $label = $this->sanitize($category['attribs']['']['label'], SIMPLEPIE_CONSTRUCT_TEXT); } $categories[] =& new $this->feed->category_class($term, $scheme, $label); } foreach ((array) $this->get_item_tags('', 'category') as $category) { $categories[] =& new $this->feed->category_class($this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null); } foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_11, 'subject') as $category) { $exploded_categories = explode(' ', $this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT)); foreach ((array) $exploded_categories as $exploded_category) { $categories[] =& new $this->feed->category_class($exploded_category, null, null); } } foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_YOUTUBE, 'category') as $category) { $exploded_categories = explode(' ', $this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT)); foreach ((array) $exploded_categories as $exploded_category) { $categories[] =& new $this->feed->category_class($exploded_category, null, null); } } foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_10, 'subject') as $category) { $categories[] =& new $this->feed->category_class($this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null); } if (!empty($categories)) { return SimplePie_Misc::array_unique($categories); } else { return null; } } } ?>