1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 01:39:24 +02:00

Can change the status from the privacy tab

add colors in the social icons
This commit is contained in:
Daniel Neto 2024-06-04 15:06:27 -03:00
parent 14b6aac5cc
commit d3a787dd59
6 changed files with 72 additions and 30 deletions

View file

@ -216,6 +216,21 @@ if (Permissions::canAdminVideos()) {
TimeLogEnd(__FILE__, __LINE__); TimeLogEnd(__FILE__, __LINE__);
$resp = $obj->save(true); $resp = $obj->save(true);
if(!empty($resp)){
if(!empty($_POST['videoStatus'])){
$found = false;
foreach ($statusThatTheUserCanUpdate as $key => $value) {
if($_POST['videoStatus'] == $value[0]){
$found = true;
}
}
if($found){
$obj = new Video('', '', @$_POST['id'], true);
$obj->setStatus(@$_POST['videoStatus']);
}
}
}
if (isset($_REQUEST['playlists_id'])) { if (isset($_REQUEST['playlists_id'])) {
if (!PlayLists::canAddVideoOnPlaylist($resp)) { if (!PlayLists::canAddVideoOnPlaylist($resp)) {
Playlists::addVideo($resp, $_REQUEST['playlists_id']); Playlists::addVideo($resp, $_REQUEST['playlists_id']);

View file

@ -1223,8 +1223,8 @@ class API extends PluginAbstract
* @param array $parameters * @param array $parameters
* 'videos_id' the video id that will be deleted * 'videos_id' the video id that will be deleted
* ['APISecret' if passed will not require user and pass] * ['APISecret' if passed will not require user and pass]
* ['user' username of the user that will like the video] * ['user' username of the user that will login]
* ['pass' password of the user that will like the video] * ['pass' password of the user that will login]
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=1&user=admin&pass=123&APISecret={APISecret} * @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=1&user=admin&pass=123&APISecret={APISecret}
* @return \ApiObject * @return \ApiObject
*/ */
@ -1257,8 +1257,8 @@ class API extends PluginAbstract
* 'videos_id' the video that will receive the comment * 'videos_id' the video that will receive the comment
* ['id' the comment id if you will edit some] * ['id' the comment id if you will edit some]
* ['APISecret' if passed will not require user and pass] * ['APISecret' if passed will not require user and pass]
* ['user' username of the user that will like the video] * ['user' username of the user that will login]
* ['pass' password of the user that will like the video] * ['pass' password of the user that will login]
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=1&user=admin&pass=123&APISecret={APISecret} * @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=1&user=admin&pass=123&APISecret={APISecret}
* @return \ApiObject * @return \ApiObject
*/ */
@ -1298,8 +1298,8 @@ class API extends PluginAbstract
* 'comment' String with the comment * 'comment' String with the comment
* 'videos_id' the video that will retreive the comments * 'videos_id' the video that will retreive the comments
* ['APISecret' if passed will not require user and pass] * ['APISecret' if passed will not require user and pass]
* ['user' username of the user that will like the video] * ['user' username of the user that will login]
* ['pass' password of the user that will like the video] * ['pass' password of the user that will login]
* ['rowCount' max numbers of rows] * ['rowCount' max numbers of rows]
* ['current' current page] * ['current' current page]
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=1&user=admin&pass=123&APISecret={APISecret} * @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=1&user=admin&pass=123&APISecret={APISecret}
@ -1335,8 +1335,8 @@ class API extends PluginAbstract
* @param array $parameters * @param array $parameters
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName} * @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}
* ['live_schedule_id' if you pass it will return a specific live_schedule record] * ['live_schedule_id' if you pass it will return a specific live_schedule record]
* 'user' username of the user that will like the video * 'user' username of the user that will login
* 'pass' password of the user that will like the video * 'pass' password of the user that will login
* @return \ApiObject * @return \ApiObject
*/ */
public function get_api_live_schedule($parameters) public function get_api_live_schedule($parameters)
@ -1364,8 +1364,8 @@ class API extends PluginAbstract
* @param array $parameters * @param array $parameters
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName} * @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}
* ['live_schedule_id' if you pass it will return a specific live_schedule record] * ['live_schedule_id' if you pass it will return a specific live_schedule record]
* 'user' username of the user that will like the video * 'user' username of the user that will login
* 'pass' password of the user that will like the video * 'pass' password of the user that will login
* @return \ApiObject * @return \ApiObject
*/ */
public function set_api_live_schedule_delete($parameters) public function set_api_live_schedule_delete($parameters)
@ -1401,8 +1401,8 @@ class API extends PluginAbstract
* 'scheduled_time' pass it in the YYYY-mm-dd HH:ii:ss format * 'scheduled_time' pass it in the YYYY-mm-dd HH:ii:ss format
* 'status' a for active or i for inactive * 'status' a for active or i for inactive
* 'scheduled_password' * 'scheduled_password'
* 'user' username of the user that will like the video * 'user' username of the user that will login
* 'pass' password of the user that will like the video * 'pass' password of the user that will login
* @return \ApiObject * @return \ApiObject
*/ */
public function set_api_live_schedule($parameters) public function set_api_live_schedule($parameters)
@ -2026,8 +2026,8 @@ class API extends PluginAbstract
/** /**
* @param array $parameters (all parameters are mandatories) * @param array $parameters (all parameters are mandatories)
* 'videos_id' the video ID what you want to send the like * 'videos_id' the video ID what you want to send the like
* 'user' username of the user that will like the video * 'user' username of the user that will login
* 'pass' password of the user that will like the video * 'pass' password of the user that will login
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=1&user=admin&pass=123 * @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=1&user=admin&pass=123
* @return \ApiObject * @return \ApiObject
*/ */
@ -2039,8 +2039,8 @@ class API extends PluginAbstract
/** /**
* @param array $parameters (all parameters are mandatories) * @param array $parameters (all parameters are mandatories)
* 'videos_id' the video ID what you want to send the like * 'videos_id' the video ID what you want to send the like
* 'user' username of the user that will like the video * 'user' username of the user that will login
* 'pass' password of the user that will like the video * 'pass' password of the user that will login
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=1&user=admin&pass=123 * @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=1&user=admin&pass=123
* @return \ApiObject * @return \ApiObject
*/ */
@ -2052,8 +2052,8 @@ class API extends PluginAbstract
/** /**
* @param array $parameters (all parameters are mandatories) * @param array $parameters (all parameters are mandatories)
* 'videos_id' the video ID what you want to send the like * 'videos_id' the video ID what you want to send the like
* 'user' username of the user that will like the video * 'user' username of the user that will login
* 'pass' password of the user that will like the video * 'pass' password of the user that will login
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=1&user=admin&pass=123 * @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=1&user=admin&pass=123
* @return \ApiObject * @return \ApiObject
*/ */

View file

@ -6,13 +6,13 @@ foreach (CustomizeUser::getSocialMedia() as $platform => $details) {
continue; continue;
} }
?> ?>
<div class="form-group"> <div class="form-group social-network">
<label class="col-md-4 control-label"> <label class="col-md-4 control-label">
<?php echo $details['label']; ?> <?php echo $details['label']; ?>
</label> </label>
<div class="col-md-8 inputGroupContainer"> <div class="col-md-8 inputGroupContainer">
<div class="input-group largeSocialIcon"> <div class="input-group largeSocialIcon">
<span class="input-group-addon"><i class="<?php echo $details['icon']; ?>"></i></span> <span class="input-group-addon"><i class="<?php echo $details['icon']; ?> <?php echo $details['class']; ?> socialColor"></i></span>
<input id="user<?php echo ucfirst($platform); ?>" platform="<?php echo $platform; ?>" <input id="user<?php echo ucfirst($platform); ?>" platform="<?php echo $platform; ?>"
placeholder="<?php echo $details['placeholder']; ?>" placeholder="<?php echo $details['placeholder']; ?>"
class="form-control CustomizeUserSocialMedia" class="form-control CustomizeUserSocialMedia"

View file

@ -111,13 +111,17 @@ ul.social-network li {
} }
/* Define a base class for common styles */ /* Define a base class for common styles */
.social-network a, .social-network button { .social-network a, .social-network button{
border-color: var(--hover-color) !important; border-color: var(--hover-color) !important;
color: var(--hover-color); /* Change text color on hover */ color: var(--hover-color); /* Change text color on hover */
box-shadow: 0 0 1px 1px var(--hover-color); /* Outer glow effect */ box-shadow: 0 0 1px 1px var(--hover-color); /* Outer glow effect */
transition: box-shadow 0.3s ease; /* Smooth transition for the glow effect */ transition: box-shadow 0.3s ease; /* Smooth transition for the glow effect */
} }
.social-network i.socialColor {
color: var(--hover-color); /* Change text color on hover */
}
.social-network a:hover, .social-network button:hover { .social-network a:hover, .social-network button:hover {
background-color: var(--hover-color); background-color: var(--hover-color);
box-shadow: 0 0 6px 4px var(--hover-color); /* Outer glow effect */ box-shadow: 0 0 6px 4px var(--hover-color); /* Outer glow effect */

View file

@ -922,6 +922,7 @@ if (empty($advancedCustom->disableHTMLDescription)) {
$('#inputVideoId').val(row.id); $('#inputVideoId').val(row.id);
$('#inputTitle').val(row.title); $('#inputTitle').val(row.title);
$('#inputVideoPassword').val(row.video_password); $('#inputVideoPassword').val(row.video_password);
$('#videoStatus').val(row.status);
$('#inputTrailer').val(row.trailer1); $('#inputTrailer').val(row.trailer1);
$('#inputCleanTitle').val(row.clean_title); $('#inputCleanTitle').val(row.clean_title);
$('#created').val(row.created); $('#created').val(row.created);
@ -1150,6 +1151,7 @@ if (empty($advancedCustom->disableHTMLDescription)) {
"title": $('#inputTitle').val(), "title": $('#inputTitle').val(),
"trailer1": $('#inputTrailer').val(), "trailer1": $('#inputTrailer').val(),
"video_password": $('#inputVideoPassword').val(), "video_password": $('#inputVideoPassword').val(),
"videoStatus": $('#videoStatus').val(),
"videoLink": $('#videoLink').val(), "videoLink": $('#videoLink').val(),
"epg_link": $('#epg_link').val(), "epg_link": $('#epg_link').val(),
"videoLinkType": $('#videoLinkType').val(), "videoLinkType": $('#videoLinkType').val(),
@ -1232,6 +1234,7 @@ if (empty($advancedCustom->disableHTMLDescription)) {
$('#videoStartSeconds').val('00:00:00'); $('#videoStartSeconds').val('00:00:00');
$('#videoSkipIntroSecond').val('00:00:00'); $('#videoSkipIntroSecond').val('00:00:00');
$('#inputVideoPassword').val(""); $('#inputVideoPassword').val("");
$('#videoStatus').val('a');
$('#inputCleanTitle').val(""); $('#inputCleanTitle').val("");
$('#created').val(""); $('#created').val("");
$('#inputDescription').val(""); $('#inputDescription').val("");

View file

@ -191,17 +191,37 @@
</li> </li>
<?php <?php
} }
if (!empty($advancedCustomUser->userCanProtectVideosWithPassword) || Permissions::canAdminVideos()) {
?> ?>
<li class="list-group-item"> <li class="list-group-item">
<label class="control-label" for="inputVideoPassword"><?php echo __("Password Protected"); ?></label> <div class="row">
<input type="text" id="inputVideoPassword" class="form-control" placeholder="<?php echo __("Password"); ?>"> <?php
</li> $col = 12;
<?php if (!empty($advancedCustomUser->userCanProtectVideosWithPassword) || Permissions::canAdminVideos()) {
} $col = 6;
?>
<div class="col-sm-6">
<label class="control-label" for="inputVideoPassword"><?php echo __("Password Protected"); ?></label>
<input type="text" id="inputVideoPassword" class="form-control" placeholder="<?php echo __("Password"); ?>">
</div>
<?php
}
?>
<div class="col-sm-<?php echo $col; ?>">
<label for="videoStatus"><?php echo __('Video Status'); ?></label>
<select class="form-control last" id="videoStatus">
<?php
foreach ($statusThatTheUserCanUpdate as $value) {
echo "<option value=\"{$value[0]}\">" . __(Video::$statusDesc[$value[0]]) . "</option>";
}
?>
</select>
</div>
</div>
</li>
<?php
if (empty($advancedCustomUser->userCanNotChangeUserGroup) || Permissions::canAdminVideos()) { if (empty($advancedCustomUser->userCanNotChangeUserGroup) || Permissions::canAdminVideos()) {
if ($advancedCustom->paidOnlyUsersTellWhatVideoIs || Permissions::canAdminVideos()) { if ($advancedCustom->paidOnlyUsersTellWhatVideoIs || Permissions::canAdminVideos()) {
?> ?>
<li class="list-group-item"> <li class="list-group-item">
<i class="fas fa-money-check-alt"></i> <?php echo __("Only Paid Users Can see"); ?> <i class="fas fa-money-check-alt"></i> <?php echo __("Only Paid Users Can see"); ?>
<div class="material-switch pull-right"> <div class="material-switch pull-right">
@ -288,7 +308,7 @@
include $global['systemRootPath'] . 'view/managerVideos_owner.php'; include $global['systemRootPath'] . 'view/managerVideos_owner.php';
?> ?>
</div> </div>
<div class="col-md-2"> <div class="col-md-2">
<?php <?php
if (Permissions::canAdminVideos()) { if (Permissions::canAdminVideos()) {