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

Edit thumbs in timeline

This commit is contained in:
Daniel Neto 2025-01-20 10:43:11 -03:00
parent b27c178ffb
commit 7353c36927
5 changed files with 118 additions and 59 deletions

View file

@ -90,10 +90,6 @@ if (!empty($advancedCustomUser->showChannelBannerOnModeYoutube)) {
?>
<!-- playlist player -->
<?php
$htmlMediaTag = '<video ' . PlayerSkins::getPlaysinline() . ' preload="auto"
controls class="embed-responsive-item video-js vjs-default-skin vjs-big-play-centered" id="mainVideo"
data-setup=\'{"techOrder": ["youtube","html5"]}\'>
</video>';
echo PlayerSkins::getMediaTag($video['filename'], $htmlMediaTag);
?>
<!-- playlist player END -->

View file

@ -1,7 +1,7 @@
<?php
$videos_id = getVideos_id();
?>
<button class="btn btn-primary btn-xs" id="captureScreenshot" data-toggle="tooltip" title="<?php echo __('Save this moment as Thumbnail'); ?>">
<button class="btn btn-success btn-block btn-lg" id="captureScreenshot" data-toggle="tooltip" title="<?php echo __('Save this moment as Thumbnail'); ?>">
<i class="fa fa-camera"></i> <span class="hidden-md hidden-sm hidden-xs"><?php echo __('Save this moment as Thumbnail'); ?></span>
</button>

View file

@ -21,7 +21,8 @@ $categories_id = $video->getCategories_id();
?>
<!DOCTYPE html>
<html lang="<?php echo getLanguage(); ?>">
<head>
<head>
<title><?php echo __("Edit Video"); ?></title>
<?php
include $global['systemRootPath'] . 'view/include/head.php';
@ -29,37 +30,92 @@ $categories_id = $video->getCategories_id();
<style>
<?php
if (!empty($advancedCustom->hideEditAdvancedFromVideosManager)) {
?>
.command-edit{
?>.command-edit {
display: none !important;
}
<?php
}
?>
</style>
</head>
<body>
</head>
<body>
<?php
include $global['systemRootPath'] . 'view/include/navbar.php';
?>
<div class="container-fluid">
<div class="panel panel-default ">
<div class="panel-heading clearfix ">
<h1 class="pull-left" >
<h1 class="pull-left">
<?php
echo $title;
?>
</h1>
<div class="btn-group pull-right">
<a href="<?php echo $global['webSiteRootURL']; ?>view/managerVideosLight.php?image=<?php echo empty($_REQUEST['image']) ? 1 : 0; ?>&avideoIframe=1&videos_id=<?php echo $videos_id; ?>" class="btn btn-default">
<?php
if (empty($_REQUEST['image'])) {
echo "<i class=\"far fa-image\"></i> " . __('Thumbnail');
$url = "{$global['webSiteRootURL']}view/managerVideosLight.php";
$url = addQueryStringParameter($url, 'avideoIframe', 1);
$url = addQueryStringParameter($url, 'videos_id', $videos_id);
$assets = array();
$assets['image'] = array(
'button' => array(
'url' => addQueryStringParameter($url, 'image', 1),
'label' => "<i class=\"far fa-image\"></i> " . __('Thumbnail')
),
'include' => $global['systemRootPath'] . 'view/managerVideosLight_image.php'
);
$assets['imageTime'] = array(
'button' =>array(
'url' => addQueryStringParameter($url, 'imageTime', 1),
'label' => "<i class=\"far fa-image\"></i> " . __('Thumbnail in video time'),
),
'include' => $global['systemRootPath'] . 'view/managerVideosLight_imageTime.php'
);
$assets['meta'] = array(
'button' =>array(
'url' => addQueryStringParameter($url, 'image', 0),
'label' => "<i class=\"far fa-edit\"></i> " . __('Edit')
),
'include' => $global['systemRootPath'] . 'view/managerVideosLight_meta.php'
);
$buttons = array(
'image' => array(
$assets['imageTime']['button'],
$assets['meta']['button'],
),
'imageTime' => array(
$assets['image']['button'],
$assets['meta']['button'],
),
'meta' => array(
$assets['imageTime']['button'],
$assets['image']['button'],
),
);
$index = '';
if (!empty($_REQUEST['image'])) {
$index = 'image';
} else if (!empty($_REQUEST['imageTime'])) {
$index = 'imageTime';
} else {
echo "<i class=\"far fa-edit\"></i> " . __('Edit');
$index = 'meta';
}
foreach ($buttons[$index] as $key => $value) {
?>
<a href="<?php echo $value['url']; ?>" class="btn btn-default">
<?php
echo $value['label']
?>
</a>
<?php
}
?>
<a href="<?php echo $global['webSiteRootURL']; ?>mvideos?avideoIframe=1&video_id=<?php echo $videos_id; ?>" class="btn btn-primary command-edit">
<i class="far fa-edit"></i> <?php echo __('Advanced'); ?>
</a>
@ -67,11 +123,7 @@ $categories_id = $video->getCategories_id();
</div>
<div class="panel-body">
<?php
if (empty($_REQUEST['image'])) {
include $global['systemRootPath'] . 'view/managerVideosLight_meta.php';
} else {
include $global['systemRootPath'] . 'view/managerVideosLight_image.php';
}
include $assets[$index]['include'];
?>
</div>
</div>
@ -79,5 +131,6 @@ $categories_id = $video->getCategories_id();
<?php
include $global['systemRootPath'] . 'view/include/footer.php';
?>
</body>
</body>
</html>

View file

@ -0,0 +1,15 @@
<link href="<?php echo getURL('node_modules/video.js/dist/video-js.min.css'); ?>" rel="stylesheet" type="text/css"/>
<?php
$videos_id = getVideos_id();
$video = Video::getVideoLight($videos_id);
$htmlMediaTag = '<video ' . PlayerSkins::getPlaysinline() . ' preload="auto"
controls class="embed-responsive-item video-js vjs-default-skin vjs-big-play-centered" id="mainVideo"
data-setup=\'{"techOrder": ["youtube","html5"]}\'>
</video>';
echo PlayerSkins::getMediaTag($video['filename']);
include __DIR__.'/../plugin/PlayerSkins/saveThumbnail.php';
include $global['systemRootPath'] . 'view/include/video.min.js.php';
?>

View file

@ -83,11 +83,6 @@ $description = getSEODescription(emptyHTML($video['description']) ? $video['titl
<button type="button" class="btn btn-primary btn-xs" onclick="avideoModalIframe(webSiteRootURL + 'view/managerVideosLight.php?avideoIframe=1&videos_id=<?php echo $video['id']; ?>');return false;" data-toggle="tooltip" title="<?php echo __("Edit Video"); ?>">
<i class="fa fa-edit"></i> <span class="hidden-md hidden-sm hidden-xs"><?php echo __("Edit Video"); ?></span>
</button>
<?php
if ($video['type'] === Video::$videoTypeVideo) {
require_once $global['systemRootPath'] . 'plugin/PlayerSkins/saveThumbnail.php';
}
?>
<button type="button" class="btn btn-default btn-xs" onclick="avideoModalIframeFull(webSiteRootURL + 'view/videoViewsInfo.php?videos_id=<?php echo $video['id']; ?>');
return false;">
<i class="fa fa-eye"></i> <span class="hidden-md hidden-sm hidden-xs"><?php echo __("Views Info"); ?></span>