1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-05 02:39:46 +02:00
This commit is contained in:
daniel 2019-08-19 16:06:13 -03:00
parent ca1fd01f07
commit 4fc5e41f52
5 changed files with 29 additions and 9 deletions

View file

@ -162,6 +162,7 @@ Options All -Indexes
RewriteRule ^renamePlaylist/?$ objects/playlistRename.php [NC,L] RewriteRule ^renamePlaylist/?$ objects/playlistRename.php [NC,L]
RewriteRule ^sortPlaylist/?$ objects/playlistSort.php [NC,L] RewriteRule ^sortPlaylist/?$ objects/playlistSort.php [NC,L]
RewriteRule ^channel/([^/]+)/?$ view/channel.php?channelName=$1 [QSA] RewriteRule ^channel/([^/]+)/?$ view/channel.php?channelName=$1 [QSA]
RewriteRule ^channel/([^/]+)/feed/?$ feed/index.php?channelName=$1 [QSA]
RewriteRule ^channel/?$ view/channel.php [QSA] RewriteRule ^channel/?$ view/channel.php [QSA]
RewriteRule ^channels/?$ view/channels.php [NC,L] RewriteRule ^channels/?$ view/channels.php [NC,L]

View file

@ -1,5 +1,6 @@
<?php <?php
header("Content-Type: application/rss+xml; charset=UTF8"); //header("Content-Type: application/rss+xml; charset=UTF8");
header('Content-Type: text/xml; charset=UTF8');
require_once '../videos/configuration.php'; require_once '../videos/configuration.php';
@ -9,8 +10,21 @@ $_POST['sort']["created"] = "DESC";
$_POST['current'] = 1; $_POST['current'] = 1;
$_POST['rowCount'] = 50; $_POST['rowCount'] = 50;
$showOnlyLoggedUserVideos = false;
$title = "RSS ".$config->getWebSiteTitle();
$link = $global['webSiteRootURL'];
$logo = "{$global['webSiteRootURL']}videos/userPhoto/logo.png";
if(!empty($_GET['channelName'])){
$user = User::getChannelOwner($_GET['channelName']);
$showOnlyLoggedUserVideos = $user['id'];
$title = "RSS ".User::getNameIdentificationById($user['id']);
$link = User::getChannelLink($user['id']);
$logo = User::getPhoto($user['id']);
}
// send $_GET['catName'] to be able to filter by category // send $_GET['catName'] to be able to filter by category
$rows = Video::getAllVideos("viewable"); $rows = Video::getAllVideos("viewable", $showOnlyLoggedUserVideos);
echo'<?xml version="1.0" encoding="UTF-8"?>' echo'<?xml version="1.0" encoding="UTF-8"?>'
?> ?>
@ -22,19 +36,19 @@ echo'<?xml version="1.0" encoding="UTF-8"?>'
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"> xmlns:slash="http://purl.org/rss/1.0/modules/slash/">
<channel> <channel>
<atom:link href="<?php echo $global['webSiteRootURL'].ltrim($_SERVER["REQUEST_URI"],"/"); ?>" rel="self" type="application/rss+xml" /> <atom:link href="<?php echo $global['webSiteRootURL'].ltrim($_SERVER["REQUEST_URI"],"/"); ?>" rel="self" type="application/rss+xml" />
<title>RSS <?php echo $config->getWebSiteTitle(); ?></title> <title><?php echo $title; ?></title>
<description>Rss Feed</description> <description>Rss Feed</description>
<link><?php echo $global['webSiteRootURL']; ?></link> <link><?php echo $link; ?></link>
<sy:updatePeriod>hourly</sy:updatePeriod> <sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency> <sy:updateFrequency>1</sy:updateFrequency>
<image> <image>
<title>RSS <?php echo $config->getWebSiteTitle(); ?></title> <title><?php echo $title; ?></title>
<url><?php echo $global['webSiteRootURL']; ?>videos/userPhoto/logo.png</url> <url><?php echo $logo; ?></url>
<link><?php echo $global['webSiteRootURL']; ?></link> <link><?php echo $link; ?></link>
<width>144</width> <width>144</width>
<height>40</height> <height>40</height>
<description>YouPHPTube versione rss</description> <description>YouPHPTube version rss</description>
</image> </image>
<?php <?php
@ -55,7 +69,7 @@ echo'<?xml version="1.0" encoding="UTF-8"?>'
?> ?>
<item> <item>
<title><?php echo htmlspecialchars($row['title']); ?></title> <title><?php echo htmlspecialchars($row['title']); ?></title>
<description><![CDATA[<?php echo $row['description']; ?>]]></description> <description><![CDATA[<?php echo strip_tags($row['description']); ?>]]></description>
<link> <?php echo Video::getLink($row['id'], $row['clean_title']); ?></link> <link> <?php echo Video::getLink($row['id'], $row['clean_title']); ?></link>
<?php echo $enclosure; ?> <?php echo $enclosure; ?>
<pubDate><?php echo date('r', strtotime($row['created'])); ?></pubDate> <pubDate><?php echo date('r', strtotime($row['created'])); ?></pubDate>

View file

@ -40,6 +40,7 @@ class YouPHPFlix2 extends PluginAbstract {
$obj->SortByName = false; $obj->SortByName = false;
$obj->BigVideo = true; $obj->BigVideo = true;
$obj->RemoveBigVideoDescription = false; $obj->RemoveBigVideoDescription = false;
$obj->BigVideoPlayIcon = true;
$obj->backgroundRGB = "20,20,20"; $obj->backgroundRGB = "20,20,20";
$obj->landscapePosters = true; $obj->landscapePosters = true;
$obj->playVideoOnFullscreen = true; $obj->playVideoOnFullscreen = true;

View file

@ -130,6 +130,10 @@ if ($obj->BigVideo && empty($_GET['showOnly'])) {
<?php if (!empty($images->thumbsGif)) { ?> <?php if (!empty($images->thumbsGif)) { ?>
<img style="position: absolute; top: 0; display: none;" src="<?php echo $images->thumbsGif; ?>" alt="<?php echo $video['title']; ?>" id="thumbsGIFBig<?php echo $video['id']; ?>" class="thumbsGIF img-responsive img" /> <img style="position: absolute; top: 0; display: none;" src="<?php echo $images->thumbsGif; ?>" alt="<?php echo $video['title']; ?>" id="thumbsGIFBig<?php echo $video['id']; ?>" class="thumbsGIF img-responsive img" />
<?php } ?> <?php } ?>
<?php if (!empty($obj->BigVideoPlayIcon)) { ?>
<i class="far fa-play-circle" style="font-size: 100px; position: absolute; left: 50%; top: 50%; margin-left: -50px; margin-top: -50px;opacity: .6;
text-shadow: 0px 0px 30px rgba(0, 0, 0, 0.5);"></i>
<?php } ?>
</div> </div>
</div> </div>
<?php <?php

0
view/mini-upload-form/upload.php Executable file → Normal file
View file