mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-05 10:49:36 +02:00
This commit is contained in:
parent
d1f7920784
commit
ff7830cc08
2 changed files with 30 additions and 14 deletions
|
@ -65,7 +65,7 @@ class CustomizeUser extends PluginAbstract {
|
||||||
$obj->keepViewerOnChannel = false;
|
$obj->keepViewerOnChannel = false;
|
||||||
$obj->showLeaveChannelButton = false;
|
$obj->showLeaveChannelButton = false;
|
||||||
$obj->addChannelNameOnLinks = true;
|
$obj->addChannelNameOnLinks = true;
|
||||||
|
|
||||||
$obj->doNotShowTopBannerOnChannel = false;
|
$obj->doNotShowTopBannerOnChannel = false;
|
||||||
|
|
||||||
$obj->doNotShowMyChannelNameOnBasicInfo = false;
|
$obj->doNotShowMyChannelNameOnBasicInfo = false;
|
||||||
|
@ -78,7 +78,8 @@ class CustomizeUser extends PluginAbstract {
|
||||||
$obj->afterLogoffGoToMyChannel = false;
|
$obj->afterLogoffGoToMyChannel = false;
|
||||||
$obj->afterLogoffGoToURL = "";
|
$obj->afterLogoffGoToURL = "";
|
||||||
$obj->allowDonationLink = false;
|
$obj->allowDonationLink = false;
|
||||||
$obj->donationButtonLabel = __('Donation');;
|
$obj->donationButtonLabel = __('Donation');
|
||||||
|
;
|
||||||
|
|
||||||
$obj->showEmailVerifiedMark = true;
|
$obj->showEmailVerifiedMark = true;
|
||||||
|
|
||||||
|
@ -224,7 +225,7 @@ class CustomizeUser extends PluginAbstract {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$category = new Category($video->getCategories_id());
|
$category = new Category($video->getCategories_id());
|
||||||
if(is_object($category) && !$category->getAllow_download()){
|
if (is_object($category) && !$category->getAllow_download()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$obj = AVideoPlugin::getObjectDataIfEnabled("CustomizeUser");
|
$obj = AVideoPlugin::getObjectDataIfEnabled("CustomizeUser");
|
||||||
|
@ -268,30 +269,45 @@ class CustomizeUser extends PluginAbstract {
|
||||||
$obj = $this->getDataObject();
|
$obj = $this->getDataObject();
|
||||||
include $global['systemRootPath'] . 'plugin/CustomizeUser/actionButton.php';
|
include $global['systemRootPath'] . 'plugin/CustomizeUser/actionButton.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getHTMLMenuRight() {
|
public function getHTMLMenuRight() {
|
||||||
global $global;
|
global $global;
|
||||||
$obj = $this->getDataObject();
|
$obj = $this->getDataObject();
|
||||||
if($obj->keepViewerOnChannel){
|
if ($obj->keepViewerOnChannel) {
|
||||||
include $global['systemRootPath'] . 'plugin/CustomizeUser/channelMenuRight.php';
|
include $global['systemRootPath'] . 'plugin/CustomizeUser/channelMenuRight.php';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getModeYouTube($videos_id) {
|
public function getModeYouTube($videos_id) {
|
||||||
global $global;
|
global $global;
|
||||||
$cansee = User::canWatchVideoWithAds($videos_id);
|
$cansee = User::canWatchVideoWithAds($videos_id);
|
||||||
if(!$cansee){
|
if (!$cansee) {
|
||||||
if(!AVideoPlugin::isEnabled('Gallery') && !AVideoPlugin::isEnabled('YouPHPFlix2') && !AVideoPlugin::isEnabled('YouTube')){
|
if (!AVideoPlugin::isEnabled('Gallery') && !AVideoPlugin::isEnabled('YouPHPFlix2') && !AVideoPlugin::isEnabled('YouTube')) {
|
||||||
header("Location: {$global['webSiteRootURL']}user?msg=".urlencode(__("Sorry, this video is private")));
|
header("Location: {$global['webSiteRootURL']}user?msg=" . urlencode(__("Sorry, this video is private")));
|
||||||
}else{
|
} else {
|
||||||
header("Location: {$global['webSiteRootURL']}?msg=".urlencode(__("Sorry, this video is private")));
|
header("Location: {$global['webSiteRootURL']}?msg=" . urlencode(__("Sorry, this video is private")));
|
||||||
}
|
}
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getEmbed($videos_id) {
|
public function getEmbed($videos_id) {
|
||||||
$this->getModeYouTube($videos_id);
|
$this->getModeYouTube($videos_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
public function getStart() {
|
||||||
|
global $global;
|
||||||
|
$obj = $this->getDataObject();
|
||||||
|
$thisScriptFile = pathinfo($_SERVER["SCRIPT_FILENAME"]);
|
||||||
|
if (!empty($obj->userMustBeLoggedIn) &&
|
||||||
|
($thisScriptFile["basename"] === 'index.php' ||
|
||||||
|
$thisScriptFile["basename"] === "channel.php" ||
|
||||||
|
$thisScriptFile["basename"] === "channels.php" ||
|
||||||
|
$thisScriptFile["basename"] === "trending.php") &&
|
||||||
|
!User::isLogged()) {
|
||||||
|
$actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
|
||||||
|
header("Location: {$global['webSiteRootURL']}user?redirectUri=" . urlencode($actual_link));
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1029,7 +1029,7 @@ if (((empty($advancedCustomUser->userMustBeLoggedIn) && empty($advancedCustom->d
|
||||||
echo $advancedCustom->underMenuBarHTMLCode->value;
|
echo $advancedCustom->underMenuBarHTMLCode->value;
|
||||||
}
|
}
|
||||||
} else if ($thisScriptFile["basename"] !== 'user.php' && empty($advancedCustom->disableNavbar)) {
|
} else if ($thisScriptFile["basename"] !== 'user.php' && empty($advancedCustom->disableNavbar)) {
|
||||||
header("Location: {$global['webSiteRootURL']}user");
|
|
||||||
}
|
}
|
||||||
unset($_GET['parentsOnly']);
|
unset($_GET['parentsOnly']);
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue