mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 01:39:24 +02:00
Update
This commit is contained in:
parent
c7c12525ea
commit
00f383eb49
16 changed files with 534 additions and 157 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -93,4 +93,5 @@ test.php
|
|||
/plugin/PedagoFlix/
|
||||
/plugin/YPTWebRTC/
|
||||
plugin/CustomizeUser/getMyAccount.php
|
||||
*.rnd
|
||||
*.rnd
|
||||
/plugin/Gift/
|
|
@ -85,6 +85,7 @@ Options All -Indexes
|
|||
RewriteEngine on
|
||||
#VideoHLS for DRM
|
||||
|
||||
RewriteRule ^buy/? plugin/Layout/buy.php [NC,L,QSA]
|
||||
RewriteRule ^id/? view/id.php [NC,L,QSA]
|
||||
RewriteRule ^logo.png view/logo.png.php [NC,L,QSA]
|
||||
|
||||
|
|
39
locale/function.js.php
Normal file
39
locale/function.js.php
Normal 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, "'").replace(/"/g, """).replace(/</g, "<").replace(/>/g, ">");
|
||||
}
|
|
@ -4461,42 +4461,42 @@ function getLdJson($videos_id)
|
|||
if ($duration == "PT0H0M0S") {
|
||||
$duration = "PT0H0M1S";
|
||||
}
|
||||
$output = '
|
||||
<script type="application/ld+json" id="application_ld_json">
|
||||
{
|
||||
"@context": "http://schema.org/",
|
||||
"@type": "VideoObject",
|
||||
"name": "' . getSEOTitle($video['title']) . '",
|
||||
"description": "' . $description . '",
|
||||
"thumbnailUrl": [
|
||||
"' . $img . '"
|
||||
],
|
||||
"uploadDate": "' . date("Y-m-d\Th:i:s", strtotime($video['created'])) . '",
|
||||
"duration": "' . $duration . '",
|
||||
"contentUrl": "' . Video::getLinkToVideo($videos_id, '', false, false) . '",
|
||||
"embedUrl": "' . Video::getLinkToVideo($videos_id, '', true, false) . '",
|
||||
"interactionCount": "' . $video['views_count'] . '",
|
||||
"@id": "' . Video::getPermaLink($videos_id) . '",
|
||||
"datePublished": "' . date("Y-m-d", strtotime($video['created'])) . '",
|
||||
"interactionStatistic": [
|
||||
{
|
||||
"@type": "InteractionCounter",
|
||||
"interactionService": {
|
||||
"@type": "WebSite",
|
||||
"name": "' . str_replace('"', '', $config->getWebSiteTitle()) . '",
|
||||
"@id": "' . $global['webSiteRootURL'] . '"
|
||||
},
|
||||
"interactionType": "http://schema.org/LikeAction",
|
||||
"userInteractionCount": "' . $video['views_count'] . '"
|
||||
},
|
||||
{
|
||||
"@type": "InteractionCounter",
|
||||
"interactionType": "http://schema.org/WatchAction",
|
||||
"userInteractionCount": "' . $video['views_count'] . '"
|
||||
}
|
||||
]
|
||||
}
|
||||
</script>';
|
||||
$data = array(
|
||||
"@context" => "http://schema.org/",
|
||||
"@type" => "VideoObject",
|
||||
"name" => getSEOTitle($video['title']),
|
||||
"description" => $description,
|
||||
"thumbnailUrl" => array($img),
|
||||
"uploadDate" => date("Y-m-d\Th:i:s", strtotime($video['created'])),
|
||||
"duration" => $duration,
|
||||
"contentUrl" => Video::getLinkToVideo($videos_id, '', false, false),
|
||||
"embedUrl" => Video::getLinkToVideo($videos_id, '', true, false),
|
||||
"interactionCount" => $video['views_count'],
|
||||
"@id" => Video::getPermaLink($videos_id),
|
||||
"datePublished" => date("Y-m-d", strtotime($video['created'])),
|
||||
"interactionStatistic" => array(
|
||||
array(
|
||||
"@type" => "InteractionCounter",
|
||||
"interactionService" => array(
|
||||
"@type" => "WebSite",
|
||||
"name" => str_replace('"', '', $config->getWebSiteTitle()),
|
||||
"@id" => $global['webSiteRootURL']
|
||||
),
|
||||
"interactionType" => "http://schema.org/LikeAction",
|
||||
"userInteractionCount" => $video['views_count']
|
||||
),
|
||||
array(
|
||||
"@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>';
|
||||
|
||||
ObjectYPT::setCacheGlobal("getLdJson{$videos_id}", $output);
|
||||
echo $output;
|
||||
}
|
||||
|
@ -10847,7 +10847,7 @@ function getMP3ANDMP4DownloadLinksFromHLS($videos_id, $video_type)
|
|||
if (!empty($videoHLSObj) && method_exists('VideoHLS', 'getMP3ANDMP4DownloadLinks')) {
|
||||
$downloadOptions = VideoHLS::getMP3ANDMP4DownloadLinks($videos_id);
|
||||
} else {
|
||||
_error_log("getMP3ANDMP4DownloadLinksFromHLS($videos_id, $video_type): invalid plugin");
|
||||
//_error_log("getMP3ANDMP4DownloadLinksFromHLS($videos_id, $video_type): invalid plugin");
|
||||
}
|
||||
} else {
|
||||
_error_log("getMP3ANDMP4DownloadLinksFromHLS($videos_id, $video_type): invalid vidreo type");
|
||||
|
|
|
@ -545,7 +545,7 @@ if (!class_exists('Video')) {
|
|||
if (empty($this->duration_in_seconds)) {
|
||||
$this->duration_in_seconds = durationToSeconds($this->duration);
|
||||
}
|
||||
|
||||
//var_dump($this->clean_title);exit;
|
||||
if (!empty($this->id)) {
|
||||
if (!$this->userCanManageVideo() && !$allowOfflineUser && !Permissions::canModerateVideos()) {
|
||||
forbiddenPage('Permission denied');
|
||||
|
@ -1428,7 +1428,6 @@ if (!class_exists('Video')) {
|
|||
$sql .= AVideoPlugin::getVideoWhereClause();
|
||||
|
||||
$sql .= "ORDER BY RAND() LIMIT {$limit}";
|
||||
|
||||
$res = sqlDAL::readSql($sql);
|
||||
$fullData = sqlDAL::fetchAllAssoc($res);
|
||||
|
||||
|
@ -2881,7 +2880,6 @@ if (!class_exists('Video')) {
|
|||
public function setDescription($description)
|
||||
{
|
||||
global $global, $advancedCustom;
|
||||
|
||||
if (empty($advancedCustom)) {
|
||||
$advancedCustom = AVideoPlugin::getDataObject('CustomizeAdvanced');
|
||||
}
|
||||
|
@ -5185,7 +5183,7 @@ if (!class_exists('Video')) {
|
|||
sqlDAL::close($res);
|
||||
|
||||
if ($res !== false) {
|
||||
if ($videoRow !== false) {
|
||||
if (is_array($videoRow)) {
|
||||
return $videoRow['clean_title'];
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -166,6 +166,7 @@ if (Permissions::canAdminVideos()) {
|
|||
$obj->setCreated($_REQUEST['created']);
|
||||
}
|
||||
}
|
||||
|
||||
TimeLogEnd(__FILE__, __LINE__);
|
||||
$resp = $obj->save(true);
|
||||
// if is a new embed video
|
||||
|
|
|
@ -583,7 +583,6 @@ class VideoStatistic extends ObjectYPT {
|
|||
//_error_log("Delete Query: ".$sql);
|
||||
return sqlDAL::writeSql($sql, "i", [$days]);
|
||||
}
|
||||
_error_log("Id for table " . static::getTableName() . " not defined for deletion", AVideoLog::$ERROR);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -396,6 +396,25 @@ class Cache extends PluginAbstract {
|
|||
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) {
|
||||
|
|
|
@ -13,82 +13,170 @@ require_once $global['systemRootPath'] . 'plugin/CustomizeUser/Objects/Users_aff
|
|||
class CustomizeUser extends PluginAbstract
|
||||
{
|
||||
|
||||
|
||||
|
||||
private static function _getSocialMedia()
|
||||
{
|
||||
return [
|
||||
'website' => [
|
||||
'class'=>'icoCopy',
|
||||
'class' => 'icoCopy',
|
||||
'icon' => 'fas fa-globe',
|
||||
'label' => __("Website"),
|
||||
'placeholder' => __("Website URL"),
|
||||
'isActive' => true,
|
||||
],
|
||||
'youtube' => [
|
||||
'class'=>'icoYoutube',
|
||||
'icon' => 'fab fa-youtube',
|
||||
'label' => __("Youtube"),
|
||||
'placeholder' => __("Youtube URL"),
|
||||
'isActive' => true,
|
||||
],
|
||||
'facebook' => [
|
||||
'class'=>'icoFacebook',
|
||||
'class' => 'icoFacebook',
|
||||
'icon' => 'fab fa-facebook-f',
|
||||
'label' => __("Facebook"),
|
||||
'placeholder' => __("Facebook URL"),
|
||||
'isActive' => true,
|
||||
],
|
||||
'twitter' => [
|
||||
'class'=>'icoTwitter',
|
||||
'icon' => 'fab fa-twitter',
|
||||
'label' => __("Twitter"),
|
||||
'placeholder' => __("Twitter URL"),
|
||||
'youtube' => [
|
||||
'class' => 'icoYoutube',
|
||||
'icon' => 'fab fa-youtube',
|
||||
'label' => __("Youtube"),
|
||||
'placeholder' => __("Youtube URL"),
|
||||
'isActive' => true,
|
||||
],
|
||||
'instagram' => [
|
||||
'class'=>'icoInstagram',
|
||||
'class' => 'icoInstagram',
|
||||
'icon' => 'fab fa-instagram',
|
||||
'label' => __("Instagram"),
|
||||
'placeholder' => __("Instagram URL"),
|
||||
'isActive' => true,
|
||||
],
|
||||
'spreaker' => [
|
||||
'class'=>'icoSpreaker',
|
||||
'icon' => 'fas fa-heart',
|
||||
'label' => __("Spreaker"),
|
||||
'placeholder' => __("Spreaker URL"),
|
||||
/*
|
||||
'whatsapp' => [
|
||||
'class' => 'icoWhatsapp',
|
||||
'icon' => 'fab fa-whatsapp',
|
||||
'label' => __("Whatsapp"),
|
||||
'placeholder' => __("Whatsapp URL"),
|
||||
'isActive' => true,
|
||||
],
|
||||
*/
|
||||
'twitter' => [
|
||||
'class' => 'icoTwitter',
|
||||
'icon' => 'fab fa-twitter',
|
||||
'label' => __("Twitter"),
|
||||
'placeholder' => __("Twitter URL"),
|
||||
'isActive' => true,
|
||||
],
|
||||
'linkedin' => [
|
||||
'class'=>'icoLinkedIn',
|
||||
'class' => 'icoLinkedIn',
|
||||
'icon' => 'fab fa-linkedin-in',
|
||||
'label' => __("LinkedIn"),
|
||||
'placeholder' => __("LinkedIn URL"),
|
||||
'isActive' => true,
|
||||
],
|
||||
'tiktok' => [
|
||||
'class'=>'icoTikTok',
|
||||
'class' => 'icoTikTok',
|
||||
'icon' => 'fab fa-tiktok',
|
||||
'label' => __("TikTok"),
|
||||
'placeholder' => __("TikTok URL"),
|
||||
'isActive' => true,
|
||||
],
|
||||
'patreon' => [
|
||||
'class'=>'icoPatreon',
|
||||
'icon' => 'fab fa-patreon',
|
||||
'label' => __("Patreon"),
|
||||
'placeholder' => __("Patreon URL"),
|
||||
'isActive' => true,
|
||||
],
|
||||
'pinterest' => [
|
||||
'class'=>'icoPinterest',
|
||||
'class' => 'icoPinterest',
|
||||
'icon' => 'fab fa-pinterest',
|
||||
'label' => __("Pinterest"),
|
||||
'placeholder' => __("Pinterest URL"),
|
||||
'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()
|
||||
{
|
||||
$obj = AVideoPlugin::getDataObject('CustomizeUser');
|
||||
|
@ -281,16 +369,18 @@ class CustomizeUser extends PluginAbstract
|
|||
return $obj;
|
||||
}
|
||||
|
||||
function onUserSocketConnect() {
|
||||
function onUserSocketConnect()
|
||||
{
|
||||
global $global;
|
||||
echo file_get_contents($global['systemRootPath'] . 'plugin/CustomizeUser/onUserSocketConnect.js');
|
||||
}
|
||||
|
||||
function onUserSocketDisconnect() {
|
||||
function onUserSocketDisconnect()
|
||||
{
|
||||
global $global;
|
||||
echo file_get_contents($global['systemRootPath'] . 'plugin/CustomizeUser/onUserSocketDisconnect.js');
|
||||
}
|
||||
|
||||
|
||||
static function getCallerButton($users_id, $class = '')
|
||||
{
|
||||
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");
|
||||
return true;
|
||||
} 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);
|
||||
|
|
133
plugin/Layout/buy.php
Normal file
133
plugin/Layout/buy.php
Normal 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();
|
||||
?>
|
|
@ -25,10 +25,10 @@ class PlayerSkins extends PluginAbstract {
|
|||
$names[] = $path_parts['filename'];
|
||||
}
|
||||
$desc .= $desc . "<code>" . implode("</code> or <code>", $names) . "</code>";
|
||||
|
||||
|
||||
$dir = $global['systemRootPath'] . 'plugin/PlayerSkins/epg.php';
|
||||
$desc .= "<br>crontab for auto generate cache for EPG links <code>0 * * * * php {$dir}</code>";
|
||||
|
||||
|
||||
return $desc;
|
||||
}
|
||||
|
||||
|
@ -70,13 +70,14 @@ class PlayerSkins extends PluginAbstract {
|
|||
$obj->contextMenuShare = true;
|
||||
$obj->playerFullHeight = false;
|
||||
$obj->playsinline = true;
|
||||
$obj->showVideoSEOViewForBots = true;
|
||||
|
||||
return $obj;
|
||||
}
|
||||
|
||||
static function getPlaysinline(){
|
||||
|
||||
static function getPlaysinline() {
|
||||
$obj = AVideoPlugin::getObjectData('PlayerSkins');
|
||||
if($obj->playsinline){
|
||||
if ($obj->playsinline) {
|
||||
return ' playsinline webkit-playsinline="webkit-playsinline" ';
|
||||
}
|
||||
return '';
|
||||
|
@ -103,7 +104,7 @@ class PlayerSkins extends PluginAbstract {
|
|||
}
|
||||
$images = Video::getImageFromFilename($filename);
|
||||
if ($vType == 'video') {
|
||||
$htmlMediaTag = '<video '.self::getPlaysinline()
|
||||
$htmlMediaTag = '<video ' . self::getPlaysinline()
|
||||
. 'preload="auto" poster="' . $images->poster . '" controls
|
||||
class="embed-responsive-item video-js vjs-default-skin vjs-big-play-centered vjs-16-9" id="mainVideo">';
|
||||
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>';
|
||||
} else if ($vType == 'audio') {
|
||||
$htmlMediaTag = '<audio '.self::getPlaysinline().'
|
||||
$htmlMediaTag = '<audio ' . self::getPlaysinline() . '
|
||||
preload="auto"
|
||||
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()) {
|
||||
|
@ -152,14 +153,12 @@ class PlayerSkins extends PluginAbstract {
|
|||
}
|
||||
$_GET['isEmbedded'] = "";
|
||||
if (
|
||||
($disableYoutubeIntegration)
|
||||
||
|
||||
(
|
||||
(strpos($video['videoLink'], "youtu.be") == false)
|
||||
&& (strpos($video['videoLink'], "youtube.com") == false)
|
||||
($disableYoutubeIntegration) ||
|
||||
(
|
||||
(strpos($video['videoLink'], "youtu.be") == false) && (strpos($video['videoLink'], "youtube.com") == false)
|
||||
//&& (strpos($video['videoLink'], "vimeo.com") == false)
|
||||
)
|
||||
) {
|
||||
)
|
||||
) {
|
||||
$_GET['isEmbedded'] = "e";
|
||||
$isVideoTypeEmbed = 1;
|
||||
$url = parseVideos($video['videoLink']);
|
||||
|
@ -167,9 +166,9 @@ class PlayerSkins extends PluginAbstract {
|
|||
$url = addQueryStringParameter($url, 'autoplay', 1);
|
||||
}
|
||||
$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 .= '<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>';
|
||||
} else {
|
||||
// youtube!
|
||||
|
@ -181,7 +180,7 @@ class PlayerSkins extends PluginAbstract {
|
|||
$_GET['isMediaPlaySite'] = $video['id'];
|
||||
PlayerSkins::playerJSCodeOnLoad($video['id'], @$video['url']);
|
||||
$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>';
|
||||
}
|
||||
} else if ($vType == 'serie') {
|
||||
|
@ -192,38 +191,38 @@ class PlayerSkins extends PluginAbstract {
|
|||
$link = addQueryStringParameter($link, 'playlist_index', @$_REQUEST['playlist_index']);
|
||||
|
||||
$htmlMediaTag = "<!-- Serie {$video['title']} {$video['filename']} -->";
|
||||
$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 .= '<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 .= '<script>$(document).ready(function () {addView(' . intval($video['id']) . ', 0);});</script>';
|
||||
}
|
||||
|
||||
$html .= "<script>mediaId = '{$video['id']}';var player;" . self::playerJSCodeOnLoad($video['id'], @$autoPlayURL) . '</script>';
|
||||
}
|
||||
|
||||
/*
|
||||
$col1Classes = 'col-md-2 firstC';
|
||||
$col2Classes = 'col-md-8 secC';
|
||||
$col3Classes = 'col-md-2 thirdC';
|
||||
if ($obj->playerFullHeight) {
|
||||
$col2Classes .= ' text-center playerFullHeight';
|
||||
}
|
||||
/*
|
||||
$col1Classes = 'col-md-2 firstC';
|
||||
$col2Classes = 'col-md-8 secC';
|
||||
$col3Classes = 'col-md-2 thirdC';
|
||||
if ($obj->playerFullHeight) {
|
||||
$col2Classes .= ' text-center playerFullHeight';
|
||||
}
|
||||
|
||||
$html .= '
|
||||
<div class="row main-video" id="mvideo">
|
||||
<div class="' . $col1Classes . '"></div>
|
||||
<div class="' . $col2Classes . '">
|
||||
<div id="videoContainer">
|
||||
<div id="floatButtons" style="display: none;">
|
||||
<p class="btn btn-outline btn-xs move">
|
||||
<i class="fas fa-expand-arrows-alt"></i>
|
||||
</p>
|
||||
<button type="button" class="btn btn-outline btn-xs"
|
||||
onclick="closeFloatVideo(); floatClosed = 1;">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div id="main-video" class="embed-responsive embed-responsive-16by9">' . $htmlMediaTag . '</div>';
|
||||
*/
|
||||
$html .= '
|
||||
<div class="row main-video" id="mvideo">
|
||||
<div class="' . $col1Classes . '"></div>
|
||||
<div class="' . $col2Classes . '">
|
||||
<div id="videoContainer">
|
||||
<div id="floatButtons" style="display: none;">
|
||||
<p class="btn btn-outline btn-xs move">
|
||||
<i class="fas fa-expand-arrows-alt"></i>
|
||||
</p>
|
||||
<button type="button" class="btn btn-outline btn-xs"
|
||||
onclick="closeFloatVideo(); floatClosed = 1;">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div id="main-video" class="embed-responsive embed-responsive-16by9">' . $htmlMediaTag . '</div>';
|
||||
*/
|
||||
|
||||
//$html .= showCloseButton() . '</div></div><div class="' . $col3Classes . '"></div></div>';
|
||||
$html .= getMVideo($htmlMediaTag);
|
||||
|
@ -305,11 +304,24 @@ class PlayerSkins extends PluginAbstract {
|
|||
return $js . $css . $oembed;
|
||||
}
|
||||
|
||||
static function showAutoplay(){
|
||||
static function showAutoplay() {
|
||||
$obj = AVideoPlugin::getDataObject('PlayerSkins');
|
||||
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() {
|
||||
if (isWebRTC()) {
|
||||
return '';
|
||||
|
@ -318,10 +330,10 @@ class PlayerSkins extends PluginAbstract {
|
|||
$js = "<!-- playerSkin -->";
|
||||
$obj = $this->getDataObject();
|
||||
if (
|
||||
!empty($_GET['videoName']) ||
|
||||
!empty($_GET['u']) ||
|
||||
!empty($_GET['evideo']) ||
|
||||
!empty($_GET['playlists_id']) ||
|
||||
!empty($_GET['videoName']) ||
|
||||
!empty($_GET['u']) ||
|
||||
!empty($_GET['evideo']) ||
|
||||
!empty($_GET['playlists_id']) ||
|
||||
(is_array($video) && !empty($video['id']))) {
|
||||
if (empty($obj->showLoopButton) && empty($obj->contextMenuLoop)) {
|
||||
$js .= "<script>setPlayerLoop(false);</script>";
|
||||
|
@ -333,7 +345,7 @@ class PlayerSkins extends PluginAbstract {
|
|||
PlayerSkins::getStartPlayerJS(file_get_contents("{$global['systemRootPath']}plugin/PlayerSkins/logo.js"));
|
||||
//$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"));
|
||||
}
|
||||
if ($obj->showShareSocial && CustomizeUser::canShareVideosFromVideo(@$video['id'])) {
|
||||
|
@ -363,8 +375,8 @@ class PlayerSkins extends PluginAbstract {
|
|||
}
|
||||
}
|
||||
$videos_id = getVideos_id();
|
||||
|
||||
$event = "updateMediaSessionMetadata();";
|
||||
|
||||
$event = "updateMediaSessionMetadata();";
|
||||
PlayerSkins::getStartPlayerJS($event);
|
||||
if (!empty($videos_id) && Video::getEPG($videos_id)) {
|
||||
PlayerSkins::getStartPlayerJS(file_get_contents("{$global['systemRootPath']}plugin/PlayerSkins/epgButton.js"));
|
||||
|
@ -374,9 +386,9 @@ class PlayerSkins extends PluginAbstract {
|
|||
$videos_id = getVideos_id();
|
||||
$video = Video::getVideoLight($videos_id);
|
||||
$spectrumSource = Video::getSourceFile($video['filename'], "_spectrum.jpg");
|
||||
if(empty($spectrumSource["path"])){
|
||||
if(AVideoPlugin::isEnabledByName('MP4ThumbsAndGif') && method_exists('MP4ThumbsAndGif', 'getSpectrum')){
|
||||
if(MP4ThumbsAndGif::getSpectrum($videos_id)){
|
||||
if (empty($spectrumSource["path"])) {
|
||||
if (AVideoPlugin::isEnabledByName('MP4ThumbsAndGif') && method_exists('MP4ThumbsAndGif', 'getSpectrum')) {
|
||||
if (MP4ThumbsAndGif::getSpectrum($videos_id)) {
|
||||
$spectrumSource = Video::getSourceFile($video['filename'], "_spectrum.jpg");
|
||||
}
|
||||
}
|
||||
|
@ -424,7 +436,7 @@ class PlayerSkins extends PluginAbstract {
|
|||
$dataSetup[] = "vimeo:{customVars: {wmode: \"transparent\", origin: \"{$global['webSiteRootURL']}\"}}";
|
||||
}
|
||||
}
|
||||
if(!$obj->showPictureInPicture){
|
||||
if (!$obj->showPictureInPicture) {
|
||||
$dataSetup[] = "controlBar: {pictureInPictureToggle: false}";
|
||||
}
|
||||
|
||||
|
@ -549,7 +561,7 @@ class PlayerSkins extends PluginAbstract {
|
|||
});player.one(startEvent, function () {player.ima.initializeAdDisplayContainer();});";
|
||||
}
|
||||
$js .= "}";
|
||||
|
||||
|
||||
$js .= "if(typeof player !== 'undefined'){";
|
||||
$js .= "player.ready(function () {console.log('player.ready');";
|
||||
$js .= "player.on('error', () => {AvideoJSError(player.error().code);});";
|
||||
|
@ -573,22 +585,22 @@ class PlayerSkins extends PluginAbstract {
|
|||
}} catch (e) {
|
||||
console.error('error-display', e);
|
||||
};";
|
||||
$js .= "try {";
|
||||
$js .= implode(' } catch (e) {console.error(\'onPlayerReady\', e);};try { ', $prepareStartPlayerJS_onPlayerReady).";";
|
||||
$js .= " } catch (e) {console.error('onPlayerReady', e);}";
|
||||
$js .= $play;
|
||||
$js .= "});";
|
||||
$js .= "try {";
|
||||
$js .= implode(' } catch (e) {console.error(\'onPlayerReady\', e);};try { ', $prepareStartPlayerJS_onPlayerReady) . ";";
|
||||
$js .= " } catch (e) {console.error('onPlayerReady', e);}";
|
||||
$js .= $play;
|
||||
$js .= "});";
|
||||
|
||||
if ($obj->showLoopButton && isVideoPlayerHasProgressBar()) {
|
||||
$js .= file_get_contents($global['systemRootPath'] . 'plugin/PlayerSkins/loopbutton.js');
|
||||
}
|
||||
$js .= file_get_contents($global['systemRootPath'] . 'plugin/PlayerSkins/fixCurrentSources.js');
|
||||
|
||||
|
||||
$js .= "}";
|
||||
if (empty($noReadyFunction)) {
|
||||
$js .= "});";
|
||||
}
|
||||
|
||||
|
||||
//var_dump('getStartPlayerJSWasRequested', debug_backtrace());
|
||||
$getStartPlayerJSWasRequested = true;
|
||||
return $js;
|
||||
|
@ -602,7 +614,7 @@ class PlayerSkins extends PluginAbstract {
|
|||
$videos_id = getVideos_id();
|
||||
if (!empty($videos_id)) {
|
||||
$video = Video::getVideoLight($videos_id);
|
||||
if(!empty($video)){
|
||||
if (!empty($video)) {
|
||||
$progress = Video::getVideoPogressPercent($videos_id);
|
||||
if (!empty($progress) && !empty($progress['lastVideoTime'])) {
|
||||
$currentTime = intval($progress['lastVideoTime']);
|
||||
|
@ -618,7 +630,7 @@ class PlayerSkins extends PluginAbstract {
|
|||
if ($maxCurrentTime <= $currentTime + 5) {
|
||||
$currentTime = 0;
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -806,14 +818,12 @@ class PlayerSkins extends PluginAbstract {
|
|||
PlayerSkins::getStartPlayerJS($onPlayerReady);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public function getWatchActionButton($videos_id) {
|
||||
global $global, $video;
|
||||
include $global['systemRootPath'] . 'plugin/PlayerSkins/actionButton.php';
|
||||
}
|
||||
|
||||
|
||||
public function getGalleryActionButton($videos_id) {
|
||||
global $global;
|
||||
include $global['systemRootPath'] . 'plugin/PlayerSkins/actionButtonGallery.php';
|
||||
|
|
75
plugin/PlayerSkins/seo.php
Normal file
75
plugin/PlayerSkins/seo.php
Normal 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;
|
||||
?>
|
|
@ -70,16 +70,26 @@ ul.social-network li {
|
|||
background-color: #F16E28;
|
||||
}
|
||||
.social-network a.icoYoutube:hover {
|
||||
background-color: #FF0000; /* YouTube's primary color */
|
||||
background-color: #FF0000;
|
||||
}
|
||||
|
||||
.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 */
|
||||
}
|
||||
|
||||
.social-network a.icoPatreon:hover {
|
||||
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,
|
||||
|
|
|
@ -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('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"/>
|
||||
<script src="<?php echo getURL('locale/function.js.php'); ?>&lang=<?php echo revertLangString(getLanguage()); ?>"></script>
|
||||
<?php
|
||||
}
|
||||
if (!isVideo()) {
|
||||
|
|
|
@ -227,7 +227,7 @@ getCSSAnimationClassAndStyleAddWait(0.5);
|
|||
if ($(this).attr('type') === 'checkbox') {
|
||||
if (!$(this).is(':checked')) {
|
||||
$(this).closest('.input-group').addClass(errorClass);
|
||||
errorFound = 'Confirmation Required';
|
||||
errorFound = __('Confirmation Required');
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
|
@ -238,7 +238,7 @@ getCSSAnimationClassAndStyleAddWait(0.5);
|
|||
if (!label) {
|
||||
label = $(this).attr('name');
|
||||
}
|
||||
errorFound = label + ' is required';
|
||||
errorFound = label + ' ' + __('is required');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -253,23 +253,23 @@ getCSSAnimationClassAndStyleAddWait(0.5);
|
|||
// Password doesn't match
|
||||
if (!$('#inputPassword').val().match(/[0-9a-z]+/i)) {
|
||||
$('#inputPassword').closest('.input-group').addClass(errorClass);
|
||||
avideoAlertError("<?php echo __("Your password cannot be blank"); ?>");
|
||||
avideoAlertError(__("Your password cannot be blank"));
|
||||
return false;
|
||||
}
|
||||
if (!checkIfPasswordsMatch()) {
|
||||
avideoAlertError("<?php echo __("Your password does not match!"); ?>");
|
||||
avideoAlertError(__("Your password does not match!"));
|
||||
return false;
|
||||
}
|
||||
if ($('#inputEmail').is(":visible") && !isEmailValid($('#inputEmail').val())) {
|
||||
if (!isEmailValid($('#inputUser').val())) {
|
||||
$('#inputEmail').closest('.input-group').addClass(errorClass);
|
||||
avideoAlertError("<?php echo __("You must specify a valid email"); ?>");
|
||||
avideoAlertError(__("You must specify a valid email"));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (!$('#inputUser').val().match(/^[0-9a-z@._-]{3,}$/i) && !isEmailValid($('#inputUser').val())) {
|
||||
$('#inputUser').closest('.input-group').addClass(errorClass);
|
||||
avideoAlertError("<?php echo __("Invalid user"); ?>");
|
||||
avideoAlertError(__("Invalid user"));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ $video['filename'] = '';
|
|||
<html lang="<?php echo getLanguage(); ?>">
|
||||
<head>
|
||||
<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
|
||||
include $global['systemRootPath'] . 'view/include/head.php';
|
||||
?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue