mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 09:49:28 +02:00
This commit is contained in:
parent
5876a5261a
commit
9aef19e42f
3 changed files with 15 additions and 10 deletions
|
@ -43,4 +43,9 @@ if(!empty($_REQUEST['roku'])){
|
|||
header('Content-Type: text/xml; charset=UTF8');
|
||||
include $global['systemRootPath'] . 'feed/mrss.php';
|
||||
}
|
||||
|
||||
function feedText($text){
|
||||
return str_replace(array(' '), array(''), htmlentities(strip_tags(br2nl($text))));
|
||||
}
|
||||
|
||||
?>
|
|
@ -5,11 +5,11 @@ echo'<?xml version="1.0" encoding="UTF-8"?>';
|
|||
xmlns:georss="http://www.georss.org/georss"
|
||||
xmlns:gml="http://www.opengis.net/gml">
|
||||
<channel>
|
||||
<title><?php echo htmlentities($title); ?></title>
|
||||
<description><?php echo htmlentities(strip_tags(br2nl($description))); ?></description>
|
||||
<title><?php echo feedText($title); ?></title>
|
||||
<description><?php echo feedText($description); ?></description>
|
||||
<link><?php echo $link; ?></link>
|
||||
<image>
|
||||
<title><?php echo htmlentities($title); ?></title>
|
||||
<title><?php echo feedText($title); ?></title>
|
||||
<url><?php echo $logo; ?></url>
|
||||
<link><?php echo $link; ?></link>
|
||||
<width>144</width>
|
||||
|
@ -39,8 +39,8 @@ echo'<?xml version="1.0" encoding="UTF-8"?>';
|
|||
}
|
||||
?>
|
||||
<item>
|
||||
<title><?php echo htmlentities($row['title']); ?></title>
|
||||
<description><?php echo htmlentities(strip_tags(br2nl($row['description']))); ?></description>
|
||||
<title><?php echo feedText($row['title']); ?></title>
|
||||
<description><?php echo feedText($row['description']); ?></description>
|
||||
<link> <?php echo Video::getLink($row['id'], $row['clean_title']); ?></link>
|
||||
<?php echo $enclosure; ?>
|
||||
<pubDate><?php echo date('r', strtotime($row['created'])); ?></pubDate>
|
||||
|
|
10
feed/rss.php
10
feed/rss.php
|
@ -9,14 +9,14 @@ echo'<?xml version="1.0" encoding="UTF-8"?>'
|
|||
xmlns:slash="http://purl.org/rss/1.0/modules/slash/">
|
||||
<channel>
|
||||
<atom:link href="<?php echo $global['webSiteRootURL'].ltrim($_SERVER["REQUEST_URI"],"/"); ?>" rel="self" type="application/rss+xml" />
|
||||
<title><?php echo htmlentities($title); ?></title>
|
||||
<description><?php echo htmlentities(strip_tags(br2nl($description))); ?></description>
|
||||
<title><?php echo feedText($title); ?></title>
|
||||
<description><?php echo feedText($description); ?></description>
|
||||
<link><?php echo $link; ?></link>
|
||||
<sy:updatePeriod>hourly</sy:updatePeriod>
|
||||
<sy:updateFrequency>1</sy:updateFrequency>
|
||||
|
||||
<image>
|
||||
<title><?php echo $title; ?></title>
|
||||
<title><?php echo feedText($title); ?></title>
|
||||
<url><?php echo $logo; ?></url>
|
||||
<link><?php echo $link; ?></link>
|
||||
<width>144</width>
|
||||
|
@ -41,8 +41,8 @@ echo'<?xml version="1.0" encoding="UTF-8"?>'
|
|||
}
|
||||
?>
|
||||
<item>
|
||||
<title><?php echo htmlentities($row['title']); ?></title>
|
||||
<description><?php echo htmlentities(strip_tags(br2nl($row['description']))); ?></description>
|
||||
<title><?php echo feedText($row['title']); ?></title>
|
||||
<description><?php echo feedText($row['description']); ?></description>
|
||||
<link> <?php echo Video::getLink($row['id'], $row['clean_title']); ?></link>
|
||||
<?php echo $enclosure; ?>
|
||||
<pubDate><?php echo date('r', strtotime($row['created'])); ?></pubDate>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue