mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 01:39:24 +02:00
Improve editor
This commit is contained in:
parent
f129fb34fd
commit
ce3a52e397
9 changed files with 1824 additions and 1676 deletions
|
@ -196,6 +196,7 @@ class CustomizeAdvanced extends PluginAbstract {
|
|||
$obj->showPrivateVideosOnSitemap = false;
|
||||
$obj->enableOldPassHashCheck = true;
|
||||
$obj->disableHTMLDescription = false;
|
||||
$obj->disableShowMOreLessDescription = false;
|
||||
$obj->disableVideoSwap = false;
|
||||
$obj->makeSwapVideosOnlyForAdmin = false;
|
||||
$obj->disableCopyEmbed = false;
|
||||
|
@ -287,6 +288,7 @@ Allow: .css";
|
|||
self::addDataObjectHelper('trendingOnLastDays', 'Trending Days', 'For the result of trending videos, use the statistics contained in the last few days');
|
||||
|
||||
|
||||
$obj->removeVideoList = false;
|
||||
$o = new stdClass();
|
||||
$o->type = array(
|
||||
'titleAZ' => __("Title (A-Z)"),
|
||||
|
@ -323,6 +325,14 @@ Allow: .css";
|
|||
|
||||
public function getModeYouTube($videos_id) {
|
||||
global $global, $config;
|
||||
|
||||
$redirectVideo = self::getRedirectVideo($videos_id);
|
||||
//var_dump($redirectVideo);exit;
|
||||
if(!empty($redirectVideo) && !empty($redirectVideo->code) && isValidURL($redirectVideo->url) && getSelfURI() !== $redirectVideo->url){
|
||||
header("Location: {$redirectVideo->url}", true, $redirectVideo->code);
|
||||
exit;
|
||||
}
|
||||
|
||||
$obj = $this->getDataObject();
|
||||
$video = Video::getVideo($videos_id, "viewable", true);
|
||||
if (!empty($video['rrating']) && empty($_GET['rrating'])) {
|
||||
|
@ -479,10 +489,10 @@ Allow: .css";
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static function getManagerVideosAddNew() {
|
||||
return '"doNotShowAdsOnThisVideo": $("#doNotShowAdsOnThisVideo").is(":checked"),';
|
||||
global $global;
|
||||
$filename = $global['systemRootPath'] . 'plugin/CustomizeAdvanced/getManagerVideosAddNew.js';
|
||||
return file_get_contents($filename);
|
||||
}
|
||||
|
||||
public static function getManagerVideosEdit() {
|
||||
|
@ -498,7 +508,8 @@ Allow: .css";
|
|||
}
|
||||
|
||||
public static function saveVideosAddNew($post, $videos_id) {
|
||||
return self::setDoNotShowAds($videos_id, !_empty($post['doNotShowAdsOnThisVideo']));
|
||||
self::setDoNotShowAds($videos_id, !_empty($post['doNotShowAdsOnThisVideo']));
|
||||
self::setRedirectVideo($videos_id, @$post['redirectVideoCode'], @$post['redirectVideoURL']);
|
||||
}
|
||||
|
||||
public static function setDoNotShowAds($videos_id, $doNotShowAdsOnThisVideo) {
|
||||
|
@ -518,6 +529,23 @@ Allow: .css";
|
|||
return !empty($externalOptions->doNotShowAdsOnThisVideo);
|
||||
}
|
||||
|
||||
public static function setRedirectVideo($videos_id, $code, $url) {
|
||||
if (!Permissions::canAdminVideos()) {
|
||||
return false;
|
||||
}
|
||||
$video = new Video('', '', $videos_id);
|
||||
$externalOptions = _json_decode($video->getExternalOptions());
|
||||
$externalOptions->redirectVideo = array('code'=>$code, 'url'=>$url);
|
||||
$video->setExternalOptions(json_encode($externalOptions));
|
||||
return $video->save();
|
||||
}
|
||||
|
||||
public static function getRedirectVideo($videos_id) {
|
||||
$video = new Video('', '', $videos_id);
|
||||
$externalOptions = _json_decode($video->getExternalOptions());
|
||||
return @$externalOptions->redirectVideo;
|
||||
}
|
||||
|
||||
public function showAds($videos_id): bool {
|
||||
return !self::getDoNotShowAds($videos_id);
|
||||
}
|
||||
|
|
3
plugin/CustomizeAdvanced/getManagerVideosAddNew.js
Normal file
3
plugin/CustomizeAdvanced/getManagerVideosAddNew.js
Normal file
|
@ -0,0 +1,3 @@
|
|||
"doNotShowAdsOnThisVideo": $("#doNotShowAdsOnThisVideo").is(":checked"),
|
||||
"redirectVideoCode": $("#redirectVideoCode").val(),
|
||||
"redirectVideoURL": $("#redirectVideoURL").val(),
|
|
@ -1,4 +1,6 @@
|
|||
$("#doNotShowAdsOnThisVideo").prop("checked", false);
|
||||
$("#redirectVideoCode").val(0);
|
||||
$("#redirectVideoURL").val('');
|
||||
if (typeof row.externalOptions !== 'undefined' && row.externalOptions) {
|
||||
|
||||
var json = JSON.parse(row.externalOptions);
|
||||
|
@ -6,4 +8,8 @@ if (typeof row.externalOptions !== 'undefined' && row.externalOptions) {
|
|||
if(json.doNotShowAdsOnThisVideo){
|
||||
$("#doNotShowAdsOnThisVideo").prop("checked", true);
|
||||
}
|
||||
if(!empty(json.redirectVideo)){
|
||||
$("#redirectVideoCode").val(json.redirectVideo.code);
|
||||
$("#redirectVideoURL").val(json.redirectVideo.url);
|
||||
}
|
||||
}
|
|
@ -13,6 +13,26 @@ if (Permissions::canAdminVideos()) {
|
|||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="clearfix"></div>
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
|
||||
<label for="redirectVideoCode" ><?php echo __("Redirect video code"); ?></label>
|
||||
<select class="form-control last" id="redirectVideoCode" >
|
||||
<option value='0'><?php echo __('Do not redirect'); ?></option>
|
||||
<option value='301'>(301) <?php echo __('Moved Permanently'); ?></option>
|
||||
<option value='307'>(307) <?php echo __('Temporary Redirect'); ?></option>
|
||||
<option value='308'>(308) <?php echo __('Permanent Redirect'); ?></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<label for="redirectVideoURL"><?php echo __("Redirect URL"); ?></label>
|
||||
<input type="url" id="redirectVideoURL" class="form-control" placeholder="<?php echo __("Redirect URL"); ?>">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="clearfix"></div>
|
||||
<?php
|
||||
}
|
||||
?>
|
File diff suppressed because it is too large
Load diff
390
view/managerVideos_form.php
Normal file
390
view/managerVideos_form.php
Normal file
|
@ -0,0 +1,390 @@
|
|||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
|
||||
<div class="modal-header">
|
||||
<div class="row">
|
||||
<div class="col-xs-6 col-sm-8">
|
||||
<button type="button" class="btn btn-success btn-block saveVideoBtn"><i class="far fa-save"></i> <?php echo __("Save"); ?></button>
|
||||
</div>
|
||||
<div class="col-xs-3 col-sm-2">
|
||||
<button type="button" class="btn btn-danger btn-block" onclick="confirmDeleteVideo($('#inputVideoId').val());"><i class="fas fa-trash"></i> <?php echo __("Delete"); ?></button>
|
||||
</div>
|
||||
<div class="col-xs-3 col-sm-2">
|
||||
<button type="button" class="btn btn-default btn-block" data-dismiss="modal"><i class="fas fa-times"></i> <?php echo __("Cancel"); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
<!--
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
-->
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="postersImage">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading tabbable-line">
|
||||
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active uploadFile"><a data-toggle="tab" href="#pmedia"><?php echo empty($advancedCustom->uploadMP4ButtonLabel) ? __("Direct upload") : __($advancedCustom->uploadMP4ButtonLabel); ?></a></li>
|
||||
<li><a data-toggle="tab" href="#pimages"><i class="far fa-image"></i> <?php echo __("Images"); ?></a></li>
|
||||
<li><a data-toggle="tab" href="#pmetadata"><i class="fas fa-info-circle"></i> <?php echo __("Meta Data"); ?></a></li>
|
||||
<li><a data-toggle="tab" href="#pPrivacy"><i class="fas fa-user-lock"></i> <?php echo __("Privacy"); ?></a></li>
|
||||
<li><a data-toggle="tab" href="#padvanced"><i class="fas fa-cog"></i> <?php echo __("Advanced"); ?></a></li>
|
||||
<?php
|
||||
echo AVideoPlugin::getManagerVideosTab();
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
|
||||
<div class="tab-content">
|
||||
<div id="pmedia" class="tab-pane fade in active">
|
||||
<form id="upload" method="post" action="<?php echo $global['webSiteRootURL'] . "view/mini-upload-form/upload.php"; ?>" enctype="multipart/form-data">
|
||||
<div id="drop">
|
||||
<a><?php echo __("Browse"); ?></a>
|
||||
<input type="file" name="upl" />
|
||||
<input type="hidden" name="videos_id" id="fileUploadVideos_id" />
|
||||
</div>
|
||||
|
||||
<ul>
|
||||
<!-- The file uploads will be shown here -->
|
||||
</ul>
|
||||
</form>
|
||||
</div>
|
||||
<div id="pimages" class="tab-pane fade">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading tabbable-line">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a data-toggle="tab" href="#jpg"><?php echo __("Poster"); ?></a></li>
|
||||
<li><a data-toggle="tab" href="#pjpg"><?php echo __("Portrait Poster"); ?></a></li>
|
||||
<li><a data-toggle="tab" href="#webp"><?php echo __("Mouse Over Poster (WebP)"); ?></a></li>
|
||||
<li><a data-toggle="tab" href="#gif"><?php echo __("Mouse Over Poster (GIF)"); ?></a></li>
|
||||
<li><a data-toggle="tab" href="#pgif"><?php echo __("Mouse Over Portrait Poster (GIF)"); ?></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="tab-content">
|
||||
<div id="jpg" class="tab-pane fade in active">
|
||||
<input id="input-jpg" type="file" class="file-loading" accept="image/jpg, .jpeg, .jpg, .png, .bmp">
|
||||
</div>
|
||||
<div id="pjpg" class="tab-pane fade">
|
||||
<input id="input-pjpg" type="file" class="file-loading" accept="image/jpg, .jpeg, .jpg, .png, .bmp">
|
||||
</div>
|
||||
<div id="webp" class="tab-pane fade">
|
||||
<input id="input-webp" type="file" class="file-loading" accept="image/webp, .webp">
|
||||
</div>
|
||||
<div id="gif" class="tab-pane fade">
|
||||
<input id="input-gif" type="file" class="file-loading" accept="image/gif, .gif">
|
||||
</div>
|
||||
<div id="pgif" class="tab-pane fade">
|
||||
<input id="input-pgif" type="file" class="file-loading" accept="image/gif, .gif">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="pmetadata" class="tab-pane fade">
|
||||
<input type="hidden" id="inputVideoId" >
|
||||
<input type="hidden" id="videoLinkType" >
|
||||
<div class="titles">
|
||||
<div class="row">
|
||||
<?php
|
||||
$showCategory = empty($advancedCustomUser->userCanNotChangeCategory) || Permissions::canAdminVideos();
|
||||
$divCol1 = $divCol2 = $divCol3 = 'col-sm-4';
|
||||
|
||||
if (empty($showCategory)) {
|
||||
$divCol1 = $divCol2 = 'col-sm-6';
|
||||
$divCol3 = 'hidden';
|
||||
}
|
||||
?>
|
||||
<div class="<?php echo $divCol1; ?>">
|
||||
<label for="inputTitle"><?php echo __("Title"); ?></label>
|
||||
<input type="text" id="inputTitle" class="form-control" placeholder="<?php echo __("Title"); ?>" required>
|
||||
</div>
|
||||
<div class="<?php echo $divCol2; ?>">
|
||||
<label for="inputCleanTitle" ><?php echo __("Clean Title"); ?></label>
|
||||
<input type="text" id="inputCleanTitle" class="form-control" placeholder="<?php echo __("Clean Title"); ?>" required>
|
||||
</div>
|
||||
<div class="<?php echo $divCol3; ?>">
|
||||
<?php
|
||||
if ($showCategory) {
|
||||
?>
|
||||
<label for="inputCategory" ><?php echo __("Category"); ?></label>
|
||||
<select class="form-control last" id="inputCategory" required>
|
||||
<?php
|
||||
foreach ($categories as $value) {
|
||||
echo "<option value='{$value['id']}'>{$value['hierarchyAndName']}</option>";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label for="inputDescription" ><?php echo __("Description"); ?></label>
|
||||
<textarea id="inputDescription" class="form-control" placeholder="<?php echo __("Description"); ?>" required></textarea>
|
||||
</div>
|
||||
<div id="pPrivacy" class="tab-pane fade">
|
||||
<div class="row" >
|
||||
<div class="col-md-12" >
|
||||
<ul class="list-group">
|
||||
<?php
|
||||
if ($advancedCustomUser->userCanAllowFilesDownloadSelectPerVideo && CustomizeUser::canDownloadVideosFromUser(User::getId())) {
|
||||
?>
|
||||
<li class="list-group-item">
|
||||
<span class="fa fa-download"></span> <?php echo __("Allow Download This media"); ?>
|
||||
<div class="material-switch pull-right">
|
||||
<input id="can_download" type="checkbox" value="0"/>
|
||||
<label for="can_download" class="label-success"></label>
|
||||
</div>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if ($advancedCustomUser->userCanAllowFilesShareSelectPerVideo && CustomizeUser::canShareVideosFromUser(User::getId())) {
|
||||
?>
|
||||
<li class="list-group-item">
|
||||
<span class="fa fa-share"></span> <?php echo __("Allow Share This media"); ?>
|
||||
<div class="material-switch pull-right">
|
||||
<input id="can_share" type="checkbox" value="0" />
|
||||
<label for="can_share" class="label-success"></label>
|
||||
</div>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
if (!empty($advancedCustomUser->userCanProtectVideosWithPassword) || Permissions::canAdminVideos()) {
|
||||
?>
|
||||
<li class="list-group-item">
|
||||
<label for="inputVideoPassword"><?php echo __("Password Protected"); ?></label>
|
||||
<input type="text" id="inputVideoPassword" class="form-control" placeholder="<?php echo __("Password"); ?>" >
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
if (empty($advancedCustomUser->userCanNotChangeUserGroup) || Permissions::canAdminVideos()) {
|
||||
if ($advancedCustom->paidOnlyUsersTellWhatVideoIs || Permissions::canAdminVideos()) {
|
||||
?>
|
||||
<li class="list-group-item">
|
||||
<i class="fas fa-money-check-alt"></i> <?php echo __("Only Paid Users Can see"); ?>
|
||||
<div class="material-switch pull-right">
|
||||
<input id="only_for_paid" type="checkbox" value="0"/>
|
||||
<label for="only_for_paid" class="label-success"></label>
|
||||
</div>
|
||||
</li>
|
||||
<?php }
|
||||
?>
|
||||
<li class="list-group-item">
|
||||
<span class="fa fa-globe"></span> <?php echo __("Public Media"); ?>
|
||||
<div class="material-switch pull-right">
|
||||
<input id="public" type="checkbox" value="0" class="userGroups"/>
|
||||
<label for="public" class="label-success"></label>
|
||||
</div>
|
||||
</li>
|
||||
<li class="list-group-item active non-public">
|
||||
<?php echo __("Groups that can see this video"); ?>
|
||||
<a href="#" class="btn btn-info btn-xs pull-right" data-toggle="popover" title="<?php echo __("What is User Groups"); ?>" data-placement="bottom" data-content="<?php echo __("By linking groups to this video, it will no longer be public and only users in the same group will be able to watch this video"); ?>"><span class="fa fa-question-circle" aria-hidden="true"></span> <?php echo __("Help"); ?></a>
|
||||
</li>
|
||||
<?php
|
||||
foreach ($userGroups as $value) {
|
||||
?>
|
||||
<li class="list-group-item non-public groupSwitch" id="groupSwitch<?php echo $value['id']; ?>" >
|
||||
<span class="fa fa-lock"></span>
|
||||
<?php echo $value['group_name']; ?>
|
||||
<span class="label label-info"><?php echo $value['total_users'] . " " . __("Users linked"); ?></span>
|
||||
<span class="label label-default categoryGroupSwitchInline"><?php echo __('Category User Group'); ?></span>
|
||||
<div class="material-switch pull-right videoGroupSwitch">
|
||||
<input id="videoGroup<?php echo $value['id']; ?>" type="checkbox" value="<?php echo $value['id']; ?>" class="videoGroups"/>
|
||||
<label for="videoGroup<?php echo $value['id']; ?>" class="label-warning"></label>
|
||||
</div>
|
||||
<div class="material-switch pull-right categoryGroupSwitch" >
|
||||
<input id="categoryGroup<?php echo $value['id']; ?>" type="checkbox" value="<?php echo $value['id']; ?>" class="categoryGroups"/>
|
||||
<label for="categoryGroup<?php echo $value['id']; ?>" class="label-default"></label>
|
||||
</div>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div id="padvanced" class="tab-pane fade">
|
||||
|
||||
<?php
|
||||
echo AVideoPlugin::getManagerVideosEditField();
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
<label for="inputRrating" ><?php echo __("R Rating"); ?></label>
|
||||
<select class="form-control last" id="inputRrating">
|
||||
<?php
|
||||
foreach (Video::$rratingOptions as $value) {
|
||||
if (empty($value)) {
|
||||
$label = __("Not Rated");
|
||||
} else {
|
||||
$label = strtoupper($value);
|
||||
}
|
||||
echo "<option value='{$value}'>" . __($label) . "</option>";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<?php
|
||||
$myAffiliates = CustomizeUser::getCompanyAffiliates(User::getId());
|
||||
if (!empty($myAffiliates)) {
|
||||
$users_id_list = array();
|
||||
$users_id_list[] = User::getId();
|
||||
foreach ($myAffiliates as $value) {
|
||||
$users_id_list[] = $value['users_id_affiliate'];
|
||||
}
|
||||
|
||||
echo '<label for="users_id_company" >' . __("Media Owner") . '</label>';
|
||||
echo Layout::getUserSelect('inputUserOwner', $users_id_list, "", 'inputUserOwner_id', '');
|
||||
} else {
|
||||
?>
|
||||
<div class="row" <?php if (empty($advancedCustomUser->userCanChangeVideoOwner) && !Permissions::canAdminVideos()) { ?> style="display: none;" <?php } ?>>
|
||||
<label for="inputUserOwner_id" ><?php echo __("Media Owner"); ?></label>
|
||||
<?php
|
||||
$updateUserAutocomplete = Layout::getUserAutocomplete(0, 'inputUserOwner_id', array());
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
$myAffiliation = CustomizeUser::getAffiliateCompanies(User::getId());
|
||||
if (!empty($myAffiliation)) {
|
||||
$users_id_list = array();
|
||||
foreach ($myAffiliation as $value) {
|
||||
$users_id_list[] = $value['users_id_company'];
|
||||
}
|
||||
echo '<label for="users_id_company" >' . __("Company") . '</label>';
|
||||
echo Layout::getUserSelect('users_id_company', $users_id_list, "", 'users_id_company', '');
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
<div class="row" id="videoExtraDetails">
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<?php echo __("Autoplay Next Video"); ?>
|
||||
<button class="btn btn-danger btn-sm btn-xs pull-right" id="removeAutoplay" type="button"><i class="fa fa-trash"></i> <?php echo __("Remove Autoplay Next Video"); ?></button>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<img id="inputNextVideo-poster" src="view/img/notfound.jpg" class="ui-state-default" alt="">
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<input id="inputNextVideo" placeholder="<?php echo __("Autoplay Next Video"); ?>" class="form-control first" name="inputNextVideo">
|
||||
<input id="inputNextVideoClean" placeholder="<?php echo __("Autoplay Next Video URL"); ?>" class="form-control last" readonly="readonly" name="inputNextVideoClean">
|
||||
<input type="hidden" id="inputNextVideo-id">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
|
||||
<label for="inputTrailer"><?php echo __("Embed URL for trailer"); ?></label>
|
||||
<input type="text" id="inputTrailer" class="form-control" placeholder="<?php echo __("Embed URL for trailer"); ?>" required>
|
||||
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
|
||||
<div>
|
||||
<label for="videoStartSecond" ><?php echo __("Start video at"); ?></label>
|
||||
<input type="text" id="videoStartSeconds" class="form-control externalOptions" placeholder="00:00:00" value="00:00:00" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<?php
|
||||
if (Permissions::canAdminVideos()) {
|
||||
?>
|
||||
<div>
|
||||
<label for="videoStartSecond" ><?php echo __("Video Views"); ?></label>
|
||||
<input type="number" step="1" id="views_count" class="form-control externalOptions" >
|
||||
</div>
|
||||
<?php
|
||||
} else {
|
||||
?><input type="hidden" id="views_count" value="-1"><?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
$("#inputNextVideo").autocomplete({
|
||||
minLength: 0,
|
||||
source: function (req, res) {
|
||||
$.ajax({
|
||||
url: '<?php echo $global['webSiteRootURL']; ?>objects/videos.json.php?rowCount=6',
|
||||
type: "POST",
|
||||
data: {
|
||||
searchPhrase: req.term
|
||||
},
|
||||
success: function (data) {
|
||||
res(data.rows);
|
||||
}
|
||||
});
|
||||
},
|
||||
focus: function (event, ui) {
|
||||
$("#inputNextVideo").val(ui.item.title);
|
||||
return false;
|
||||
},
|
||||
select: function (event, ui) {
|
||||
$("#inputNextVideo").val(ui.item.title);
|
||||
$("#inputNextVideoClean").val(ui.item.link);
|
||||
$("#inputNextVideo-id").val(ui.item.id);
|
||||
$("#inputNextVideo-poster").attr("src", ui.item.videosURL.jpg.url);
|
||||
return false;
|
||||
}
|
||||
}).autocomplete("instance")._renderItem = function (ul, item) {
|
||||
return $("<li>").append("<div class='clearfix'><img class='img img-responsive pull-left' style='max-width: 90px;max-height: 35px; margin-right: 10px;' src='" + item.videosURL.jpg.url + "'/>[#" + item.id + "] " + item.title + "<br><?php echo __("Owner"); ?>: " + item.user + "</div>").appendTo(ul);
|
||||
};
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
echo AVideoPlugin::getManagerVideosBody();
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div id="videoLinkContent">
|
||||
<label for="videoLink" ><?php echo __("Video Link"); ?></label>
|
||||
<input type="text" id="videoLink" class="form-control" placeholder="<?php echo __("Video Link"); ?> http://www.your-embed-link.com/video" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<div class="row">
|
||||
<div class="col-xs-6 col-sm-8">
|
||||
<button type="button" class="btn btn-success btn-block saveVideoBtn"><i class="far fa-save"></i> <?php echo __("Save"); ?></button>
|
||||
</div>
|
||||
<div class="col-xs-3 col-sm-2">
|
||||
<button type="button" class="btn btn-danger btn-block" onclick="confirmDeleteVideo($('#inputVideoId').val());"><i class="fas fa-trash"></i> <?php echo __("Delete"); ?></button>
|
||||
</div>
|
||||
<div class="col-xs-3 col-sm-2">
|
||||
<button type="button" class="btn btn-default btn-block" data-dismiss="modal"><i class="fas fa-times"></i> <?php echo __("Cancel"); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
|
|
@ -265,7 +265,7 @@ $description = getSEODescription(emptyHTML($video['description']) ? $video['titl
|
|||
}
|
||||
if (preg_match('/\.json/i', $theLink['url'])) {
|
||||
?>
|
||||
<button type="button" onclick="downloadURLOrAlertError('<?php echo $theLink['url']; ?>', {}, '<?php echo $video['clean_title']; ?>.<?php echo strtolower($theLink['name']); ?>','<?php echo $theLink['progress']; ?>');"
|
||||
<button type="button" onclick="downloadURLOrAlertError('<?php echo $theLink['url']; ?>', {}, '<?php echo $video['clean_title']; ?>.<?php echo strtolower($theLink['name']); ?>', '<?php echo $theLink['progress']; ?>');"
|
||||
class="btn btn-default" target="_blank">
|
||||
<i class="fas fa-download"></i> <?php echo $theLink['name']; ?>
|
||||
</button>
|
||||
|
@ -322,15 +322,23 @@ if ($video['type'] !== 'notfound' && CustomizeUser::canShareVideosFromVideo($vid
|
|||
?>
|
||||
<div class="col-xs-4 col-sm-2 col-lg-2 text-right"><strong><?php echo __("Description"); ?>:</strong></div>
|
||||
<div class="col-xs-8 col-sm-10 col-lg-10 descriptionArea" itemprop="description">
|
||||
<div class="descriptionAreaPreContent">
|
||||
<div class="descriptionAreaContent">
|
||||
<?php echo Video::htmlDescription($video['description']); ?>
|
||||
<?php
|
||||
if (empty($advancedCustom->disableShowMOreLessDescription)) {
|
||||
?>
|
||||
<div class="descriptionAreaPreContent">
|
||||
<div class="descriptionAreaContent">
|
||||
<?php echo Video::htmlDescription($video['description']); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button onclick="$(this).closest('.descriptionArea').toggleClass('expanded');" class="btn btn-xs btn-default descriptionAreaShowMoreBtn" style="display: none; ">
|
||||
<span class="showMore"><i class="fas fa-caret-down"></i> <?php echo __("Show More"); ?></span>
|
||||
<span class="showLess"><i class="fas fa-caret-up"></i> <?php echo __("Show Less"); ?></span>
|
||||
</button>
|
||||
<button onclick="$(this).closest('.descriptionArea').toggleClass('expanded');" class="btn btn-xs btn-default descriptionAreaShowMoreBtn" style="display: none; ">
|
||||
<span class="showMore"><i class="fas fa-caret-down"></i> <?php echo __("Show More"); ?></span>
|
||||
<span class="showLess"><i class="fas fa-caret-up"></i> <?php echo __("Show Less"); ?></span>
|
||||
</button>
|
||||
<?php
|
||||
} else {
|
||||
echo Video::htmlDescription($video['description']);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
<?php
|
||||
if(isBot()){
|
||||
if(!empty($removeVideoList)){
|
||||
return false;
|
||||
}
|
||||
|
||||
$TimeLogLimitMYBR = 0.01;
|
||||
$timeLogNameMYBR = TimeLogStart("modeYoutubeBottomRight.php");
|
||||
if (!empty($video['users_id']) && User::hasBlockedUser($video['users_id'])) {
|
||||
|
|
|
@ -3,6 +3,14 @@ $TimeLogLimitMYB = 0.05;
|
|||
$timeLogNameMYB = TimeLogStart("modeYoutubeBundle.php");
|
||||
$isCompressed = AVideoPlugin::loadPluginIfEnabled('TheaterButton') && TheaterButton::isCompressed();
|
||||
|
||||
$removeVideoList = (empty($playlist_id) && !empty($advancedCustom->removeVideoList)) || isBot();
|
||||
$modeYoutubeBottomCols1 = 'col-sm-7 col-md-7 col-lg-6';
|
||||
$modeYoutubeBottomCols2 = 'col-sm-5 col-md-5 col-lg-4 rightBar clearfix';
|
||||
if($removeVideoList){
|
||||
$modeYoutubeBottomCols1 = 'col-sm-12';
|
||||
$modeYoutubeBottomCols2 = 'hidden';
|
||||
}
|
||||
|
||||
if (!$isCompressed) {
|
||||
?>
|
||||
<div class="" id="modeYoutubeTop" >
|
||||
|
@ -18,7 +26,7 @@ if (!empty($video['id'])) {
|
|||
TimeLogEnd($timeLogNameMYB, __LINE__, $TimeLogLimitMYB); ?>
|
||||
<div class="row" id="modeYoutubeBottom" style="margin: 0;">
|
||||
<div class="col-lg-1"></div>
|
||||
<div class="col-sm-7 col-md-7 col-lg-6" id="modeYoutubeBottomContent">
|
||||
<div class="<?php echo $modeYoutubeBottomCols1; ?>" id="modeYoutubeBottomContent">
|
||||
<?php
|
||||
if ($isCompressed) {
|
||||
?>
|
||||
|
@ -37,7 +45,7 @@ if (!empty($video['id'])) {
|
|||
$modeYouTubeTime = microtime(true);
|
||||
TimeLogEnd($timeLogNameMYB, __LINE__, $TimeLogLimitMYB); ?>
|
||||
</div>
|
||||
<div class="col-sm-5 col-md-5 col-lg-4 rightBar clearfix" id="yptRightBar" >
|
||||
<div class="<?php echo $modeYoutubeBottomCols2; ?>" id="yptRightBar" >
|
||||
<div class="list-group-item clearfix">
|
||||
<?php
|
||||
TimeLogEnd($timeLogNameMYB, __LINE__, $TimeLogLimitMYB);
|
||||
|
@ -55,7 +63,7 @@ if (!empty($video['id'])) {
|
|||
require_once $global['systemRootPath'] . 'plugin/Gallery/functions.php'; ?>
|
||||
<div class="row" id="modeYoutubeBottom" style="margin: 0;">
|
||||
<div class="col-lg-1"></div>
|
||||
<div class="col-sm-7 col-md-7 col-lg-6" id="modeYoutubeBottomContent">
|
||||
<div class="<?php echo $modeYoutubeBottomCols1; ?>" id="modeYoutubeBottomContent">
|
||||
<?php
|
||||
if ($isCompressed) {
|
||||
?>
|
||||
|
@ -76,7 +84,7 @@ if (!empty($video['id'])) {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5 col-md-5 col-lg-4 rightBar clearfix" id="yptRightBar" >
|
||||
<div class="<?php echo $modeYoutubeBottomCols2; ?>" id="yptRightBar" >
|
||||
<div class="list-group-item clearfix">
|
||||
<?php
|
||||
require "{$global['systemRootPath']}view/modeYoutubeBottomRight.php";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue