1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 09:49:28 +02:00

If the video comes from the channel it will keep showing the channel videos

This commit is contained in:
daniel 2018-11-03 08:53:34 -03:00
parent 3752778739
commit ff872a4771
1231 changed files with 63 additions and 26 deletions

0
.gitignore vendored Normal file → Executable file
View file

View file

@ -562,6 +562,10 @@ if (!class_exists('Video')) {
$sql .= " AND c.clean_name = '{$_GET['catName']}'"; $sql .= " AND c.clean_name = '{$_GET['catName']}'";
} }
if (!empty($_GET['channelName'])) {
$user = User::getChannelOwner($_GET['channelName']);
$sql .= " AND v.users_id = {$user['id']} ";
}
if (!empty($_GET['search'])) { if (!empty($_GET['search'])) {
$_POST['searchPhrase'] = $_GET['search']; $_POST['searchPhrase'] = $_GET['search'];
@ -700,6 +704,11 @@ if (!class_exists('Video')) {
$sql .= " AND (c.clean_name = '{$_GET['catName']}' OR c.parentId IN (SELECT cs.id from categories cs where cs.clean_name = '{$_GET['catName']}' ))"; $sql .= " AND (c.clean_name = '{$_GET['catName']}' OR c.parentId IN (SELECT cs.id from categories cs where cs.clean_name = '{$_GET['catName']}' ))";
} }
if (!empty($_GET['channelName'])) {
$user = User::getChannelOwner($_GET['channelName']);
$sql .= " AND v.users_id = {$user['id']} ";
}
if (!empty($_GET['search'])) { if (!empty($_GET['search'])) {
$_POST['searchPhrase'] = $_GET['search']; $_POST['searchPhrase'] = $_GET['search'];
} }
@ -779,6 +788,13 @@ if (!class_exists('Video')) {
} elseif (!empty($status)) { } elseif (!empty($status)) {
$sql .= " AND v.status = '{$status}'"; $sql .= " AND v.status = '{$status}'";
} }
if (!empty($_GET['channelName'])) {
$user = User::getChannelOwner($_GET['channelName']);
$sql .= " AND v.users_id = {$user['id']} ";
}
$res = sqlDAL::readSql($sql); $res = sqlDAL::readSql($sql);
$fullData = sqlDAL::fetchAllAssoc($res); $fullData = sqlDAL::fetchAllAssoc($res);
sqlDAL::close($res); sqlDAL::close($res);
@ -836,6 +852,11 @@ if (!class_exists('Video')) {
$sql .= " AND v.type = '{$_SESSION['type']}' "; $sql .= " AND v.type = '{$_SESSION['type']}' ";
} }
} }
if (!empty($_GET['channelName'])) {
$user = User::getChannelOwner($_GET['channelName']);
$sql .= " AND v.users_id = {$user['id']} ";
}
$sql .= BootGrid::getSqlSearchFromPost(array('v.title', 'v.description', 'c.name')); $sql .= BootGrid::getSqlSearchFromPost(array('v.title', 'v.description', 'c.name'));
$res = sqlDAL::readSql($sql); $res = sqlDAL::readSql($sql);
$numRows = sqlDal::num_rows($res); $numRows = sqlDal::num_rows($res);
@ -1803,8 +1824,14 @@ if (!class_exists('Video')) {
* @param type $type URLFriendly or permalink * @param type $type URLFriendly or permalink
* @return String a web link * @return String a web link
*/ */
static function getLinkToVideo($videos_id, $clean_title = "", $embed = false, $type = "URLFriendly") { static function getLinkToVideo($videos_id, $clean_title = "", $embed = false, $type = "URLFriendly", $get = array()) {
global $global; global $global;
$get_http = http_build_query($get);
if(empty($get_http)){
$get_http = "";
}else{
$get_http = "?{$get_http}";
}
if ($type == "URLFriendly") { if ($type == "URLFriendly") {
$cat = ""; $cat = "";
if (!empty($_GET['catName'])) { if (!empty($_GET['catName'])) {
@ -1815,39 +1842,39 @@ if (!class_exists('Video')) {
$clean_title = self::get_clean_title($videos_id); $clean_title = self::get_clean_title($videos_id);
} }
if ($embed) { if ($embed) {
return "{$global['webSiteRootURL']}videoEmbed/{$clean_title}"; return "{$global['webSiteRootURL']}videoEmbed/{$clean_title}{$get_http}";
} else { } else {
return "{$global['webSiteRootURL']}{$cat}video/{$clean_title}"; return "{$global['webSiteRootURL']}{$cat}video/{$clean_title}{$get_http}";
} }
} else { } else {
if (empty($videos_id) && !empty($clean_title)) { if (empty($videos_id) && !empty($clean_title)) {
$videos_id = self::get_id_from_clean_title($clean_title); $videos_id = self::get_id_from_clean_title($clean_title);
} }
if ($embed) { if ($embed) {
return "{$global['webSiteRootURL']}vEmbed/{$videos_id}"; return "{$global['webSiteRootURL']}vEmbed/{$videos_id}{$get_http}";
} else { } else {
return "{$global['webSiteRootURL']}v/{$videos_id}"; return "{$global['webSiteRootURL']}v/{$videos_id}{$get_http}";
} }
} }
} }
static function getPermaLink($videos_id, $embed = false) { static function getPermaLink($videos_id, $embed = false, $get = array()) {
return self::getLinkToVideo($videos_id, "", $embed, "permalink"); return self::getLinkToVideo($videos_id, "", $embed, "permalink", $get);
} }
static function getURLFriendly($videos_id, $embed = false) { static function getURLFriendly($videos_id, $embed = false, $get = array()) {
return self::getLinkToVideo($videos_id, "", $embed, "URLFriendly"); return self::getLinkToVideo($videos_id, "", $embed, "URLFriendly", $get);
} }
static function getPermaLinkFromCleanTitle($clean_title, $embed = false) { static function getPermaLinkFromCleanTitle($clean_title, $embed = false, $get = array()) {
return self::getLinkToVideo("", $clean_title, $embed, "permalink"); return self::getLinkToVideo("", $clean_title, $embed, "permalink", $get);
} }
static function getURLFriendlyFromCleanTitle($clean_title, $embed = false) { static function getURLFriendlyFromCleanTitle($clean_title, $embed = false, $get = array()) {
return self::getLinkToVideo("", $clean_title, $embed, "URLFriendly"); return self::getLinkToVideo("", $clean_title, $embed, "URLFriendly", $get);
} }
static function getLink($videos_id, $clean_title, $embed = false) { static function getLink($videos_id, $clean_title, $embed = false, $get = array()) {
global $advancedCustom; global $advancedCustom;
if (!empty($advancedCustom->usePermalinks)) { if (!empty($advancedCustom->usePermalinks)) {
$type = "permalink"; $type = "permalink";
@ -1855,7 +1882,7 @@ if (!class_exists('Video')) {
$type = "URLFriendly"; $type = "URLFriendly";
} }
return self::getLinkToVideo($videos_id, $clean_title, $embed, $type); return self::getLinkToVideo($videos_id, $clean_title, $embed, $type, $get);
} }
static function getTotalVideosThumbsUpFromUser($users_id, $startDate, $endDate) { static function getTotalVideosThumbsUpFromUser($users_id, $startDate, $endDate) {

0
plugin/AD_Server/AD_Server.php Normal file → Executable file
View file

0
plugin/AD_Server/Objects/VastCampaigns.php Normal file → Executable file
View file

0
plugin/AD_Server/Objects/VastCampaignsLogs.php Normal file → Executable file
View file

0
plugin/AD_Server/Objects/VastCampaignsVideos.php Normal file → Executable file
View file

0
plugin/AD_Server/VAST.php Normal file → Executable file
View file

0
plugin/AD_Server/VMAP.php Normal file → Executable file
View file

0
plugin/AD_Server/footer.php Normal file → Executable file
View file

0
plugin/AD_Server/index.php Normal file → Executable file
View file

0
plugin/AD_Server/install/install.sql Normal file → Executable file
View file

0
plugin/AD_Server/log.php Normal file → Executable file
View file

0
plugin/AD_Server/pluginMenu.html Normal file → Executable file
View file

0
plugin/AD_Server/videojs-ima/videojs.ima.css Normal file → Executable file
View file

0
plugin/AD_Server/videojs-ima/videojs.ima.js Normal file → Executable file
View file

0
plugin/AD_Server/videojs-ima/videojs.ima.min.js vendored Normal file → Executable file
View file

0
plugin/AD_Server/videojs-ima/videojs.ima.scss Normal file → Executable file
View file

0
plugin/AD_Server/videojs-markers/videojs-markers.js Normal file → Executable file
View file

View file

0
plugin/AD_Server/videojs-markers/videojs-markers.min.js vendored Normal file → Executable file
View file

0
plugin/AD_Server/videojs-markers/videojs.markers.css Normal file → Executable file
View file

0
plugin/AD_Server/videojs-markers/videojs.markers.min.css vendored Normal file → Executable file
View file

0
plugin/AD_Server/view/addCampaign.php Normal file → Executable file
View file

0
plugin/AD_Server/view/addCampaignVideo.php Normal file → Executable file
View file

0
plugin/AD_Server/view/campaigns.json.php Normal file → Executable file
View file

0
plugin/AD_Server/view/campaignsVideos.json.php Normal file → Executable file
View file

0
plugin/AD_Server/view/deleteCampaign.json.php Normal file → Executable file
View file

0
plugin/AD_Server/view/deleteCampaignVideo.json.php Normal file → Executable file
View file

0
plugin/AD_Server_Location/AD_Server_Location.php Normal file → Executable file
View file

View file

0
plugin/AD_Server_Location/campaignPanel.php Normal file → Executable file
View file

0
plugin/AD_Server_Location/install/install.sql Normal file → Executable file
View file

0
plugin/Audit/Audit.php Normal file → Executable file
View file

0
plugin/Audit/Objects/AuditTable.php Normal file → Executable file
View file

0
plugin/Audit/install/audit.mwb Normal file → Executable file
View file

0
plugin/Audit/install/audit.mwb.bak Normal file → Executable file
View file

0
plugin/Audit/install/install.sql Normal file → Executable file
View file

0
plugin/Audit/page/audits.json.php Normal file → Executable file
View file

0
plugin/Audit/page/editor.php Normal file → Executable file
View file

0
plugin/Audit/pluginMenu.html Normal file → Executable file
View file

0
plugin/Cache/Cache.php Normal file → Executable file
View file

0
plugin/CloneSite/CloneLog.php Normal file → Executable file
View file

0
plugin/CloneSite/CloneSite.php Normal file → Executable file
View file

0
plugin/CloneSite/Objects/Clones.php Normal file → Executable file
View file

0
plugin/CloneSite/Objects/cloneSiteModel.mwb Normal file → Executable file
View file

0
plugin/CloneSite/changeStatus.json.php Normal file → Executable file
View file

0
plugin/CloneSite/cloneClient.json.php Normal file → Executable file
View file

0
plugin/CloneSite/cloneServer.json.php Normal file → Executable file
View file

0
plugin/CloneSite/clones.json.php Normal file → Executable file
View file

0
plugin/CloneSite/delete.json.php Normal file → Executable file
View file

0
plugin/CloneSite/functions.php Normal file → Executable file
View file

0
plugin/CloneSite/index.php Normal file → Executable file
View file

0
plugin/CloneSite/install/install.sql Normal file → Executable file
View file

0
plugin/CloneSite/pluginMenu.html Normal file → Executable file
View file

0
plugin/CookieAlert/CookieAlert.php Normal file → Executable file
View file

0
plugin/CookieAlert/cookiealert-standalone.js Normal file → Executable file
View file

0
plugin/CookieAlert/cookiealert.css Normal file → Executable file
View file

0
plugin/CookieAlert/cubes.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

Before After
Before After

0
plugin/CookieAlert/demo.html Normal file → Executable file
View file

0
plugin/CookieAlert/footer.php Normal file → Executable file
View file

0
plugin/CustomizeAdvanced/CustomizeAdvanced.php Normal file → Executable file
View file

0
plugin/CustomizeAdvanced/advancedCustom.json.php Normal file → Executable file
View file

0
plugin/FBTube/FBTube.php Normal file → Executable file
View file

0
plugin/FBTube/view/getVideos.php Normal file → Executable file
View file

0
plugin/FBTube/view/modeFacebook.php Normal file → Executable file
View file

0
plugin/FBTube/view/player.css Normal file → Executable file
View file

0
plugin/FBTube/view/style.css Normal file → Executable file
View file

0
plugin/FloatVideo/FloatVideo.php Normal file → Executable file
View file

0
plugin/Gallery/Gallery.php Normal file → Executable file
View file

0
plugin/Gallery/fullscreen.css Normal file → Executable file
View file

0
plugin/Gallery/fullscreen.js Normal file → Executable file
View file

6
plugin/Gallery/functions.php Normal file → Executable file
View file

@ -106,7 +106,7 @@ function createOrderInfo($getName, $mostWord, $lessWord, $orderString) {
return array($tmpOrderString, $upDown, $mostLess); return array($tmpOrderString, $upDown, $mostLess);
} }
function createGallerySection($videos, $crc = "") { function createGallerySection($videos, $crc = "", $get = array()) {
global $global, $config, $obj, $advancedCustom; global $global, $config, $obj, $advancedCustom;
$countCols = 0; $countCols = 0;
@ -121,7 +121,7 @@ function createGallerySection($videos, $crc = "") {
$countCols ++; $countCols ++;
?> ?>
<div class="col-lg-2 col-md-4 col-sm-4 col-xs-6 galleryVideo thumbsImage fixPadding" style="z-index: 2; min-height: 175px;"> <div class="col-lg-2 col-md-4 col-sm-4 col-xs-6 galleryVideo thumbsImage fixPadding" style="z-index: 2; min-height: 175px;">
<a class="galleryLink" videos_id="<?php echo $value['id']; ?>" href="<?php echo Video::getLink($value['id'], $value['clean_title']); ?>" title="<?php echo $value['title']; ?>"> <a class="galleryLink" videos_id="<?php echo $value['id']; ?>" href="<?php echo Video::getLink($value['id'], $value['clean_title'], false, $get); ?>" title="<?php echo $value['title']; ?>">
<?php <?php
$images = Video::getImageFromFilename($value['filename'], $value['type']); $images = Video::getImageFromFilename($value['filename'], $value['type']);
$imgGif = $images->thumbsGif; $imgGif = $images->thumbsGif;
@ -135,7 +135,7 @@ function createGallerySection($videos, $crc = "") {
</div> </div>
<span class="duration"><?php echo Video::getCleanDuration($value['duration']); ?></span> <span class="duration"><?php echo Video::getCleanDuration($value['duration']); ?></span>
</a> </a>
<a class="h6 galleryLink" videos_id="<?php echo $value['id']; ?>" href="<?php echo Video::getLink($value['id'], $value['clean_title']); ?>" title="<?php echo $value['title']; ?>"> <a class="h6 galleryLink" videos_id="<?php echo $value['id']; ?>" href="<?php echo Video::getLink($value['id'], $value['clean_title'], false, $get); ?>" title="<?php echo $value['title']; ?>">
<h2><?php echo $value['title']; ?></h2> <h2><?php echo $value['title']; ?></h2>
</a> </a>

0
plugin/Gallery/script.js Normal file → Executable file
View file

0
plugin/Gallery/style.css Normal file → Executable file
View file

9
plugin/Gallery/view/BigVideo.php Normal file → Executable file
View file

@ -1,11 +1,14 @@
<?php <?php
if ($obj->BigVideo && empty($_GET['showOnly'])) { if ($obj->BigVideo && empty($_GET['showOnly'])) {
$name = User::getNameIdentificationById($video['users_id']); $name = User::getNameIdentificationById($video['users_id']);
if(empty($get)){
$get = array();
}
?> ?>
<div class="clear clearfix"> <div class="clear clearfix">
<div class="row thumbsImage"> <div class="row thumbsImage">
<div class="col-sm-6"> <div class="col-sm-6">
<a class="galleryLink" videos_id="<?php echo $video['id']; ?>" href="<?php echo Video::getLink($video['id'], $video['clean_title']); ?>" title="<?php echo $video['title']; ?>" style=""> <a class="galleryLink" videos_id="<?php echo $video['id']; ?>" href="<?php echo Video::getLink($video['id'], $video['clean_title'], false, $get); ?>" title="<?php echo $video['title']; ?>" style="">
<?php <?php
$images = Video::getImageFromFilename($video['filename'], $video['type']); $images = Video::getImageFromFilename($video['filename'], $video['type']);
$imgGif = $images->thumbsGif; $imgGif = $images->thumbsGif;
@ -21,7 +24,7 @@ if ($obj->BigVideo && empty($_GET['showOnly'])) {
</a> </a>
</div> </div>
<div class="col-sm-6"> <div class="col-sm-6">
<a class="h6 galleryLink" videos_id="<?php echo $video['id']; ?>" href="<?php echo Video::getLink($video['id'], $video['clean_title']); ?>" title="<?php echo $video['title']; ?>"> <a class="h6 galleryLink" videos_id="<?php echo $video['id']; ?>" href="<?php echo Video::getLink($video['id'], $video['clean_title'], false, $get); ?>" title="<?php echo $video['title']; ?>">
<h1><?php echo $video['title']; ?></h1> <h1><?php echo $video['title']; ?></h1>
</a> </a>
<div class="mainAreaDescriptionContainer"> <div class="mainAreaDescriptionContainer">
@ -30,7 +33,7 @@ if ($obj->BigVideo && empty($_GET['showOnly'])) {
<div class="text-muted galeryDetails"> <div class="text-muted galeryDetails">
<div> <div>
<?php if (empty($_GET['catName'])) { ?> <?php if (empty($_GET['catName'])) { ?>
<a class="label label-default" href="<?php echo Video::getLink($video['id'], $video['clean_title']); ?>/"> <a class="label label-default" href="<?php echo Video::getLink($video['id'], $video['clean_title'], false, $get); ?>/">
<?php <?php
if (!empty($video['iconClass'])) { if (!empty($video['iconClass'])) {
?> ?>

0
plugin/Gallery/view/Category.php Normal file → Executable file
View file

0
plugin/Gallery/view/modeGallery.php Normal file → Executable file
View file

0
plugin/Hotkeys/Hotkeys.php Normal file → Executable file
View file

0
plugin/Hotkeys/videojs.hotkeys.min.js vendored Normal file → Executable file
View file

0
plugin/IMDbScrape/.gitignore vendored Normal file → Executable file
View file

0
plugin/IMDbScrape/IMDbScrape.php Normal file → Executable file
View file

0
plugin/IMDbScrape/cache/.gitkeep vendored Normal file → Executable file
View file

0
plugin/IMDbScrape/cast/not-found.jpg Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 423 B

After

Width:  |  Height:  |  Size: 423 B

Before After
Before After

0
plugin/IMDbScrape/footer.php Normal file → Executable file
View file

0
plugin/IMDbScrape/get.json.php Normal file → Executable file
View file

0
plugin/IMDbScrape/imdb.class.php Normal file → Executable file
View file

0
plugin/IMDbScrape/posters/not-found.jpg Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 462 B

After

Width:  |  Height:  |  Size: 462 B

Before After
Before After

0
plugin/Live/Live.php Normal file → Executable file
View file

0
plugin/Live/Objects/LiveTransmition.php Normal file → Executable file
View file

0
plugin/Live/getImage.php Normal file → Executable file
View file

0
plugin/Live/index.php Normal file → Executable file
View file

0
plugin/Live/install/install.sql Normal file → Executable file
View file

0
plugin/Live/install/nginx.conf Normal file → Executable file
View file

0
plugin/Live/install/nginx.old.conf Normal file → Executable file
View file

0
plugin/Live/on_play.php Normal file → Executable file
View file

0
plugin/Live/on_publish.php Normal file → Executable file
View file

0
plugin/Live/on_record_done.php Normal file → Executable file
View file

0
plugin/Live/sample-player.zip Normal file → Executable file
View file

0
plugin/Live/sample-player/index.html Normal file → Executable file
View file

0
plugin/Live/sample-player/poster.jpg Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Before After
Before After

Some files were not shown because too many files have changed in this diff Show more