1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 09:49:28 +02:00
This commit is contained in:
Daniel Neto 2023-08-16 20:11:45 -03:00
parent c7c12525ea
commit 00f383eb49
16 changed files with 534 additions and 157 deletions

3
.gitignore vendored
View file

@ -93,4 +93,5 @@ test.php
/plugin/PedagoFlix/ /plugin/PedagoFlix/
/plugin/YPTWebRTC/ /plugin/YPTWebRTC/
plugin/CustomizeUser/getMyAccount.php plugin/CustomizeUser/getMyAccount.php
*.rnd *.rnd
/plugin/Gift/

View file

@ -85,6 +85,7 @@ Options All -Indexes
RewriteEngine on RewriteEngine on
#VideoHLS for DRM #VideoHLS for DRM
RewriteRule ^buy/? plugin/Layout/buy.php [NC,L,QSA]
RewriteRule ^id/? view/id.php [NC,L,QSA] RewriteRule ^id/? view/id.php [NC,L,QSA]
RewriteRule ^logo.png view/logo.png.php [NC,L,QSA] RewriteRule ^logo.png view/logo.png.php [NC,L,QSA]

39
locale/function.js.php Normal file
View file

@ -0,0 +1,39 @@
<?php
if (empty($_GET['lang'])) {
return '';
}
$lang = preg_replace('/[^a-z0-9_]/i', '', $_GET['lang']);
$langFile = "./{$lang}.php";
if(!file_exists($langFile)){
return '';
}
include_once $langFile;
header('Content-Type: application/javascript');
?>
var translations = <?php echo json_encode($t); ?>;
function __(str, allowHTML = false) {
let returnStr = str;
// Check if translation exists for exact string
if (translations.hasOwnProperty(str)) {
returnStr = translations[str];
} else {
// Case insensitive check
let lowerCaseKey = Object.keys(translations).find(key => key.toLowerCase() === str.toLowerCase());
if (lowerCaseKey) {
returnStr = translations[lowerCaseKey];
}
}
if (allowHTML) {
return returnStr;
}
// Escape certain characters for security
return returnStr.replace(/'/g, "&apos;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
}

View file

@ -4461,42 +4461,42 @@ function getLdJson($videos_id)
if ($duration == "PT0H0M0S") { if ($duration == "PT0H0M0S") {
$duration = "PT0H0M1S"; $duration = "PT0H0M1S";
} }
$output = ' $data = array(
<script type="application/ld+json" id="application_ld_json"> "@context" => "http://schema.org/",
{ "@type" => "VideoObject",
"@context": "http://schema.org/", "name" => getSEOTitle($video['title']),
"@type": "VideoObject", "description" => $description,
"name": "' . getSEOTitle($video['title']) . '", "thumbnailUrl" => array($img),
"description": "' . $description . '", "uploadDate" => date("Y-m-d\Th:i:s", strtotime($video['created'])),
"thumbnailUrl": [ "duration" => $duration,
"' . $img . '" "contentUrl" => Video::getLinkToVideo($videos_id, '', false, false),
], "embedUrl" => Video::getLinkToVideo($videos_id, '', true, false),
"uploadDate": "' . date("Y-m-d\Th:i:s", strtotime($video['created'])) . '", "interactionCount" => $video['views_count'],
"duration": "' . $duration . '", "@id" => Video::getPermaLink($videos_id),
"contentUrl": "' . Video::getLinkToVideo($videos_id, '', false, false) . '", "datePublished" => date("Y-m-d", strtotime($video['created'])),
"embedUrl": "' . Video::getLinkToVideo($videos_id, '', true, false) . '", "interactionStatistic" => array(
"interactionCount": "' . $video['views_count'] . '", array(
"@id": "' . Video::getPermaLink($videos_id) . '", "@type" => "InteractionCounter",
"datePublished": "' . date("Y-m-d", strtotime($video['created'])) . '", "interactionService" => array(
"interactionStatistic": [ "@type" => "WebSite",
{ "name" => str_replace('"', '', $config->getWebSiteTitle()),
"@type": "InteractionCounter", "@id" => $global['webSiteRootURL']
"interactionService": { ),
"@type": "WebSite", "interactionType" => "http://schema.org/LikeAction",
"name": "' . str_replace('"', '', $config->getWebSiteTitle()) . '", "userInteractionCount" => $video['views_count']
"@id": "' . $global['webSiteRootURL'] . '" ),
}, array(
"interactionType": "http://schema.org/LikeAction", "@type" => "InteractionCounter",
"userInteractionCount": "' . $video['views_count'] . '" "interactionType" => "http://schema.org/WatchAction",
}, "userInteractionCount" => $video['views_count']
{ )
"@type": "InteractionCounter", )
"interactionType": "http://schema.org/WatchAction", );
"userInteractionCount": "' . $video['views_count'] . '"
} $output = '<script type="application/ld+json" id="application_ld_json">';
] $output .= json_encode($data, JSON_UNESCAPED_SLASHES);
} $output .= '</script>';
</script>';
ObjectYPT::setCacheGlobal("getLdJson{$videos_id}", $output); ObjectYPT::setCacheGlobal("getLdJson{$videos_id}", $output);
echo $output; echo $output;
} }
@ -10847,7 +10847,7 @@ function getMP3ANDMP4DownloadLinksFromHLS($videos_id, $video_type)
if (!empty($videoHLSObj) && method_exists('VideoHLS', 'getMP3ANDMP4DownloadLinks')) { if (!empty($videoHLSObj) && method_exists('VideoHLS', 'getMP3ANDMP4DownloadLinks')) {
$downloadOptions = VideoHLS::getMP3ANDMP4DownloadLinks($videos_id); $downloadOptions = VideoHLS::getMP3ANDMP4DownloadLinks($videos_id);
} else { } else {
_error_log("getMP3ANDMP4DownloadLinksFromHLS($videos_id, $video_type): invalid plugin"); //_error_log("getMP3ANDMP4DownloadLinksFromHLS($videos_id, $video_type): invalid plugin");
} }
} else { } else {
_error_log("getMP3ANDMP4DownloadLinksFromHLS($videos_id, $video_type): invalid vidreo type"); _error_log("getMP3ANDMP4DownloadLinksFromHLS($videos_id, $video_type): invalid vidreo type");

View file

@ -545,7 +545,7 @@ if (!class_exists('Video')) {
if (empty($this->duration_in_seconds)) { if (empty($this->duration_in_seconds)) {
$this->duration_in_seconds = durationToSeconds($this->duration); $this->duration_in_seconds = durationToSeconds($this->duration);
} }
//var_dump($this->clean_title);exit;
if (!empty($this->id)) { if (!empty($this->id)) {
if (!$this->userCanManageVideo() && !$allowOfflineUser && !Permissions::canModerateVideos()) { if (!$this->userCanManageVideo() && !$allowOfflineUser && !Permissions::canModerateVideos()) {
forbiddenPage('Permission denied'); forbiddenPage('Permission denied');
@ -1428,7 +1428,6 @@ if (!class_exists('Video')) {
$sql .= AVideoPlugin::getVideoWhereClause(); $sql .= AVideoPlugin::getVideoWhereClause();
$sql .= "ORDER BY RAND() LIMIT {$limit}"; $sql .= "ORDER BY RAND() LIMIT {$limit}";
$res = sqlDAL::readSql($sql); $res = sqlDAL::readSql($sql);
$fullData = sqlDAL::fetchAllAssoc($res); $fullData = sqlDAL::fetchAllAssoc($res);
@ -2881,7 +2880,6 @@ if (!class_exists('Video')) {
public function setDescription($description) public function setDescription($description)
{ {
global $global, $advancedCustom; global $global, $advancedCustom;
if (empty($advancedCustom)) { if (empty($advancedCustom)) {
$advancedCustom = AVideoPlugin::getDataObject('CustomizeAdvanced'); $advancedCustom = AVideoPlugin::getDataObject('CustomizeAdvanced');
} }
@ -5185,7 +5183,7 @@ if (!class_exists('Video')) {
sqlDAL::close($res); sqlDAL::close($res);
if ($res !== false) { if ($res !== false) {
if ($videoRow !== false) { if (is_array($videoRow)) {
return $videoRow['clean_title']; return $videoRow['clean_title'];
} }
} else { } else {

View file

@ -166,6 +166,7 @@ if (Permissions::canAdminVideos()) {
$obj->setCreated($_REQUEST['created']); $obj->setCreated($_REQUEST['created']);
} }
} }
TimeLogEnd(__FILE__, __LINE__); TimeLogEnd(__FILE__, __LINE__);
$resp = $obj->save(true); $resp = $obj->save(true);
// if is a new embed video // if is a new embed video

View file

@ -583,7 +583,6 @@ class VideoStatistic extends ObjectYPT {
//_error_log("Delete Query: ".$sql); //_error_log("Delete Query: ".$sql);
return sqlDAL::writeSql($sql, "i", [$days]); return sqlDAL::writeSql($sql, "i", [$days]);
} }
_error_log("Id for table " . static::getTableName() . " not defined for deletion", AVideoLog::$ERROR);
return false; return false;
} }

View file

@ -396,6 +396,25 @@ class Cache extends PluginAbstract {
return CachesInDB::_deleteCacheStartingWith('firstPage'); return CachesInDB::_deleteCacheStartingWith('firstPage');
} }
public static function deleteOldCache($days, $limit = 5000) {
global $global;
$days = intval($days);
if (!empty($days)) {
$sql = "DELETE FROM CachesInDB ";
$sql .= " WHERE created < DATE_SUB(NOW(), INTERVAL ? DAY) ";
$sql .= " LIMIT $limit";
$global['lastQuery'] = $sql;
return sqlDAL::writeSql($sql, "i", [$days]);
}
return false;
}
function executeEveryMinute() {
global $global;
$global['systemRootPath'] . 'plugin/Cache/deleteStatistics.json.php';
self::deleteOldCache(1);
}
} }
function sanitize_output($buffer) { function sanitize_output($buffer) {

View file

@ -13,82 +13,170 @@ require_once $global['systemRootPath'] . 'plugin/CustomizeUser/Objects/Users_aff
class CustomizeUser extends PluginAbstract class CustomizeUser extends PluginAbstract
{ {
private static function _getSocialMedia() private static function _getSocialMedia()
{ {
return [ return [
'website' => [ 'website' => [
'class'=>'icoCopy', 'class' => 'icoCopy',
'icon' => 'fas fa-globe', 'icon' => 'fas fa-globe',
'label' => __("Website"), 'label' => __("Website"),
'placeholder' => __("Website URL"), 'placeholder' => __("Website URL"),
'isActive' => true, 'isActive' => true,
], ],
'youtube' => [
'class'=>'icoYoutube',
'icon' => 'fab fa-youtube',
'label' => __("Youtube"),
'placeholder' => __("Youtube URL"),
'isActive' => true,
],
'facebook' => [ 'facebook' => [
'class'=>'icoFacebook', 'class' => 'icoFacebook',
'icon' => 'fab fa-facebook-f', 'icon' => 'fab fa-facebook-f',
'label' => __("Facebook"), 'label' => __("Facebook"),
'placeholder' => __("Facebook URL"), 'placeholder' => __("Facebook URL"),
'isActive' => true, 'isActive' => true,
], ],
'twitter' => [ 'youtube' => [
'class'=>'icoTwitter', 'class' => 'icoYoutube',
'icon' => 'fab fa-twitter', 'icon' => 'fab fa-youtube',
'label' => __("Twitter"), 'label' => __("Youtube"),
'placeholder' => __("Twitter URL"), 'placeholder' => __("Youtube URL"),
'isActive' => true, 'isActive' => true,
], ],
'instagram' => [ 'instagram' => [
'class'=>'icoInstagram', 'class' => 'icoInstagram',
'icon' => 'fab fa-instagram', 'icon' => 'fab fa-instagram',
'label' => __("Instagram"), 'label' => __("Instagram"),
'placeholder' => __("Instagram URL"), 'placeholder' => __("Instagram URL"),
'isActive' => true, 'isActive' => true,
], ],
'spreaker' => [ /*
'class'=>'icoSpreaker', 'whatsapp' => [
'icon' => 'fas fa-heart', 'class' => 'icoWhatsapp',
'label' => __("Spreaker"), 'icon' => 'fab fa-whatsapp',
'placeholder' => __("Spreaker URL"), 'label' => __("Whatsapp"),
'placeholder' => __("Whatsapp URL"),
'isActive' => true,
],
*/
'twitter' => [
'class' => 'icoTwitter',
'icon' => 'fab fa-twitter',
'label' => __("Twitter"),
'placeholder' => __("Twitter URL"),
'isActive' => true, 'isActive' => true,
], ],
'linkedin' => [ 'linkedin' => [
'class'=>'icoLinkedIn', 'class' => 'icoLinkedIn',
'icon' => 'fab fa-linkedin-in', 'icon' => 'fab fa-linkedin-in',
'label' => __("LinkedIn"), 'label' => __("LinkedIn"),
'placeholder' => __("LinkedIn URL"), 'placeholder' => __("LinkedIn URL"),
'isActive' => true, 'isActive' => true,
], ],
'tiktok' => [ 'tiktok' => [
'class'=>'icoTikTok', 'class' => 'icoTikTok',
'icon' => 'fab fa-tiktok', 'icon' => 'fab fa-tiktok',
'label' => __("TikTok"), 'label' => __("TikTok"),
'placeholder' => __("TikTok URL"), 'placeholder' => __("TikTok URL"),
'isActive' => true, 'isActive' => true,
], ],
'patreon' => [
'class'=>'icoPatreon',
'icon' => 'fab fa-patreon',
'label' => __("Patreon"),
'placeholder' => __("Patreon URL"),
'isActive' => true,
],
'pinterest' => [ 'pinterest' => [
'class'=>'icoPinterest', 'class' => 'icoPinterest',
'icon' => 'fab fa-pinterest', 'icon' => 'fab fa-pinterest',
'label' => __("Pinterest"), 'label' => __("Pinterest"),
'placeholder' => __("Pinterest URL"), 'placeholder' => __("Pinterest URL"),
'isActive' => true, 'isActive' => true,
] ],
'reddit' => [
'class' => 'icoReddit',
'icon' => 'fab fa-reddit',
'label' => __("Reddit"),
'placeholder' => __("Reddit URL"),
'isActive' => true,
],
/*
'telegram' => [
'class' => 'icoTelegram',
'icon' => 'fab fa-telegram',
'label' => __("Telegram"),
'placeholder' => __("Telegram URL"),
'isActive' => true,
],
'google' => [
'class' => 'icoGoogle',
'icon' => 'fab fa-google',
'label' => __("Google"),
'placeholder' => __("Google URL"),
'isActive' => true,
],
*/
'vimeo' => [
'class' => 'icoVimeo',
'icon' => 'fab fa-vimeo',
'label' => __("Vimeo"),
'placeholder' => __("Vimeo URL"),
'isActive' => true,
],
'tumblr' => [
'class' => 'icoTumblr',
'icon' => 'fab fa-tumblr',
'label' => __("Tumblr"),
'placeholder' => __("Tumblr URL"),
'isActive' => true,
],
'spreaker' => [
'class' => 'icoSpreaker',
'icon' => 'fas fa-heart',
'label' => __("Spreaker"),
'placeholder' => __("Spreaker URL"),
'isActive' => true,
],
/*
'rss' => [
'class' => 'icoRss',
'icon' => 'fas fa-rss',
'label' => __("RSS"),
'placeholder' => __("RSS URL"),
'isActive' => true,
],
'gab' => [
'class' => 'icoGab',
'icon' => 'fab fa-gab',
'label' => __("Gab"),
'placeholder' => __("Gab URL"),
'isActive' => true,
],
*/
'clouthub' => [
'class' => 'icoCloutHub',
'icon' => 'fas fa-cloud',
'label' => __("CloutHub"),
'placeholder' => __("CloutHub URL"),
'isActive' => true,
],
'pinboard' => [
'class' => 'icoPinboard',
'icon' => 'fas fa-thumbtack',
'label' => __("Pinboard"),
'placeholder' => __("Pinboard URL"),
'isActive' => true,
],
'apple' => [
'class' => 'icoApple',
'icon' => 'fab fa-apple',
'label' => __("Apple"),
'placeholder' => __("Apple URL"),
],
'imdb' => [
'class' => 'icoIMDB',
'icon' => 'fab fa-imdb',
'label' => __("IMDB"),
'placeholder' => __("IMDB URL"),
],
'podcast' => [
'class' => 'icoPodcast',
'icon' => 'fas fa-podcast',
'label' => __("Podcast"),
'placeholder' => __("Podcast URL"),
],
]; ];
} }
public static function getSocialMedia() public static function getSocialMedia()
{ {
$obj = AVideoPlugin::getDataObject('CustomizeUser'); $obj = AVideoPlugin::getDataObject('CustomizeUser');
@ -281,16 +369,18 @@ class CustomizeUser extends PluginAbstract
return $obj; return $obj;
} }
function onUserSocketConnect() { function onUserSocketConnect()
{
global $global; global $global;
echo file_get_contents($global['systemRootPath'] . 'plugin/CustomizeUser/onUserSocketConnect.js'); echo file_get_contents($global['systemRootPath'] . 'plugin/CustomizeUser/onUserSocketConnect.js');
} }
function onUserSocketDisconnect() { function onUserSocketDisconnect()
{
global $global; global $global;
echo file_get_contents($global['systemRootPath'] . 'plugin/CustomizeUser/onUserSocketDisconnect.js'); echo file_get_contents($global['systemRootPath'] . 'plugin/CustomizeUser/onUserSocketDisconnect.js');
} }
static function getCallerButton($users_id, $class = '') static function getCallerButton($users_id, $class = '')
{ {
global $global; global $global;
@ -569,7 +659,7 @@ class CustomizeUser extends PluginAbstract
//_error_log("CustomizeUser::getModeYouTube this video is embed and whitelisted, we will by pass the security check"); //_error_log("CustomizeUser::getModeYouTube this video is embed and whitelisted, we will by pass the security check");
return true; return true;
} else { } else {
_error_log("CustomizeUser::getModeYouTube this video is NOT whitelisted, [".(@$_SERVER['HTTP_REFERER'])."]"); _error_log("CustomizeUser::getModeYouTube this video is NOT whitelisted, [" . (@$_SERVER['HTTP_REFERER']) . "]");
} }
} }
$cansee = User::canWatchVideoWithAds($videos_id); $cansee = User::canWatchVideoWithAds($videos_id);

133
plugin/Layout/buy.php Normal file
View file

@ -0,0 +1,133 @@
<?php
require_once dirname(__FILE__) . '/../../videos/configuration.php';
$videos_id = getVideos_id();
if (empty($videos_id)) {
forbiddenPage('videos_id is required');
}
$video = new Video('', '', $videos_id);
$users_id = $video->getUsers_id();
if (User::isLogged()) {
$response = $video->whyUserCannotWatchVideo(User::getId(), $videos_id);
if ($response->canWatch) {
header('Location: ' . Video::getURL($videos_id));
exit;
}
}
$title = array('Buy');
$title[] = $video->getTitle();
$nameId = User::getNameIdentificationById($users_id);
$poster = Video::getPoster($videos_id);
//User::getChannelLink()
$_page = new Page($title);
/*
$_page->setInlineStyles("body {
background-image: url('{$poster}');
background-size: cover;
background-repeat: no-repeat;
background-attachment: fixed;
background-position: center center;
}");
// FansSubscriptions
$name = 'FansSubscriptions';
if ($p = AVideoPlugin::loadPluginIfEnabled($name)) {
$obj = $p->getDataObject();
if (FansSubscriptions::isFansOnly($videos_id)) {
}
}
*/
// PayPerView
$name = 'PayPerView';
if ($p = AVideoPlugin::loadPluginIfEnabled($name)) {
$obj = $p->getDataObject();
$isVideoPPV = PayPerView::isVideoPayPerView($videos_id);
if ($isVideoPPV) {
$ppvplans = PayPerView::getAllPlansFromVideo($videos_id);
}
}
// Subscription
$name = 'Subscription';
if ($p = AVideoPlugin::loadPluginIfEnabled($name)) {
$subplans = $p->getPlansFromVideo($videos_id);
}
?>
<div class="container">
<div class="panel panel-default">
<div class="panel-heading clearfix">
<img src="<?php echo $poster; ?>" class="img img-responsive img-rounded pull-left" style="margin-right: 10px;" />
<div class="panel-title pull-left">
<h2>
<?php
echo $video->getTitle();
?>
</h2>
<br>
<a href="<?php echo User::getChannelLink($users_id); ?>" class="cleaarfix" data-toggle="tooltip" title="<?php echo $nameId; ?>">
<img src="<?php echo User::getPhoto($users_id); ?>" class="img img-responsive img-rounded pull-left channelPhoto" />
<?php echo $nameId; ?>
</a>
</div>
</div>
<div class="panel-body">
<div class="row">
<!-- Gift Options -->
<div class="col-md-4">
<div class="panel panel-warning">
<div class="panel-heading">
<h3 class="panel-title">Gift Options</h3>
</div>
<div class="panel-body">
<ul>
<li>Gift Option 1</li>
<li>Gift Option 2</li>
<li>Gift Option 3</li>
<!-- Add more gift options as needed -->
</ul>
</div>
</div>
</div>
<!-- PPV Plans -->
<div class="col-md-4">
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">PPV Plans</h3>
</div>
<div class="panel-body">
<ul>
<li>PPV Plan 1</li>
<li>PPV Plan 2</li>
<li>PPV Plan 3</li>
<!-- Add more plans as needed -->
</ul>
</div>
</div>
</div>
<!-- Subscription Plans -->
<div class="col-md-4">
<div class="panel panel-success">
<div class="panel-heading">
<h3 class="panel-title">Subscription Plans</h3>
</div>
<div class="panel-body">
<ul>
<li>Subscription Plan 1</li>
<li>Subscription Plan 2</li>
<li>Subscription Plan 3</li>
<!-- Add more plans as needed -->
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
<?php
$_page->print();
?>

View file

@ -25,10 +25,10 @@ class PlayerSkins extends PluginAbstract {
$names[] = $path_parts['filename']; $names[] = $path_parts['filename'];
} }
$desc .= $desc . "<code>" . implode("</code> or <code>", $names) . "</code>"; $desc .= $desc . "<code>" . implode("</code> or <code>", $names) . "</code>";
$dir = $global['systemRootPath'] . 'plugin/PlayerSkins/epg.php'; $dir = $global['systemRootPath'] . 'plugin/PlayerSkins/epg.php';
$desc .= "<br>crontab for auto generate cache for EPG links <code>0 * * * * php {$dir}</code>"; $desc .= "<br>crontab for auto generate cache for EPG links <code>0 * * * * php {$dir}</code>";
return $desc; return $desc;
} }
@ -70,13 +70,14 @@ class PlayerSkins extends PluginAbstract {
$obj->contextMenuShare = true; $obj->contextMenuShare = true;
$obj->playerFullHeight = false; $obj->playerFullHeight = false;
$obj->playsinline = true; $obj->playsinline = true;
$obj->showVideoSEOViewForBots = true;
return $obj; return $obj;
} }
static function getPlaysinline(){ static function getPlaysinline() {
$obj = AVideoPlugin::getObjectData('PlayerSkins'); $obj = AVideoPlugin::getObjectData('PlayerSkins');
if($obj->playsinline){ if ($obj->playsinline) {
return ' playsinline webkit-playsinline="webkit-playsinline" '; return ' playsinline webkit-playsinline="webkit-playsinline" ';
} }
return ''; return '';
@ -103,7 +104,7 @@ class PlayerSkins extends PluginAbstract {
} }
$images = Video::getImageFromFilename($filename); $images = Video::getImageFromFilename($filename);
if ($vType == 'video') { if ($vType == 'video') {
$htmlMediaTag = '<video '.self::getPlaysinline() $htmlMediaTag = '<video ' . self::getPlaysinline()
. 'preload="auto" poster="' . $images->poster . '" controls . 'preload="auto" poster="' . $images->poster . '" controls
class="embed-responsive-item video-js vjs-default-skin vjs-big-play-centered vjs-16-9" id="mainVideo">'; class="embed-responsive-item video-js vjs-default-skin vjs-big-play-centered vjs-16-9" id="mainVideo">';
if ($video['type'] == "video") { if ($video['type'] == "video") {
@ -130,7 +131,7 @@ class PlayerSkins extends PluginAbstract {
*/ */
$htmlMediaTag .= '<p>' . __("If you can't view this video, your browser does not support HTML5 videos") . '</p><p class="vjs-no-js">' . __("To view this video please enable JavaScript, and consider upgrading to a web browser that") . '<a href="http://videojs.com/html5-video-support/" target="_blank" rel="noopener noreferrer">supports HTML5 video</a></p></video>'; $htmlMediaTag .= '<p>' . __("If you can't view this video, your browser does not support HTML5 videos") . '</p><p class="vjs-no-js">' . __("To view this video please enable JavaScript, and consider upgrading to a web browser that") . '<a href="http://videojs.com/html5-video-support/" target="_blank" rel="noopener noreferrer">supports HTML5 video</a></p></video>';
} else if ($vType == 'audio') { } else if ($vType == 'audio') {
$htmlMediaTag = '<audio '.self::getPlaysinline().' $htmlMediaTag = '<audio ' . self::getPlaysinline() . '
preload="auto" preload="auto"
poster="' . $images->poster . '" controls class="embed-responsive-item video-js vjs-default-skin vjs-16-9 vjs-big-play-centered" id="mainVideo">'; poster="' . $images->poster . '" controls class="embed-responsive-item video-js vjs-default-skin vjs-16-9 vjs-big-play-centered" id="mainVideo">';
if ($video['type'] == "audio" || Video::forceAudio()) { if ($video['type'] == "audio" || Video::forceAudio()) {
@ -152,14 +153,12 @@ class PlayerSkins extends PluginAbstract {
} }
$_GET['isEmbedded'] = ""; $_GET['isEmbedded'] = "";
if ( if (
($disableYoutubeIntegration) ($disableYoutubeIntegration) ||
|| (
( (strpos($video['videoLink'], "youtu.be") == false) && (strpos($video['videoLink'], "youtube.com") == false)
(strpos($video['videoLink'], "youtu.be") == false)
&& (strpos($video['videoLink'], "youtube.com") == false)
//&& (strpos($video['videoLink'], "vimeo.com") == false) //&& (strpos($video['videoLink'], "vimeo.com") == false)
) )
) { ) {
$_GET['isEmbedded'] = "e"; $_GET['isEmbedded'] = "e";
$isVideoTypeEmbed = 1; $isVideoTypeEmbed = 1;
$url = parseVideos($video['videoLink']); $url = parseVideos($video['videoLink']);
@ -167,9 +166,9 @@ class PlayerSkins extends PluginAbstract {
$url = addQueryStringParameter($url, 'autoplay', 1); $url = addQueryStringParameter($url, 'autoplay', 1);
} }
$htmlMediaTag = "<!-- Embed Link 1 {$video['title']} {$video['filename']} -->"; $htmlMediaTag = "<!-- Embed Link 1 {$video['title']} {$video['filename']} -->";
$htmlMediaTag .= '<video '.self::getPlaysinline().' id="mainVideo" style="display: none; height: 0;width: 0;" ></video>'; $htmlMediaTag .= '<video ' . self::getPlaysinline() . ' id="mainVideo" style="display: none; height: 0;width: 0;" ></video>';
//$htmlMediaTag .= '<div id="main-video" class="embed-responsive-item">'; //$htmlMediaTag .= '<div id="main-video" class="embed-responsive-item">';
$htmlMediaTag .= '<iframe class="embed-responsive-item" scrolling="no" '.Video::$iframeAllowAttributes.' src="' . $url . '"></iframe>'; $htmlMediaTag .= '<iframe class="embed-responsive-item" scrolling="no" ' . Video::$iframeAllowAttributes . ' src="' . $url . '"></iframe>';
//$htmlMediaTag .= '</div>'; //$htmlMediaTag .= '</div>';
} else { } else {
// youtube! // youtube!
@ -181,7 +180,7 @@ class PlayerSkins extends PluginAbstract {
$_GET['isMediaPlaySite'] = $video['id']; $_GET['isMediaPlaySite'] = $video['id'];
PlayerSkins::playerJSCodeOnLoad($video['id'], @$video['url']); PlayerSkins::playerJSCodeOnLoad($video['id'], @$video['url']);
$htmlMediaTag = "<!-- Embed Link 2 YoutubeIntegration {$video['title']} {$video['filename']} -->"; $htmlMediaTag = "<!-- Embed Link 2 YoutubeIntegration {$video['title']} {$video['filename']} -->";
$htmlMediaTag .= '<video '.self::getPlaysinline().' id="mainVideo" class="embed-responsive-item video-js vjs-default-skin vjs-16-9 vjs-big-play-centered" controls></video>'; $htmlMediaTag .= '<video ' . self::getPlaysinline() . ' id="mainVideo" class="embed-responsive-item video-js vjs-default-skin vjs-16-9 vjs-big-play-centered" controls></video>';
$htmlMediaTag .= '<script>var player;mediaId = ' . $video['id'] . ';$(document).ready(function () {$(".vjs-control-bar").css("opacity: 1; visibility: visible;");});</script>'; $htmlMediaTag .= '<script>var player;mediaId = ' . $video['id'] . ';$(document).ready(function () {$(".vjs-control-bar").css("opacity: 1; visibility: visible;");});</script>';
} }
} else if ($vType == 'serie') { } else if ($vType == 'serie') {
@ -192,38 +191,38 @@ class PlayerSkins extends PluginAbstract {
$link = addQueryStringParameter($link, 'playlist_index', @$_REQUEST['playlist_index']); $link = addQueryStringParameter($link, 'playlist_index', @$_REQUEST['playlist_index']);
$htmlMediaTag = "<!-- Serie {$video['title']} {$video['filename']} -->"; $htmlMediaTag = "<!-- Serie {$video['title']} {$video['filename']} -->";
$htmlMediaTag .= '<video '.self::getPlaysinline().' id="mainVideo" style="display: none; height: 0;width: 0;" ></video>'; $htmlMediaTag .= '<video ' . self::getPlaysinline() . ' id="mainVideo" style="display: none; height: 0;width: 0;" ></video>';
$htmlMediaTag .= '<iframe class="embed-responsive-item" scrolling="no" '.Video::$iframeAllowAttributes.' src="' . $link . '"></iframe>'; $htmlMediaTag .= '<iframe class="embed-responsive-item" scrolling="no" ' . Video::$iframeAllowAttributes . ' src="' . $link . '"></iframe>';
$htmlMediaTag .= '<script>$(document).ready(function () {addView(' . intval($video['id']) . ', 0);});</script>'; $htmlMediaTag .= '<script>$(document).ready(function () {addView(' . intval($video['id']) . ', 0);});</script>';
} }
$html .= "<script>mediaId = '{$video['id']}';var player;" . self::playerJSCodeOnLoad($video['id'], @$autoPlayURL) . '</script>'; $html .= "<script>mediaId = '{$video['id']}';var player;" . self::playerJSCodeOnLoad($video['id'], @$autoPlayURL) . '</script>';
} }
/* /*
$col1Classes = 'col-md-2 firstC'; $col1Classes = 'col-md-2 firstC';
$col2Classes = 'col-md-8 secC'; $col2Classes = 'col-md-8 secC';
$col3Classes = 'col-md-2 thirdC'; $col3Classes = 'col-md-2 thirdC';
if ($obj->playerFullHeight) { if ($obj->playerFullHeight) {
$col2Classes .= ' text-center playerFullHeight'; $col2Classes .= ' text-center playerFullHeight';
} }
$html .= ' $html .= '
<div class="row main-video" id="mvideo"> <div class="row main-video" id="mvideo">
<div class="' . $col1Classes . '"></div> <div class="' . $col1Classes . '"></div>
<div class="' . $col2Classes . '"> <div class="' . $col2Classes . '">
<div id="videoContainer"> <div id="videoContainer">
<div id="floatButtons" style="display: none;"> <div id="floatButtons" style="display: none;">
<p class="btn btn-outline btn-xs move"> <p class="btn btn-outline btn-xs move">
<i class="fas fa-expand-arrows-alt"></i> <i class="fas fa-expand-arrows-alt"></i>
</p> </p>
<button type="button" class="btn btn-outline btn-xs" <button type="button" class="btn btn-outline btn-xs"
onclick="closeFloatVideo(); floatClosed = 1;"> onclick="closeFloatVideo(); floatClosed = 1;">
<i class="fas fa-times"></i> <i class="fas fa-times"></i>
</button> </button>
</div> </div>
<div id="main-video" class="embed-responsive embed-responsive-16by9">' . $htmlMediaTag . '</div>'; <div id="main-video" class="embed-responsive embed-responsive-16by9">' . $htmlMediaTag . '</div>';
*/ */
//$html .= showCloseButton() . '</div></div><div class="' . $col3Classes . '"></div></div>'; //$html .= showCloseButton() . '</div></div><div class="' . $col3Classes . '"></div></div>';
$html .= getMVideo($htmlMediaTag); $html .= getMVideo($htmlMediaTag);
@ -305,11 +304,24 @@ class PlayerSkins extends PluginAbstract {
return $js . $css . $oembed; return $js . $css . $oembed;
} }
static function showAutoplay(){ static function showAutoplay() {
$obj = AVideoPlugin::getDataObject('PlayerSkins'); $obj = AVideoPlugin::getDataObject('PlayerSkins');
return !isLive() && $obj->showShareAutoplay && isVideoPlayerHasProgressBar() && empty($obj->forceAlwaysAutoplay) && empty($_REQUEST['hideAutoplaySwitch']); return !isLive() && $obj->showShareAutoplay && isVideoPlayerHasProgressBar() && empty($obj->forceAlwaysAutoplay) && empty($_REQUEST['hideAutoplaySwitch']);
} }
public function getStart() {
global $global;
/*
if (!isBot()) {
$obj = AVideoPlugin::getObjectData('PlayerSkins');
if ($obj->showVideoSEOViewForBots) {
include "{$global['systemRootPath']}plugin/PlayerSkins/seo.php";
}
}
*
*/
}
public function getFooterCode() { public function getFooterCode() {
if (isWebRTC()) { if (isWebRTC()) {
return ''; return '';
@ -318,10 +330,10 @@ class PlayerSkins extends PluginAbstract {
$js = "<!-- playerSkin -->"; $js = "<!-- playerSkin -->";
$obj = $this->getDataObject(); $obj = $this->getDataObject();
if ( if (
!empty($_GET['videoName']) || !empty($_GET['videoName']) ||
!empty($_GET['u']) || !empty($_GET['u']) ||
!empty($_GET['evideo']) || !empty($_GET['evideo']) ||
!empty($_GET['playlists_id']) || !empty($_GET['playlists_id']) ||
(is_array($video) && !empty($video['id']))) { (is_array($video) && !empty($video['id']))) {
if (empty($obj->showLoopButton) && empty($obj->contextMenuLoop)) { if (empty($obj->showLoopButton) && empty($obj->contextMenuLoop)) {
$js .= "<script>setPlayerLoop(false);</script>"; $js .= "<script>setPlayerLoop(false);</script>";
@ -333,7 +345,7 @@ class PlayerSkins extends PluginAbstract {
PlayerSkins::getStartPlayerJS(file_get_contents("{$global['systemRootPath']}plugin/PlayerSkins/logo.js")); PlayerSkins::getStartPlayerJS(file_get_contents("{$global['systemRootPath']}plugin/PlayerSkins/logo.js"));
//$js .= "<script src=\"".getCDN()."plugin/PlayerSkins/logo.js\"></script>"; //$js .= "<script src=\"".getCDN()."plugin/PlayerSkins/logo.js\"></script>";
} }
if($obj->showPictureInPicture){ if ($obj->showPictureInPicture) {
PlayerSkins::getStartPlayerJS(file_get_contents("{$global['systemRootPath']}plugin/PlayerSkins/pipButton.js")); PlayerSkins::getStartPlayerJS(file_get_contents("{$global['systemRootPath']}plugin/PlayerSkins/pipButton.js"));
} }
if ($obj->showShareSocial && CustomizeUser::canShareVideosFromVideo(@$video['id'])) { if ($obj->showShareSocial && CustomizeUser::canShareVideosFromVideo(@$video['id'])) {
@ -363,8 +375,8 @@ class PlayerSkins extends PluginAbstract {
} }
} }
$videos_id = getVideos_id(); $videos_id = getVideos_id();
$event = "updateMediaSessionMetadata();"; $event = "updateMediaSessionMetadata();";
PlayerSkins::getStartPlayerJS($event); PlayerSkins::getStartPlayerJS($event);
if (!empty($videos_id) && Video::getEPG($videos_id)) { if (!empty($videos_id) && Video::getEPG($videos_id)) {
PlayerSkins::getStartPlayerJS(file_get_contents("{$global['systemRootPath']}plugin/PlayerSkins/epgButton.js")); PlayerSkins::getStartPlayerJS(file_get_contents("{$global['systemRootPath']}plugin/PlayerSkins/epgButton.js"));
@ -374,9 +386,9 @@ class PlayerSkins extends PluginAbstract {
$videos_id = getVideos_id(); $videos_id = getVideos_id();
$video = Video::getVideoLight($videos_id); $video = Video::getVideoLight($videos_id);
$spectrumSource = Video::getSourceFile($video['filename'], "_spectrum.jpg"); $spectrumSource = Video::getSourceFile($video['filename'], "_spectrum.jpg");
if(empty($spectrumSource["path"])){ if (empty($spectrumSource["path"])) {
if(AVideoPlugin::isEnabledByName('MP4ThumbsAndGif') && method_exists('MP4ThumbsAndGif', 'getSpectrum')){ if (AVideoPlugin::isEnabledByName('MP4ThumbsAndGif') && method_exists('MP4ThumbsAndGif', 'getSpectrum')) {
if(MP4ThumbsAndGif::getSpectrum($videos_id)){ if (MP4ThumbsAndGif::getSpectrum($videos_id)) {
$spectrumSource = Video::getSourceFile($video['filename'], "_spectrum.jpg"); $spectrumSource = Video::getSourceFile($video['filename'], "_spectrum.jpg");
} }
} }
@ -424,7 +436,7 @@ class PlayerSkins extends PluginAbstract {
$dataSetup[] = "vimeo:{customVars: {wmode: \"transparent\", origin: \"{$global['webSiteRootURL']}\"}}"; $dataSetup[] = "vimeo:{customVars: {wmode: \"transparent\", origin: \"{$global['webSiteRootURL']}\"}}";
} }
} }
if(!$obj->showPictureInPicture){ if (!$obj->showPictureInPicture) {
$dataSetup[] = "controlBar: {pictureInPictureToggle: false}"; $dataSetup[] = "controlBar: {pictureInPictureToggle: false}";
} }
@ -549,7 +561,7 @@ class PlayerSkins extends PluginAbstract {
});player.one(startEvent, function () {player.ima.initializeAdDisplayContainer();});"; });player.one(startEvent, function () {player.ima.initializeAdDisplayContainer();});";
} }
$js .= "}"; $js .= "}";
$js .= "if(typeof player !== 'undefined'){"; $js .= "if(typeof player !== 'undefined'){";
$js .= "player.ready(function () {console.log('player.ready');"; $js .= "player.ready(function () {console.log('player.ready');";
$js .= "player.on('error', () => {AvideoJSError(player.error().code);});"; $js .= "player.on('error', () => {AvideoJSError(player.error().code);});";
@ -573,22 +585,22 @@ class PlayerSkins extends PluginAbstract {
}} catch (e) { }} catch (e) {
console.error('error-display', e); console.error('error-display', e);
};"; };";
$js .= "try {"; $js .= "try {";
$js .= implode(' } catch (e) {console.error(\'onPlayerReady\', e);};try { ', $prepareStartPlayerJS_onPlayerReady).";"; $js .= implode(' } catch (e) {console.error(\'onPlayerReady\', e);};try { ', $prepareStartPlayerJS_onPlayerReady) . ";";
$js .= " } catch (e) {console.error('onPlayerReady', e);}"; $js .= " } catch (e) {console.error('onPlayerReady', e);}";
$js .= $play; $js .= $play;
$js .= "});"; $js .= "});";
if ($obj->showLoopButton && isVideoPlayerHasProgressBar()) { if ($obj->showLoopButton && isVideoPlayerHasProgressBar()) {
$js .= file_get_contents($global['systemRootPath'] . 'plugin/PlayerSkins/loopbutton.js'); $js .= file_get_contents($global['systemRootPath'] . 'plugin/PlayerSkins/loopbutton.js');
} }
$js .= file_get_contents($global['systemRootPath'] . 'plugin/PlayerSkins/fixCurrentSources.js'); $js .= file_get_contents($global['systemRootPath'] . 'plugin/PlayerSkins/fixCurrentSources.js');
$js .= "}"; $js .= "}";
if (empty($noReadyFunction)) { if (empty($noReadyFunction)) {
$js .= "});"; $js .= "});";
} }
//var_dump('getStartPlayerJSWasRequested', debug_backtrace()); //var_dump('getStartPlayerJSWasRequested', debug_backtrace());
$getStartPlayerJSWasRequested = true; $getStartPlayerJSWasRequested = true;
return $js; return $js;
@ -602,7 +614,7 @@ class PlayerSkins extends PluginAbstract {
$videos_id = getVideos_id(); $videos_id = getVideos_id();
if (!empty($videos_id)) { if (!empty($videos_id)) {
$video = Video::getVideoLight($videos_id); $video = Video::getVideoLight($videos_id);
if(!empty($video)){ if (!empty($video)) {
$progress = Video::getVideoPogressPercent($videos_id); $progress = Video::getVideoPogressPercent($videos_id);
if (!empty($progress) && !empty($progress['lastVideoTime'])) { if (!empty($progress) && !empty($progress['lastVideoTime'])) {
$currentTime = intval($progress['lastVideoTime']); $currentTime = intval($progress['lastVideoTime']);
@ -618,7 +630,7 @@ class PlayerSkins extends PluginAbstract {
if ($maxCurrentTime <= $currentTime + 5) { if ($maxCurrentTime <= $currentTime + 5) {
$currentTime = 0; $currentTime = 0;
} }
}else{ } else {
return 0; return 0;
} }
} }
@ -806,14 +818,12 @@ class PlayerSkins extends PluginAbstract {
PlayerSkins::getStartPlayerJS($onPlayerReady); PlayerSkins::getStartPlayerJS($onPlayerReady);
} }
} }
public function getWatchActionButton($videos_id) { public function getWatchActionButton($videos_id) {
global $global, $video; global $global, $video;
include $global['systemRootPath'] . 'plugin/PlayerSkins/actionButton.php'; include $global['systemRootPath'] . 'plugin/PlayerSkins/actionButton.php';
} }
public function getGalleryActionButton($videos_id) { public function getGalleryActionButton($videos_id) {
global $global; global $global;
include $global['systemRootPath'] . 'plugin/PlayerSkins/actionButtonGallery.php'; include $global['systemRootPath'] . 'plugin/PlayerSkins/actionButtonGallery.php';

View file

@ -0,0 +1,75 @@
<?php
global $advancedCustom, $config;
if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php';
}
$videos_id = getVideos_id();
if (empty($videos_id)) {
return '';
}
$video = new Video('', '', $videos_id);
$keywords = strip_tags($advancedCustom->keywords);
$relatedVideos = Video::getRelatedMovies($videos_id);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="device_id" content="<?php echo getDeviceID(); ?>">
<meta name="keywords" content=<?php printJSString($keywords); ?>>
<link rel="manifest" href="<?php echo $global['webSiteRootURL']; ?>manifest.json">
<link rel="apple-touch-icon" sizes="180x180" href="<?php echo $config->getFavicon(true); ?>">
<link rel="icon" type="image/png" href="<?php echo $config->getFavicon(true); ?>">
<link rel="shortcut icon" href="<?php echo $config->getFavicon(); ?>" sizes="16x16,24x24,32x32,48x48,144x144">
<meta name="msapplication-TileImage" content="<?php echo $config->getFavicon(true); ?>">
<meta name="robots" content="index, follow" />
<?php
getOpenGraph($videos_id);
?>
<title><?php echo htmlentities($video->getTitle()); ?></title>
</head>
<body>
<section>
<h1><?php echo $video->getTitle(); ?></h1>
<video controls poster="<?php echo Video::getPoster($video->getId()); ?>">
<?php
echo getSources($video->getFilename());
?>
Your browser does not support the video tag.
</video>
<p><?php echo $video->getDescription(); ?></p>
<?php
getLdJson($videos_id);
getItemprop($videos_id);
?>
</section>
<section>
<h2><?php echo __('Related Videos'); ?></h2>
<?php
foreach ($relatedVideos as $key => $value) {
?>
<article>
<h3>
<a href="<?php echo Video::getURL($value['id']); ?>" title="<?php echo $value['title']; ?>">
<?php echo $value['title']; ?>
</a>
</h3>
<?php
getLdJson($value['id']);
getItemprop($value['id']);
?>
</article>
<?php
}
?>
</section>
</body>
</html>
<?php
exit;
?>

View file

@ -70,16 +70,26 @@ ul.social-network li {
background-color: #F16E28; background-color: #F16E28;
} }
.social-network a.icoYoutube:hover { .social-network a.icoYoutube:hover {
background-color: #FF0000; /* YouTube's primary color */ background-color: #FF0000;
} }
.social-network a.icoTikTok:hover { .social-network a.icoTikTok:hover {
background-color: #000000; /* TikTok's primary color is black, but sometimes it's represented with a lighter shade or with the blue from its logo */ background-color: #000000; /* TikTok's primary color is black, but sometimes it's represented with a lighter shade or with the blue from its logo */
} }
.social-network a.icoPatreon:hover { .social-network a.icoPatreon:hover {
background-color: #F96854; /* Patreon's primary color */ background-color: #F96854; /* Patreon's primary color */
} }
.social-network a.icoCopy:hover { /* for Website */
background-color: #333; /* Using a neutral color since "Website" doesn't have a specific brand color */
}
.social-network a.icoApple:hover {
background-color: #A3AAAE; /* A neutral Apple gray; Apple often uses white, black, or gray for branding */
}
.social-network a.icoPodcast:hover {
background-color: #FF2D55; /* Using the Apple Podcast color as it's a commonly recognized color for podcasts */
}
.social-network a.icoIMDB:hover {
background-color: #E6B91E; /* IMDB's golden yellow color */
}
.social-network a.icoRss:hover i, .social-network a.icoRss:hover i,

View file

@ -99,6 +99,7 @@ if (!isBot()) {
<link href="<?php echo getURL('node_modules/jquery-ui-dist/jquery-ui.min.css'); ?>" rel="stylesheet" type="text/css" media="print" onload="this.media = 'all'" /> <link href="<?php echo getURL('node_modules/jquery-ui-dist/jquery-ui.min.css'); ?>" rel="stylesheet" type="text/css" media="print" onload="this.media = 'all'" />
<link href="<?php echo getURL('view/css/flagstrap/css/flags.css'); ?>" rel="stylesheet" type="text/css" media="print" onload="this.media = 'all'" /> <link href="<?php echo getURL('view/css/flagstrap/css/flags.css'); ?>" rel="stylesheet" type="text/css" media="print" onload="this.media = 'all'" />
<link href="<?php echo getURL('view/css/social.css'); ?>" rel="stylesheet" type="text/css"/> <link href="<?php echo getURL('view/css/social.css'); ?>" rel="stylesheet" type="text/css"/>
<script src="<?php echo getURL('locale/function.js.php'); ?>&lang=<?php echo revertLangString(getLanguage()); ?>"></script>
<?php <?php
} }
if (!isVideo()) { if (!isVideo()) {

View file

@ -227,7 +227,7 @@ getCSSAnimationClassAndStyleAddWait(0.5);
if ($(this).attr('type') === 'checkbox') { if ($(this).attr('type') === 'checkbox') {
if (!$(this).is(':checked')) { if (!$(this).is(':checked')) {
$(this).closest('.input-group').addClass(errorClass); $(this).closest('.input-group').addClass(errorClass);
errorFound = 'Confirmation Required'; errorFound = __('Confirmation Required');
return false; return false;
} }
} else { } else {
@ -238,7 +238,7 @@ getCSSAnimationClassAndStyleAddWait(0.5);
if (!label) { if (!label) {
label = $(this).attr('name'); label = $(this).attr('name');
} }
errorFound = label + ' is required'; errorFound = label + ' ' + __('is required');
return false; return false;
} }
} }
@ -253,23 +253,23 @@ getCSSAnimationClassAndStyleAddWait(0.5);
// Password doesn't match // Password doesn't match
if (!$('#inputPassword').val().match(/[0-9a-z]+/i)) { if (!$('#inputPassword').val().match(/[0-9a-z]+/i)) {
$('#inputPassword').closest('.input-group').addClass(errorClass); $('#inputPassword').closest('.input-group').addClass(errorClass);
avideoAlertError("<?php echo __("Your password cannot be blank"); ?>"); avideoAlertError(__("Your password cannot be blank"));
return false; return false;
} }
if (!checkIfPasswordsMatch()) { if (!checkIfPasswordsMatch()) {
avideoAlertError("<?php echo __("Your password does not match!"); ?>"); avideoAlertError(__("Your password does not match!"));
return false; return false;
} }
if ($('#inputEmail').is(":visible") && !isEmailValid($('#inputEmail').val())) { if ($('#inputEmail').is(":visible") && !isEmailValid($('#inputEmail').val())) {
if (!isEmailValid($('#inputUser').val())) { if (!isEmailValid($('#inputUser').val())) {
$('#inputEmail').closest('.input-group').addClass(errorClass); $('#inputEmail').closest('.input-group').addClass(errorClass);
avideoAlertError("<?php echo __("You must specify a valid email"); ?>"); avideoAlertError(__("You must specify a valid email"));
return false; return false;
} }
} }
if (!$('#inputUser').val().match(/^[0-9a-z@._-]{3,}$/i) && !isEmailValid($('#inputUser').val())) { if (!$('#inputUser').val().match(/^[0-9a-z@._-]{3,}$/i) && !isEmailValid($('#inputUser').val())) {
$('#inputUser').closest('.input-group').addClass(errorClass); $('#inputUser').closest('.input-group').addClass(errorClass);
avideoAlertError("<?php echo __("Invalid user"); ?>"); avideoAlertError(__("Invalid user"));
return false; return false;
} }

View file

@ -30,7 +30,7 @@ $video['filename'] = '';
<html lang="<?php echo getLanguage(); ?>"> <html lang="<?php echo getLanguage(); ?>">
<head> <head>
<title><?php echo __('Video Not Found'); ?></title> <title><?php echo __('Video Not Found'); ?></title>
<link href="<?php echo getCDN(); ?>plugin/Gallery/style.css" rel="stylesheet" type="text/css"/> <link href="<?php echo getURL('plugin/Gallery/style.css'); ?>" rel="stylesheet" type="text/css"/>
<?php <?php
include $global['systemRootPath'] . 'view/include/head.php'; include $global['systemRootPath'] . 'view/include/head.php';
?> ?>