1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-06 03:50:04 +02:00

resolve merge

This commit is contained in:
Vinzenz Hersche 2018-03-09 21:37:04 +01:00
commit 1ed361e9a4
9 changed files with 179 additions and 89 deletions

View file

@ -605,6 +605,9 @@ function getimgsize($file_src) {
} }
function im_resize($file_src, $file_dest, $wd, $hd) { function im_resize($file_src, $file_dest, $wd, $hd) {
if(empty($file_dest)){
return false;
}
if (!file_exists($file_src)){ if (!file_exists($file_src)){
error_log("im_resize: Source not found: {$file_src}"); error_log("im_resize: Source not found: {$file_src}");
return false; return false;
@ -622,6 +625,10 @@ function im_resize($file_src, $file_dest, $wd, $hd) {
$format = 'jpeg'; $format = 'jpeg';
} }
$destformat = strtolower(substr($file_dest, -4)); $destformat = strtolower(substr($file_dest, -4));
if(empty($destformat)){
error_log("destformat not found {$file_dest}");
$destformat = ".jpg";
}
$icfunc = "imagecreatefrom" . $format; $icfunc = "imagecreatefrom" . $format;
if (!function_exists($icfunc)){ if (!function_exists($icfunc)){
error_log("im_resize: Function does not exists: {$icfunc}"); error_log("im_resize: Function does not exists: {$icfunc}");
@ -670,7 +677,7 @@ function im_resize($file_src, $file_dest, $wd, $hd) {
} }
imagecopyresampled($dest, $src, 0, 0, ($ws - $wc) / 2, ($hs - $hc) / 2, $wd, $hd, $wc, $hc); imagecopyresampled($dest, $src, 0, 0, ($ws - $wc) / 2, ($hs - $hc) / 2, $wd, $hd, $wc, $hc);
$saved = false;
if (!isset($q)) if (!isset($q))
$q = 100; $q = 100;
if ($destformat == '.png') if ($destformat == '.png')
@ -678,7 +685,7 @@ function im_resize($file_src, $file_dest, $wd, $hd) {
if ($destformat == '.jpg') if ($destformat == '.jpg')
$saved = imagejpeg($dest, $file_dest, $q); $saved = imagejpeg($dest, $file_dest, $q);
if (!$saved) if (!$saved)
my_error_log('saving failed'); error_log('saving failed');
imagedestroy($dest); imagedestroy($dest);
imagedestroy($src); imagedestroy($src);

View file

@ -1231,6 +1231,13 @@ class Video {
} }
} }
} }
if(!file_exists($source['path'])){
if($type!="_thumbs.jpg"){
return array('path'=>false, 'url'=>false);
}
}
//ObjectYPT::setCache($name, $source); //ObjectYPT::setCache($name, $source);
return $source; return $source;
} }
@ -1277,6 +1284,9 @@ class Video {
} else { } else {
$obj->thumbsJpg = "{$global['webSiteRootURL']}view/img/audio_wave.jpg"; $obj->thumbsJpg = "{$global['webSiteRootURL']}view/img/audio_wave.jpg";
} }
if(empty($obj->thumbsJpg)){
$obj->thumbsJpg = $obj->poster;
}
//ObjectYPT::setCache($name, $obj); //ObjectYPT::setCache($name, $obj);
return $obj; return $obj;
} }

View file

@ -44,7 +44,7 @@ $video->setDuration($_POST['duration']);
$video->setDescription($_POST['description']); $video->setDescription($_POST['description']);
$advancedCustom = YouPHPTubePlugin::getObjectDataIfEnabled("CustomizeAdvanced"); $advancedCustom = YouPHPTubePlugin::getObjectDataIfEnabled("CustomizeAdvanced");
if(empty($obj->makeVideosInactiveAfterEncode)){ if(empty($advancedCustom->makeVideosInactiveAfterEncode)){
// set active // set active
$video->setStatus('a'); $video->setStatus('a');
}else{ }else{

View file

@ -45,15 +45,28 @@ h3.galleryTitle{
} }
.aspectRatio16_9 { .aspectRatio16_9 {
display: block;
width: 100%; width: 100%;
height: 56.25%; /* 16:9 Aspect Ratio */ height: 0;
padding-bottom: 56.25%;
overflow: hidden;
background-image: url(../../view/img/video-placeholder.png); background-image: url(../../view/img/video-placeholder.png);
background-size: cover; background-size: cover;
} }
.aspectRatio16_9 img{ .aspectRatio16_9 img{
text-indent:-9999px; text-indent:-9999px;
height: 82px; width: 100%;
display: block;
margin-left: auto;
margin-right: auto;
}
.thumbsGIF{
text-indent:-9999px;
width: 100%;
margin-left: auto;
margin-right: auto;
} }
.firstRow{ .firstRow{

View file

@ -97,6 +97,7 @@ $totalPages = ceil($total / $_POST['rowCount']);
<?php <?php
if (!empty($videos)) { if (!empty($videos)) {
$name = User::getNameIdentificationById($video['users_id']); $name = User::getNameIdentificationById($video['users_id']);
$img_portrait = ($video['rotation'] === "90" || $video['rotation'] === "270") ? "img-portrait" : "";
?> ?>
<div class="row mainArea"> <div class="row mainArea">
<div class="clear clearfix firstRow"> <div class="clear clearfix firstRow">
@ -110,13 +111,14 @@ $totalPages = ceil($total / $_POST['rowCount']);
$poster = $images->poster; $poster = $images->poster;
?> ?>
<div class="aspectRatio16_9"> <div class="aspectRatio16_9">
<img src="<?php echo $poster; ?>" alt="<?php echo $video['title']; ?>" class="thumbsJPG img img-responsive " /> <img src="<?php echo $poster; ?>" alt="<?php echo $video['title']; ?>" class="thumbsJPG img img-responsive " style="height: auto; width: 100%;" id="thumbsJPG<?php echo $video['id']; ?>" />
<?php
if (!empty($imgGif)) {
?>
<img src="<?php echo $imgGif; ?>" style="position: absolute; top: 0; display: none;" alt="<?php echo $video['title']; ?>" id="thumbsGIF<?php echo $video['id']; ?>" class="thumbsGIF img-responsive <?php echo @$img_portrait; ?> rotate<?php echo $video['rotation']; ?>" height="130" />
<?php } ?>
</div> </div>
<?php
if (!empty($imgGif)) {
?>
<img src="<?php echo $imgGif; ?>" style="position: absolute; top: 0; display: none;" alt="<?php echo $video['title']; ?>" id="thumbsGIF<?php echo $video['id']; ?>" class="thumbsGIF img-responsive <?php echo $img_portrait; ?> rotate<?php echo $video['rotation']; ?>" height="130" />
<?php } ?>
<span class="duration"><?php echo Video::getCleanDuration($video['duration']); ?></span> <span class="duration"><?php echo Video::getCleanDuration($video['duration']); ?></span>
</a> </a>
</div> </div>
@ -126,38 +128,38 @@ $totalPages = ceil($total / $_POST['rowCount']);
</a> </a>
<h4 itemprop="description"><?php echo nl2br(textToLink($video['description'])); ?></h4> <h4 itemprop="description"><?php echo nl2br(textToLink($video['description'])); ?></h4>
<div class="text-muted galeryDetails"> <div class="text-muted galeryDetails">
<div> <div>
<?php <?php
$value['tags'] = Video::getTags($video['id']); $value['tags'] = Video::getTags($video['id']);
foreach ($value['tags'] as $value2) { foreach ($value['tags'] as $value2) {
if ($value2->label === __("Group")) { if ($value2->label === __("Group")) {
?> ?>
<span class="label label-<?php echo $value2->type; ?>"><?php echo $value2->text; ?></span> <span class="label label-<?php echo $value2->type; ?>"><?php echo $value2->text; ?></span>
<?php <?php
}
} }
?> }
</div> ?>
<div>
<i class="fa fa-eye"></i>
<span itemprop="interactionCount">
<?php echo number_format($video['views_count'], 0); ?> <?php echo __("Views"); ?>
</span>
</div>
<div>
<i class="fa fa-clock-o"></i>
<?php
echo humanTiming(strtotime($video['videoCreation'])), " ", __('ago');
?>
</div>
<div class="userName">
<i class="fa fa-user"></i>
<?php
echo $name;
?>
</div>
</div> </div>
<div>
<i class="fa fa-eye"></i>
<span itemprop="interactionCount">
<?php echo number_format($video['views_count'], 0); ?> <?php echo __("Views"); ?>
</span>
</div>
<div>
<i class="fa fa-clock-o"></i>
<?php
echo humanTiming(strtotime($video['videoCreation'])), " ", __('ago');
?>
</div>
<div class="userName">
<i class="fa fa-user"></i>
<?php
echo $name;
?>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -186,13 +188,13 @@ $totalPages = ceil($total / $_POST['rowCount']);
$poster = $images->thumbsJpg; $poster = $images->thumbsJpg;
?> ?>
<div class="aspectRatio16_9"> <div class="aspectRatio16_9">
<img src="<?php echo $poster; ?>" alt="<?php echo $value['title']; ?>" class="thumbsJPG img img-responsive <?php echo $img_portrait; ?> rotate<?php echo $value['rotation']; ?>" /> <img src="<?php echo $poster; ?>" alt="<?php echo $value['title']; ?>" class="thumbsJPG img img-responsive <?php echo $img_portrait; ?> rotate<?php echo $value['rotation']; ?>" id="thumbsJPG<?php echo $value['id']; ?>"/>
<?php
if (!empty($imgGif)) {
?>
<img src="<?php echo $imgGif; ?>" style="position: absolute; top: 0; display: none;" alt="<?php echo $value['title']; ?>" id="thumbsGIF<?php echo $value['id']; ?>" class="thumbsGIF img-responsive <?php echo $img_portrait; ?> rotate<?php echo $value['rotation']; ?>" height="130" />
<?php } ?>
</div> </div>
<?php
if (!empty($imgGif)) {
?>
<img src="<?php echo $imgGif; ?>" style="position: absolute; top: 0; display: none;" alt="<?php echo $value['title']; ?>" id="thumbsGIF<?php echo $value['id']; ?>" class="thumbsGIF img-responsive <?php echo $img_portrait; ?> rotate<?php echo $value['rotation']; ?>" height="130" />
<?php } ?>
<span class="duration"><?php echo Video::getCleanDuration($value['duration']); ?></span> <span class="duration"><?php echo Video::getCleanDuration($value['duration']); ?></span>
</a> </a>
<a href="<?php echo $global['webSiteRootURL']; ?>video/<?php echo $value['clean_title']; ?>" title="<?php echo $value['title']; ?>"> <a href="<?php echo $global['webSiteRootURL']; ?>video/<?php echo $value['clean_title']; ?>" title="<?php echo $value['title']; ?>">
@ -253,7 +255,12 @@ $totalPages = ceil($total / $_POST['rowCount']);
page: <?php echo $_GET['page']; ?>, page: <?php echo $_GET['page']; ?>,
maxVisible: 10 maxVisible: 10
}).on('page', function (event, num) { }).on('page', function (event, num) {
<?php $url = ''; if(strpos($_SERVER['REQUEST_URI'],"cat")===false){ $url = $global['webSiteRootURL']."page/"; } else { $url = $global['webSiteRootURL']."cat/".$video['clean_category']."/page/"; } ?> <?php $url = '';
if (strpos($_SERVER['REQUEST_URI'], "cat") === false) {
$url = $global['webSiteRootURL'] . "page/";
} else {
$url = $global['webSiteRootURL'] . "cat/" . $video['clean_category'] . "/page/";
} ?>
window.location.replace("<?php echo $url; ?>" + num); window.location.replace("<?php echo $url; ?>" + num);
}); });
}); });
@ -283,19 +290,20 @@ $totalPages = ceil($total / $_POST['rowCount']);
?> ?>
<div class="col-lg-2 col-md-4 col-sm-4 col-xs-6 galleryVideo thumbsImage fixPadding"> <div class="col-lg-2 col-md-4 col-sm-4 col-xs-6 galleryVideo thumbsImage fixPadding">
<a href="<?php echo $global['webSiteRootURL']; ?>cat/<?php echo $value['clean_category']; ?>/video/<?php echo $value['clean_title']; ?>" title="<?php echo $value['title']; ?>" > <a href="<?php echo $global['webSiteRootURL']; ?>cat/<?php echo $value['clean_category']; ?>/video/<?php echo $value['clean_title']; ?>" 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;
$poster = $images->thumbsJpg; $poster = $images->thumbsJpg;
?> ?>
<div class="aspectRatio16_9"> <div class="aspectRatio16_9">
<img src="<?php echo $poster; ?>" alt="<?php echo $value['title']; ?>" class="thumbsJPG img img-responsive <?php echo $img_portrait; ?> rotate<?php echo $value['rotation']; ?>" /> <img src="<?php echo $poster; ?>" alt="<?php echo $value['title']; ?>" class="thumbsJPG img img-responsive <?php echo $img_portrait; ?> rotate<?php echo $value['rotation']; ?>" id="thumbsJPG<?php echo $value['id']; ?>" />
<?php
if (!empty($imgGif)) {
?>
<img src="<?php echo $imgGif; ?>" style="position: absolute; top: 0; display: none;" alt="<?php echo $value['title']; ?>" id="thumbsGIF<?php echo $value['id']; ?>" class="thumbsGIF img-responsive <?php echo $img_portrait; ?> rotate<?php echo $value['rotation']; ?>" height="130" />
<?php } ?>
</div> </div>
<?php
if (!empty($imgGif)) {
?>
<img src="<?php echo $imgGif; ?>" style="position: absolute; top: 0; display: none;" alt="<?php echo $value['title']; ?>" id="thumbsGIF<?php echo $value['id']; ?>" class="thumbsGIF img-responsive <?php echo $img_portrait; ?> rotate<?php echo $value['rotation']; ?>" height="130" />
<?php } ?>
<span class="duration"><?php echo Video::getCleanDuration($value['duration']); ?></span> <span class="duration"><?php echo Video::getCleanDuration($value['duration']); ?></span>
</a> </a>
<a href="<?php echo $global['webSiteRootURL']; ?>video/<?php echo $value['clean_title']; ?>" title="<?php echo $value['title']; ?>"> <a href="<?php echo $global['webSiteRootURL']; ?>video/<?php echo $value['clean_title']; ?>" title="<?php echo $value['title']; ?>">
@ -338,10 +346,29 @@ $totalPages = ceil($total / $_POST['rowCount']);
</div> </div>
</div> </div>
</div> <div>
<i class="fa fa-eye"></i>
<span itemprop="interactionCount">
<?php echo number_format($value['views_count'], 0); ?> <?php echo __("Views"); ?>
</span>
</div>
<div>
<i class="fa fa-clock-o"></i>
<?php
echo humanTiming(strtotime($value['videoCreation'])), " ", __('ago');
?>
</div>
<div class="userName">
<i class="fa fa-user"></i>
<?php <?php
} echo $name;
?> ?>
</div>
</div>
</div>
<?php
}
?>
</div> </div>
</div> </div>
<div class="clear clearfix"> <div class="clear clearfix">
@ -364,19 +391,20 @@ $totalPages = ceil($total / $_POST['rowCount']);
?> ?>
<div class="col-lg-2 col-md-4 col-sm-4 col-xs-6 galleryVideo thumbsImage fixPadding"> <div class="col-lg-2 col-md-4 col-sm-4 col-xs-6 galleryVideo thumbsImage fixPadding">
<a href="<?php echo $global['webSiteRootURL']; ?>cat/<?php echo $value['clean_category']; ?>/video/<?php echo $value['clean_title']; ?>" title="<?php echo $value['title']; ?>" > <a href="<?php echo $global['webSiteRootURL']; ?>cat/<?php echo $value['clean_category']; ?>/video/<?php echo $value['clean_title']; ?>" 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;
$poster = $images->thumbsJpg; $poster = $images->thumbsJpg;
?> ?>
<div class="aspectRatio16_9"> <div class="aspectRatio16_9">
<img src="<?php echo $poster; ?>" alt="<?php echo $value['title']; ?>" class="thumbsJPG img img-responsive <?php echo $img_portrait; ?> rotate<?php echo $value['rotation']; ?>" /> <img src="<?php echo $poster; ?>" alt="<?php echo $value['title']; ?>" class="thumbsJPG img img-responsive <?php echo $img_portrait; ?> rotate<?php echo $value['rotation']; ?>" id="thumbsJPG<?php echo $value['id']; ?>"/>
<?php
if (!empty($imgGif)) {
?>
<img src="<?php echo $imgGif; ?>" style="position: absolute; top: 0; display: none;" alt="<?php echo $value['title']; ?>" id="thumbsGIF<?php echo $value['id']; ?>" class="thumbsGIF img-responsive <?php echo $img_portrait; ?> rotate<?php echo $value['rotation']; ?>" height="130" />
<?php } ?>
</div> </div>
<?php
if (!empty($imgGif)) {
?>
<img src="<?php echo $imgGif; ?>" style="position: absolute; top: 0; display: none;" alt="<?php echo $value['title']; ?>" id="thumbsGIF<?php echo $value['id']; ?>" class="thumbsGIF img-responsive <?php echo $img_portrait; ?> rotate<?php echo $value['rotation']; ?>" height="130" />
<?php } ?>
<span class="duration"><?php echo Video::getCleanDuration($value['duration']); ?></span> <span class="duration"><?php echo Video::getCleanDuration($value['duration']); ?></span>
</a> </a>
<a href="<?php echo $global['webSiteRootURL']; ?>video/<?php echo $value['clean_title']; ?>" title="<?php echo $value['title']; ?>"> <a href="<?php echo $global['webSiteRootURL']; ?>video/<?php echo $value['clean_title']; ?>" title="<?php echo $value['title']; ?>">
@ -417,11 +445,31 @@ $totalPages = ceil($total / $_POST['rowCount']);
<button type="button" class="btn btn-xs" data-trigger="focus" data-toggle="popover" data-placement="top" data-html="true" title="<?php echo $value['title']; ?>" data-content="<div><?php echo nl2br(textToLink($value['description'])); ?></div>">Description</button> <button type="button" class="btn btn-xs" data-trigger="focus" data-toggle="popover" data-placement="top" data-html="true" title="<?php echo $value['title']; ?>" data-content="<div><?php echo nl2br(textToLink($value['description'])); ?></div>">Description</button>
<?php } ?> <?php } ?>
</div> </div>
</div> </div>
</div> <div>
<i class="fa fa-eye"></i>
<span itemprop="interactionCount">
<?php echo number_format($value['views_count'], 0); ?> <?php echo __("Views"); ?>
</span>
</div>
<div>
<i class="fa fa-clock-o"></i>
<?php
echo humanTiming(strtotime($value['videoCreation'])), " ", __('ago');
?>
</div>
<div class="userName">
<i class="fa fa-user"></i>
<?php <?php
} echo $name;
?> ?>
</div>
</div>
</div>
<?php
}
?>
</div> </div>
</div> </div>
<?php <?php
@ -430,16 +478,16 @@ $totalPages = ceil($total / $_POST['rowCount']);
<div class="alert alert-warning"> <div class="alert alert-warning">
<span class="glyphicon glyphicon-facetime-video"></span> <strong><?php echo __("Warning"); ?>!</strong> <?php echo __("We have not found any videos or audios to show"); ?>. <span class="glyphicon glyphicon-facetime-video"></span> <strong><?php echo __("Warning"); ?>!</strong> <?php echo __("We have not found any videos or audios to show"); ?>.
</div> </div>
<?php } ?> <?php } ?>
</div> </div>
<div class="col-xs-12 col-sm-1 col-md-1 col-lg-1"></div> <div class="col-xs-12 col-sm-1 col-md-1 col-lg-1"></div>
</div> </div>
<?php <?php
include 'include/footer.php'; include 'include/footer.php';
?> ?>
</body> </body>

View file

@ -21,7 +21,7 @@ if (User::isLogged() && $user_id == User::getId()) {
} }
$user = new User($user_id); $user = new User($user_id);
$uploadedVideos = Video::getAllVideos("viewable", $user_id); $uploadedVideos = Video::getAllVideos("a", $user_id);
$publicOnly = true; $publicOnly = true;
if (User::isLogged() && $user_id == User::getId()) { if (User::isLogged() && $user_id == User::getId()) {
$publicOnly = false; $publicOnly = false;
@ -79,7 +79,7 @@ $playlists = PlayList::getAllFromUser($user_id, $publicOnly);
if (empty($videosArrayId)) { if (empty($videosArrayId)) {
continue; continue;
} }
$videos = Video::getAllVideos("viewable", false, false, $videosArrayId); $videos = Video::getAllVideos("a", false, false, $videosArrayId);
$videos = PlayList::sortVideos($videos, $videosArrayId); $videos = PlayList::sortVideos($videos, $videosArrayId);
?> ?>
@ -134,7 +134,7 @@ $playlists = PlayList::getAllFromUser($user_id, $publicOnly);
$imgGif = $images->thumbsGif; $imgGif = $images->thumbsGif;
$poster = $images->thumbsJpg; $poster = $images->thumbsJpg;
?> ?>
<li class="col-lg-2 col-md-3 col-sm-4 col-xs-6 galleryVideo " id="<?php echo $value['id']; ?>"> <li class="col-lg-2 col-md-4 col-sm-4 col-xs-6 galleryVideo " id="<?php echo $value['id']; ?>">
<a class="aspectRatio16_9" href="<?php echo $global['webSiteRootURL']; ?>video/<?php echo $value['clean_title']; ?>" title="<?php echo $value['title']; ?>" style="padding: 0; margin: 0;" > <a class="aspectRatio16_9" href="<?php echo $global['webSiteRootURL']; ?>video/<?php echo $value['clean_title']; ?>" title="<?php echo $value['title']; ?>" style="padding: 0; margin: 0;" >
<img src="<?php echo $poster; ?>" alt="<?php echo $value['title']; ?>" class="img img-responsive <?php echo $img_portrait; ?> rotate<?php echo $value['rotation']; ?>" /> <img src="<?php echo $poster; ?>" alt="<?php echo $value['title']; ?>" class="img img-responsive <?php echo $img_portrait; ?> rotate<?php echo $value['rotation']; ?>" />
<span class="duration"><?php echo Video::getCleanDuration($value['duration']); ?></span> <span class="duration"><?php echo Video::getCleanDuration($value['duration']); ?></span>
@ -221,7 +221,7 @@ $playlists = PlayList::getAllFromUser($user_id, $publicOnly);
$imgGif = $images->thumbsGif; $imgGif = $images->thumbsGif;
$poster = $images->thumbsJpg; $poster = $images->thumbsJpg;
?> ?>
<div class="col-lg-2 col-md-3 col-sm-4 col-xs-6 galleryVideo "> <div class="col-lg-2 col-md-4 col-sm-4 col-xs-6 galleryVideo ">
<a class="aspectRatio16_9" href="<?php echo $global['webSiteRootURL']; ?>video/<?php echo $value['clean_title']; ?>" title="<?php echo $value['title']; ?>" > <a class="aspectRatio16_9" href="<?php echo $global['webSiteRootURL']; ?>video/<?php echo $value['clean_title']; ?>" title="<?php echo $value['title']; ?>" >
<img src="<?php echo $poster; ?>" alt="<?php echo $value['title']; ?>" class="img img-responsive <?php echo $img_portrait; ?> rotate<?php echo $value['rotation']; ?>" /> <img src="<?php echo $poster; ?>" alt="<?php echo $value['title']; ?>" class="img img-responsive <?php echo $img_portrait; ?> rotate<?php echo $value['rotation']; ?>" />
<span class="duration"><?php echo Video::getCleanDuration($value['duration']); ?></span> <span class="duration"><?php echo Video::getCleanDuration($value['duration']); ?></span>

View file

@ -54,8 +54,20 @@ $(document).ready(function () {
$('[data-toggle="tooltip"]').tooltip(); $('[data-toggle="tooltip"]').tooltip();
$(".thumbsImage").on("mouseenter", function () { $(".thumbsImage").on("mouseenter", function () {
gifId = $(this).find(".thumbsGIF").attr('id');
id = gifId.replace('thumbsGIF','');
$(this).find(".thumbsGIF").height($(this).find(".thumbsJPG").height()); $(this).find(".thumbsGIF").height($(this).find(".thumbsJPG").height());
$(this).find(".thumbsGIF").width($(this).find(".thumbsJPG").width()); $(this).find(".thumbsGIF").width($(this).find(".thumbsJPG").width());
/*
try {
l1 = $('#thumbsJPG'+id).offset().left;
l2 = $('#thumbsJPG'+id).closest('.thumbsImage').offset().left;
left = l1-l2;
$(this).find(".thumbsGIF").css({"left": left});
} catch (e) {}
*/
$(this).find(".thumbsGIF").stop(true, true).fadeIn(); $(this).find(".thumbsGIF").stop(true, true).fadeIn();
}); });

View file

@ -31,7 +31,7 @@ if (isset($_FILES['upl']) && $_FILES['upl']['error'] == 0) {
$video->setDuration($duration); $video->setDuration($duration);
$video->setType("video"); $video->setType("video");
$advancedCustom = YouPHPTubePlugin::getObjectDataIfEnabled("CustomizeAdvanced"); $advancedCustom = YouPHPTubePlugin::getObjectDataIfEnabled("CustomizeAdvanced");
if (empty($obj->makeVideosInactiveAfterEncode)) { if (empty($advancedCustom->makeVideosInactiveAfterEncode)) {
// set active // set active
$video->setStatus('a'); $video->setStatus('a');
} else { } else {

View file

@ -26,7 +26,7 @@ if(!empty($_GET['download'])){
} }
YouPHPTubePlugin::xsendfilePreVideoPlay(); YouPHPTubePlugin::xsendfilePreVideoPlay();
$advancedCustom = YouPHPTubePlugin::getObjectDataIfEnabled("CustomizeAdvanced"); $advancedCustom = YouPHPTubePlugin::getObjectDataIfEnabled("CustomizeAdvanced");
if(!empty($advancedCustom->doNotUseXsendFile)){ if(empty($advancedCustom->doNotUseXsendFile)){
header("X-Sendfile: {$path}"); header("X-Sendfile: {$path}");
} }
if(empty($_GET['download'])){ if(empty($_GET['download'])){