1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 17:59:55 +02:00

Wrong download button

This commit is contained in:
DanieL 2022-04-26 14:26:57 -03:00
parent 6d2883076b
commit c3ecb22e78

View file

@ -1,356 +1,362 @@
<?php <?php
if (empty($global['systemRootPath'])) { if (empty($global['systemRootPath'])) {
require_once '../videos/configuration.php'; require_once '../videos/configuration.php';
} }
require_once $global['systemRootPath'] . 'objects/subscribe.php'; require_once $global['systemRootPath'] . 'objects/subscribe.php';
if (empty($video) && !empty($_GET['videos_id'])) { if (empty($video) && !empty($_GET['videos_id'])) {
$video = Video::getVideo(intval($_GET['videos_id']), "viewable", true, false, true, true); $video = Video::getVideo(intval($_GET['videos_id']), "viewable", true, false, true, true);
$video['creator'] = Video::getCreatorHTML($video['users_id'], '<div class="clearfix"></div><small>' . humanTiming(strtotime($video['videoCreation'])) . '</small>'); $video['creator'] = Video::getCreatorHTML($video['users_id'], '<div class="clearfix"></div><small>' . humanTiming(strtotime($video['videoCreation'])) . '</small>');
$source = Video::getSourceFile($video['filename']); $source = Video::getSourceFile($video['filename']);
if (($video['type'] !== "audio") && ($video['type'] !== "linkAudio") && !empty($source['url'])) { if (($video['type'] !== "audio") && ($video['type'] !== "linkAudio") && !empty($source['url'])) {
$img = $source['url']; $img = $source['url'];
$data = getimgsize($source['path']); $data = getimgsize($source['path']);
$imgw = $data[0]; $imgw = $data[0];
$imgh = $data[1]; $imgh = $data[1];
} elseif ($video['type'] == "audio") { } elseif ($video['type'] == "audio") {
$img = "" . getCDN() . "view/img/audio_wave.jpg"; $img = "" . getCDN() . "view/img/audio_wave.jpg";
} }
$type = 'video'; $type = 'video';
if ($video['type'] === 'pdf') { if ($video['type'] === 'pdf') {
$type = 'pdf'; $type = 'pdf';
} elseif ($video['type'] === 'zip') { } elseif ($video['type'] === 'zip') {
$type = 'zip'; $type = 'zip';
} elseif ($video['type'] === 'article') { } elseif ($video['type'] === 'article') {
$type = 'article'; $type = 'article';
} }
$images = Video::getImageFromFilename($video['filename'], $type); $images = Video::getImageFromFilename($video['filename'], $type);
$poster = $images->poster; $poster = $images->poster;
if (!empty($images->posterPortrait) && basename($images->posterPortrait) !== 'notfound_portrait.jpg' && basename($images->posterPortrait) !== 'pdf_portrait.png' && basename($images->posterPortrait) !== 'article_portrait.png') { if (!empty($images->posterPortrait) && basename($images->posterPortrait) !== 'notfound_portrait.jpg' && basename($images->posterPortrait) !== 'pdf_portrait.png' && basename($images->posterPortrait) !== 'article_portrait.png') {
$img = $images->posterPortrait; $img = $images->posterPortrait;
$data = getimgsize($source['path']); $data = getimgsize($source['path']);
$imgw = $data[0]; $imgw = $data[0];
$imgh = $data[1]; $imgh = $data[1];
} }
} }
if (empty($video['created'])) { if (empty($video['created'])) {
return false; return false;
} }
if (User::hasBlockedUser($video['users_id'])) { if (User::hasBlockedUser($video['users_id'])) {
return false; return false;
} }
?> ?>
<div class="row bgWhite list-group-item"> <div class="row bgWhite list-group-item">
<div class="row divMainVideo"> <div class="row divMainVideo">
<div class="col-xs-4 col-sm-4 col-md-4"> <div class="col-xs-4 col-sm-4 col-md-4">
<img src="<?php echo $img; ?>" alt="<?php echo str_replace('"', '', $video['title']); ?>" class="img img-responsive <?php echo $img_portrait; ?> rotate<?php echo $video['rotation']; ?>" height="130" itemprop="thumbnail" /> <img src="<?php echo $img; ?>" alt="<?php echo str_replace('"', '', $video['title']); ?>" class="img img-responsive <?php echo $img_portrait; ?> rotate<?php echo $video['rotation']; ?>" height="130" itemprop="thumbnail" />
<?php <?php
if (isToShowDuration($video['type'])) { if (isToShowDuration($video['type'])) {
?> ?>
<time class="duration" itemprop="duration" datetime="<?php echo Video::getItemPropDuration($video['duration']); ?>" ><?php echo Video::getCleanDuration($video['duration']); ?></time> <time class="duration" itemprop="duration" datetime="<?php echo Video::getItemPropDuration($video['duration']); ?>" ><?php echo Video::getCleanDuration($video['duration']); ?></time>
<?php <?php
} }
?> ?>
<span itemprop="thumbnailUrl" content="<?php echo $img; ?>" /> <span itemprop="thumbnailUrl" content="<?php echo $img; ?>" />
<span itemprop="contentURL" content="<?php echo Video::getLink($video['id'], $video['clean_title']); ?>" /> <span itemprop="contentURL" content="<?php echo Video::getLink($video['id'], $video['clean_title']); ?>" />
<span itemprop="embedURL" content="<?php echo Video::getLink($video['id'], $video['clean_title'], true); ?>" /> <span itemprop="embedURL" content="<?php echo Video::getLink($video['id'], $video['clean_title'], true); ?>" />
<span itemprop="uploadDate" content="<?php echo $video['created']; ?>" /> <span itemprop="uploadDate" content="<?php echo $video['created']; ?>" />
<span itemprop="description" content="<?php echo str_replace('"', '', $video['title']); ?> - <?php echo htmlentities($video['description']); ?>" /> <span itemprop="description" content="<?php echo str_replace('"', '', $video['title']); ?> - <?php echo htmlentities($video['description']); ?>" />
</div> </div>
<div class="col-xs-8 col-sm-8 col-md-8"> <div class="col-xs-8 col-sm-8 col-md-8">
<h1 itemprop="name"> <h1 itemprop="name">
<?php <?php
echo $video['title']; echo $video['title'];
if (!empty($video['id']) && Video::showYoutubeModeOptions() && Video::canEdit($video['id'])) { if (!empty($video['id']) && Video::showYoutubeModeOptions() && Video::canEdit($video['id'])) {
?> ?>
<div class="btn-group" role="group" aria-label="Basic example"> <div class="btn-group" role="group" aria-label="Basic example">
<a href="#" 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"); ?>"> <a href="#" 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> <i class="fa fa-edit"></i> <span class="hidden-md hidden-sm hidden-xs"><?php echo __("Edit Video"); ?></span>
</a> </a>
<button type="button" class="btn btn-default btn-xs" onclick="avideoModalIframeFull(webSiteRootURL + 'view/videoViewsInfo.php?videos_id=<?php echo $video['id']; ?>'); <button type="button" class="btn btn-default btn-xs" onclick="avideoModalIframeFull(webSiteRootURL + 'view/videoViewsInfo.php?videos_id=<?php echo $video['id']; ?>');
return false;"> return false;">
<i class="fa fa-eye"></i> <?php echo __("Views Info"); ?> <i class="fa fa-eye"></i> <?php echo __("Views Info"); ?>
</button> </button>
</div> </div>
<?php } <?php }
?> ?>
<small> <small>
<?php <?php
if (!empty($video['id'])) { if (!empty($video['id'])) {
$video['tags'] = Video::getTags($video['id']); $video['tags'] = Video::getTags($video['id']);
} else { } else {
$video['tags'] = []; $video['tags'] = [];
} }
foreach ($video['tags'] as $value) { foreach ($video['tags'] as $value) {
if (is_array($value)) { if (is_array($value)) {
$value = (object) $value; $value = (object) $value;
} }
if ($value->label === __("Group")) { if ($value->label === __("Group")) {
?> ?>
<span class="label label-<?php echo $value->type; ?>"><?php echo $value->text; ?></span> <span class="label label-<?php echo $value->type; ?>"><?php echo $value->text; ?></span>
<?php <?php
} }
} }
?> ?>
</small> </small>
</h1> </h1>
<div class="col-xs-12 col-sm-12 col-md-12"> <div class="col-xs-12 col-sm-12 col-md-12">
<?php echo $video['creator']; ?> <?php echo $video['creator']; ?>
</div> </div>
<?php <?php
if (Video::showYoutubeModeOptions() && empty($advancedCustom->doNotDisplayViews)) { if (Video::showYoutubeModeOptions() && empty($advancedCustom->doNotDisplayViews)) {
?> ?>
<span class="watch-view-count pull-right text-muted" itemprop="interactionCount"><span class="view-count<?php echo $video['id']; ?>"><?php echo number_format_short($video['views_count']); ?></span> <?php echo __("Views"); ?></span> <span class="watch-view-count pull-right text-muted" itemprop="interactionCount"><span class="view-count<?php echo $video['id']; ?>"><?php echo number_format_short($video['views_count']); ?></span> <?php echo __("Views"); ?></span>
<?php <?php
} }
?> ?>
<?php <?php
if (AVideoPlugin::isEnabledByName("VideoTags")) { if (AVideoPlugin::isEnabledByName("VideoTags")) {
echo VideoTags::getLabels($video['id'], false); echo VideoTags::getLabels($video['id'], false);
} }
?> ?>
</div> </div>
</div> </div>
<?php <?php
if (Video::showYoutubeModeOptions()) { if (Video::showYoutubeModeOptions()) {
?> ?>
<div class="row"> <div class="row">
<div class="col-md-12 watch8-action-buttons text-muted"> <div class="col-md-12 watch8-action-buttons text-muted">
<?php if (empty($advancedCustom->disableShareAndPlaylist)) { ?> <?php if (empty($advancedCustom->disableShareAndPlaylist)) { ?>
<?php if (CustomizeUser::canShareVideosFromVideo($video['id'])) { ?> <?php if (CustomizeUser::canShareVideosFromVideo($video['id'])) { ?>
<a href="#" class="btn btn-default no-outline" id="shareBtn"> <a href="#" class="btn btn-default no-outline" id="shareBtn">
<span class="fa fa-share"></span> <span class="fa fa-share"></span>
<span class="hidden-sm hidden-xs"><?php echo __("Share"); ?></span> <span class="hidden-sm hidden-xs"><?php echo __("Share"); ?></span>
</a> </a>
<?php <?php
} }
$filesToDownload = []; $filesToDownload = [];
if (CustomizeUser::canDownloadVideosFromVideo($video['id'])) { if (CustomizeUser::canDownloadVideosFromVideo($video['id'])) {
if ($video['type'] == "zip") { if ($video['type'] == "zip") {
$files = getVideosURLZIP($video['filename']); $files = getVideosURLZIP($video['filename']);
} else { } else {
$files = getVideosURL($video['filename']); $files = getVideosURL($video['filename']);
}//var_dump($files);exit; }//var_dump($files);exit;
$downloadMP3Link = array(); $downloadMP3Link = array();
$downloadMP4Link = array(); $downloadMP4Link = array();
foreach ($files as $key => $theLink) { foreach ($files as $key => $theLink) {
//$notAllowedKeys = array('m3u8'); //$notAllowedKeys = array('m3u8');
$notAllowedKeys = []; $notAllowedKeys = [];
if (empty($advancedCustom->showImageDownloadOption)) { if (empty($advancedCustom->showImageDownloadOption)) {
$notAllowedKeys = array_merge($notAllowedKeys, ['jpg', 'gif', 'webp', 'pjpg']); $notAllowedKeys = array_merge($notAllowedKeys, ['jpg', 'gif', 'webp', 'pjpg']);
} }
$keyFound = false; $keyFound = false;
foreach ($notAllowedKeys as $notAllowedKey) { foreach ($notAllowedKeys as $notAllowedKey) {
if (preg_match("/{$notAllowedKey}/", $key)) { if (preg_match("/{$notAllowedKey}/", $key)) {
$keyFound = true; $keyFound = true;
break; break;
} }
} }
if ($keyFound) { if ($keyFound) {
continue; continue;
} }
if (!preg_match('/cdn\.ypt\.me(.*)\.m3u8/i', $theLink['url'])) { if (!preg_match('/cdn\.ypt\.me(.*)\.m3u8/i', $theLink['url'])) {
$theLink['url'] = addQueryStringParameter($theLink['url'], "download", 1); $theLink['url'] = addQueryStringParameter($theLink['url'], "download", 1);
$theLink['url'] = addQueryStringParameter($theLink['url'], "title", $video['title'] . "_{$key}_." . ($video['type'] === 'audio' ? 'mp3' : 'mp4')); $theLink['url'] = addQueryStringParameter($theLink['url'], "title", $video['title'] . "_{$key}_." . ($video['type'] === 'audio' ? 'mp3' : 'mp4'));
$parts = explode("_", $key); $parts = explode("_", $key);
$name = $key; $name = $key;
if (count($parts) > 1) { if (count($parts) > 1) {
$name = strtoupper($parts[0]); $name = strtoupper($parts[0]);
if (is_numeric($parts[1])) { if (is_numeric($parts[1])) {
$name .= " <div class='label label-primary'>{$parts[1]}p</div> " . getResolutionLabel($parts[1]); $name .= " <div class='label label-primary'>{$parts[1]}p</div> " . getResolutionLabel($parts[1]);
} else { } else {
$name .= " <div class='label label-primary'>" . strtoupper($parts[1]) . "</div> "; $name .= " <div class='label label-primary'>" . strtoupper($parts[1]) . "</div> ";
} }
} }
$filesToDownload[] = ['name' => $name, 'url' => $theLink['url']]; $filesToDownload[] = ['name' => $name, 'url' => $theLink['url']];
} }
} }
$videoHLSObj = AVideoPlugin::getDataObjectIfEnabled('VideoHLS'); $videoHLSObj = AVideoPlugin::getDataObjectIfEnabled('VideoHLS');
if (!empty($videoHLSObj)) { if (!empty($videoHLSObj)) {
if (!empty($videoHLSObj->saveMP4CopyOnCDNStorageToAllowDownload)) { $cdnObj = AVideoPlugin::getDataObjectIfEnabled('CDN');
$filesToDownload[] = VideoHLS::getCDNDownloadLink($video['id'], 'mp4'); if(!empty($cdnObj) && $cdnObj->enable_storage){
} if (!empty($videoHLSObj->saveMP4CopyOnCDNStorageToAllowDownload)) {
if (!empty($videoHLSObj->saveMP3CopyOnCDNStorageToAllowDownload)) { $filesToDownload[] = VideoHLS::getCDNDownloadLink($video['id'], 'mp4');
$filesToDownload[] = VideoHLS::getCDNDownloadLink($video['id'], 'mp3'); }
} if (!empty($videoHLSObj->saveMP3CopyOnCDNStorageToAllowDownload)) {
} $filesToDownload[] = VideoHLS::getCDNDownloadLink($video['id'], 'mp3');
}
}
if (!empty($filesToDownload)) { }
?>
<a href="#" class="btn btn-default no-outline" id="downloadBtn">
<span class="fa fa-download"></span> if (!empty($filesToDownload)) {
<span class="hidden-sm hidden-xs"><?php echo __("Download"); ?></span> ?>
</a> <a href="#" class="btn btn-default no-outline" id="downloadBtn">
<?php <span class="fa fa-download"></span>
} else { <span class="hidden-sm hidden-xs"><?php echo __("Download"); ?></span>
echo '<!-- files to download are empty -->'; </a>
} <?php
} else { } else {
echo '<!-- CustomizeUser::canDownloadVideosFromVideo said NO -->'; echo '<!-- files to download are empty -->';
} }
?> } else {
<?php echo '<!-- CustomizeUser::canDownloadVideosFromVideo said NO -->';
} }
$_v = $video; ?>
echo AVideoPlugin::getWatchActionButton($video['id']); <?php
$video = $_v; }
?> $_v = $video;
<?php echo AVideoPlugin::getWatchActionButton($video['id']);
if (!empty($video['id']) && empty($advancedCustom->removeThumbsUpAndDown)) { $video = $_v;
?> ?>
<a href="#" class="faa-parent animated-hover btn btn-default no-outline pull-right <?php echo (@$video['myVote'] == - 1) ? "myVote" : "" ?>" id="dislikeBtn" <?php if (!User::isLogged()) { ?> data-toggle="tooltip" title="<?php echo __("Don´t like this video? Sign in to make your opinion count."); ?>" <?php } ?>> <?php
<span class="fa fa-thumbs-down faa-bounce faa-reverse "></span> <small><?php echo $video['dislikes']; ?></small> if (!empty($video['id']) && empty($advancedCustom->removeThumbsUpAndDown)) {
</a> ?>
<a href="#" class="faa-parent animated-hover btn btn-default no-outline pull-right <?php echo (@$video['myVote'] == 1) ? "myVote" : "" ?>" id="likeBtn" <?php if (!User::isLogged()) { ?> data-toggle="tooltip" title="<?php echo __("Like this video? Sign in to make your opinion count."); ?>" <?php } ?>> <a href="#" class="faa-parent animated-hover btn btn-default no-outline pull-right <?php echo (@$video['myVote'] == - 1) ? "myVote" : "" ?>" id="dislikeBtn" <?php if (!User::isLogged()) { ?> data-toggle="tooltip" title="<?php echo __("Don´t like this video? Sign in to make your opinion count."); ?>" <?php } ?>>
<span class="fa fa-thumbs-up faa-bounce"></span> <span class="fa fa-thumbs-down faa-bounce faa-reverse "></span> <small><?php echo $video['dislikes']; ?></small>
<small><?php echo $video['likes']; ?></small> </a>
</a> <a href="#" class="faa-parent animated-hover btn btn-default no-outline pull-right <?php echo (@$video['myVote'] == 1) ? "myVote" : "" ?>" id="likeBtn" <?php if (!User::isLogged()) { ?> data-toggle="tooltip" title="<?php echo __("Like this video? Sign in to make your opinion count."); ?>" <?php } ?>>
<script> <span class="fa fa-thumbs-up faa-bounce"></span>
$(document).ready(function () { <small><?php echo $video['likes']; ?></small>
<?php if (User::isLogged()) { ?> </a>
$("#dislikeBtn, #likeBtn").click(function () { <script>
$.ajax({ $(document).ready(function () {
url: '<?php echo $global['webSiteRootURL']; ?>' + ($(this).attr("id") == "dislikeBtn" ? "dislike" : "like"), <?php if (User::isLogged()) { ?>
method: 'POST', $("#dislikeBtn, #likeBtn").click(function () {
data: {'videos_id': <?php echo $video['id']; ?>}, $.ajax({
success: function (response) { url: '<?php echo $global['webSiteRootURL']; ?>' + ($(this).attr("id") == "dislikeBtn" ? "dislike" : "like"),
$("#likeBtn, #dislikeBtn").removeClass("myVote"); method: 'POST',
if (response.myVote == 1) { data: {'videos_id': <?php echo $video['id']; ?>},
$("#likeBtn").addClass("myVote"); success: function (response) {
} else if (response.myVote == -1) { $("#likeBtn, #dislikeBtn").removeClass("myVote");
$("#dislikeBtn").addClass("myVote"); if (response.myVote == 1) {
} $("#likeBtn").addClass("myVote");
$("#likeBtn small").text(response.likes); } else if (response.myVote == -1) {
$("#dislikeBtn small").text(response.dislikes); $("#dislikeBtn").addClass("myVote");
} }
}); $("#likeBtn small").text(response.likes);
return false; $("#dislikeBtn small").text(response.dislikes);
}); }
<?php } else { ?> });
$("#dislikeBtn, #likeBtn").click(function () { return false;
$(this).tooltip("show"); });
return false; <?php } else { ?>
}); $("#dislikeBtn, #likeBtn").click(function () {
<?php } ?> $(this).tooltip("show");
}); return false;
</script> });
<?php } ?>
<?php } });
?> </script>
</div>
</div> <?php }
<?php ?>
} </div>
?> </div>
</div> <?php
}
<?php if (!empty($filesToDownload) && CustomizeUser::canDownloadVideosFromVideo($video['id'])) { ?> ?>
<div class="row bgWhite list-group-item menusDiv" id="downloadDiv"> </div>
<div class="tabbable-panel">
<div class="list-group list-group-horizontal"> <?php if (!empty($filesToDownload) && CustomizeUser::canDownloadVideosFromVideo($video['id'])) { ?>
<?php <div class="row bgWhite list-group-item menusDiv" id="downloadDiv">
foreach ($filesToDownload as $theLink) { <div class="tabbable-panel">
if (preg_match('/\.json/i', $theLink['url'])) { <div class="list-group list-group-horizontal">
?> <?php
<button type="button" onclick="downloadURLOrAlertError('<?php echo $theLink['url']; ?>', {}, '<?php echo $video['clean_title']; ?>.<?php echo strtolower($theLink['name']); ?>');" foreach ($filesToDownload as $theLink) {
class="btn btn-default" target="_blank"> if(empty($theLink)){
<i class="fas fa-download"></i> <?php echo $theLink['name']; ?> continue;
</button> }
<?php if (preg_match('/\.json/i', $theLink['url'])) {
} else { ?>
?> <button type="button" onclick="downloadURLOrAlertError('<?php echo $theLink['url']; ?>', {}, '<?php echo $video['clean_title']; ?>.<?php echo strtolower($theLink['name']); ?>');"
<a href="<?php echo $theLink['url']; ?>" class="list-group-item list-group-item-action" target="_blank"> class="btn btn-default" target="_blank">
<i class="fas fa-download"></i> <?php echo $theLink['name']; ?> <i class="fas fa-download"></i> <?php echo $theLink['name']; ?>
</a> </button>
<?php <?php
} } else {
} ?>
?> <a href="<?php echo $theLink['url']; ?>" class="list-group-item list-group-item-action" target="_blank">
</div> <i class="fas fa-download"></i> <?php echo $theLink['name']; ?>
</div> </a>
</div> <?php
<script> }
$(document).ready(function () { }
$("#downloadDiv").slideUp(); ?>
$("#downloadBtn").click(function () { </div>
$(".menusDiv").not("#downloadDiv").slideUp(); </div>
$("#downloadDiv").slideToggle(); </div>
return false; <script>
}); $(document).ready(function () {
}); $("#downloadDiv").slideUp();
</script> $("#downloadBtn").click(function () {
<?php $(".menusDiv").not("#downloadDiv").slideUp();
} $("#downloadDiv").slideToggle();
return false;
if ($video['type'] !== 'notfound' && CustomizeUser::canShareVideosFromVideo($video['id'])) { });
getShareMenu($video['title'], Video::getPermaLink($video['id']), Video::getURLFriendly($video['id']), Video::getLink($video['id'], $video['clean_title'], true), $img, "row bgWhite list-group-item menusDiv", parseDurationToSeconds($video['duration'])); });
} </script>
?> <?php
<div class="row bgWhite list-group-item" id="modeYoutubeBottomContentDetails"> }
<div class="row">
<div class="col-xs-12 col-sm-12 col-lg-12"> if ($video['type'] !== 'notfound' && CustomizeUser::canShareVideosFromVideo($video['id'])) {
<div class="col-xs-4 col-sm-2 col-lg-2 text-right"><strong><?php echo __("Category"); ?>:</strong></div> getShareMenu($video['title'], Video::getPermaLink($video['id']), Video::getURLFriendly($video['id']), Video::getLink($video['id'], $video['clean_title'], true), $img, "row bgWhite list-group-item menusDiv", parseDurationToSeconds($video['duration']));
<div class="col-xs-8 col-sm-10 col-lg-10"><a class="btn btn-xs btn-default" href="<?php echo $global['webSiteRootURL']; ?>cat/<?php echo $video['clean_category']; ?>"><span class="<?php echo $video['iconClass']; ?>"></span> <?php echo $video['category']; ?></a></div> }
<?php ?>
if (!empty($video['rrating'])) { <div class="row bgWhite list-group-item" id="modeYoutubeBottomContentDetails">
?> <div class="row">
<div class="col-xs-4 col-sm-2 col-lg-2 text-right"><strong><?php echo __("Rating"); ?>:</strong></div> <div class="col-xs-12 col-sm-12 col-lg-12">
<div class="col-xs-8 col-sm-10 col-lg-10"> <div class="col-xs-4 col-sm-2 col-lg-2 text-right"><strong><?php echo __("Category"); ?>:</strong></div>
<?php include $global['systemRootPath'] . 'view/rrating/rating-' . $video['rrating'] . '.php'; ?> <div class="col-xs-8 col-sm-10 col-lg-10"><a class="btn btn-xs btn-default" href="<?php echo $global['webSiteRootURL']; ?>cat/<?php echo $video['clean_category']; ?>"><span class="<?php echo $video['iconClass']; ?>"></span> <?php echo $video['category']; ?></a></div>
</div> <?php
<?php if (!empty($video['rrating'])) {
} ?>
if ($video['type'] !== 'notfound' && $video['type'] !== 'article' && !isHTMLEmpty($video['description'])) { <div class="col-xs-4 col-sm-2 col-lg-2 text-right"><strong><?php echo __("Rating"); ?>:</strong></div>
?> <div class="col-xs-8 col-sm-10 col-lg-10">
<div class="col-xs-4 col-sm-2 col-lg-2 text-right"><strong><?php echo __("Description"); ?>:</strong></div> <?php include $global['systemRootPath'] . 'view/rrating/rating-' . $video['rrating'] . '.php'; ?>
<div class="col-xs-8 col-sm-10 col-lg-10 descriptionArea" itemprop="description"> </div>
<div class="descriptionAreaPreContent"> <?php
<div class="descriptionAreaContent"> }
<?php echo Video::htmlDescription($video['description']); ?> if ($video['type'] !== 'notfound' && $video['type'] !== 'article' && !isHTMLEmpty($video['description'])) {
</div> ?>
</div> <div class="col-xs-4 col-sm-2 col-lg-2 text-right"><strong><?php echo __("Description"); ?>:</strong></div>
<button onclick="$(this).closest('.descriptionArea').toggleClass('expanded');" class="btn btn-xs btn-default descriptionAreaShowMoreBtn" style="display: none; "> <div class="col-xs-8 col-sm-10 col-lg-10 descriptionArea" itemprop="description">
<span class="showMore"><i class="fas fa-caret-down"></i> <?php echo __("Show More"); ?></span> <div class="descriptionAreaPreContent">
<span class="showLess"><i class="fas fa-caret-up"></i> <?php echo __("Show Less"); ?></span> <div class="descriptionAreaContent">
</button> <?php echo Video::htmlDescription($video['description']); ?>
</div> </div>
<?php </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>
</div> <span class="showLess"><i class="fas fa-caret-up"></i> <?php echo __("Show Less"); ?></span>
</div> </button>
</div>
</div> <?php
<script> }
$(document).ready(function () { ?>
<?php </div>
if (empty($advancedCustom->showShareMenuOpenByDefault)) { </div>
?>
$("#shareDiv").slideUp(); </div>
<?php <script>
} $(document).ready(function () {
?> <?php
$("#shareBtn").click(function () { if (empty($advancedCustom->showShareMenuOpenByDefault)) {
$(".menusDiv").not("#shareDiv").slideUp(); ?>
$("#shareDiv").slideToggle(); $("#shareDiv").slideUp();
return false; <?php
}); }
}); ?>
</script> $("#shareBtn").click(function () {
<?php $(".menusDiv").not("#shareDiv").slideUp();
if (!empty($video['id']) && empty($advancedCustom->disableComments) && Video::showYoutubeModeOptions()) { $("#shareDiv").slideToggle();
?> return false;
<div class="row bgWhite list-group-item"> });
<?php include $global['systemRootPath'] . 'view/videoComments.php'; ?> });
</div> </script>
<?php <?php
} if (!empty($video['id']) && empty($advancedCustom->disableComments) && Video::showYoutubeModeOptions()) {
?> ?>
<div class="row bgWhite list-group-item">
<?php include $global['systemRootPath'] . 'view/videoComments.php'; ?>
</div>
<?php
}
?>