mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 09:49:28 +02:00
Update
This commit is contained in:
parent
c7c12525ea
commit
00f383eb49
16 changed files with 534 additions and 157 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -94,3 +94,4 @@ test.php
|
|||
/plugin/YPTWebRTC/
|
||||
plugin/CustomizeUser/getMyAccount.php
|
||||
*.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) {
|
||||
|
|
|
@ -24,13 +24,6 @@ class CustomizeUser extends PluginAbstract
|
|||
'placeholder' => __("Website URL"),
|
||||
'isActive' => true,
|
||||
],
|
||||
'youtube' => [
|
||||
'class'=>'icoYoutube',
|
||||
'icon' => 'fab fa-youtube',
|
||||
'label' => __("Youtube"),
|
||||
'placeholder' => __("Youtube URL"),
|
||||
'isActive' => true,
|
||||
],
|
||||
'facebook' => [
|
||||
'class' => 'icoFacebook',
|
||||
'icon' => 'fab fa-facebook-f',
|
||||
|
@ -38,11 +31,11 @@ class CustomizeUser extends PluginAbstract
|
|||
'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' => [
|
||||
|
@ -52,11 +45,20 @@ class CustomizeUser extends PluginAbstract
|
|||
'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' => [
|
||||
|
@ -73,22 +75,108 @@ class CustomizeUser extends PluginAbstract
|
|||
'placeholder' => __("TikTok URL"),
|
||||
'isActive' => true,
|
||||
],
|
||||
'patreon' => [
|
||||
'class'=>'icoPatreon',
|
||||
'icon' => 'fab fa-patreon',
|
||||
'label' => __("Patreon"),
|
||||
'placeholder' => __("Patreon URL"),
|
||||
'isActive' => true,
|
||||
],
|
||||
'pinterest' => [
|
||||
'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,12 +369,14 @@ 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');
|
||||
}
|
||||
|
|
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();
|
||||
?>
|
|
@ -70,6 +70,7 @@ class PlayerSkins extends PluginAbstract {
|
|||
$obj->contextMenuShare = true;
|
||||
$obj->playerFullHeight = false;
|
||||
$obj->playsinline = true;
|
||||
$obj->showVideoSEOViewForBots = true;
|
||||
|
||||
return $obj;
|
||||
}
|
||||
|
@ -152,11 +153,9 @@ class PlayerSkins extends PluginAbstract {
|
|||
}
|
||||
$_GET['isEmbedded'] = "";
|
||||
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)
|
||||
)
|
||||
) {
|
||||
|
@ -310,6 +309,19 @@ class PlayerSkins extends PluginAbstract {
|
|||
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 '';
|
||||
|
@ -807,8 +819,6 @@ class PlayerSkins extends PluginAbstract {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function getWatchActionButton($videos_id) {
|
||||
global $global, $video;
|
||||
include $global['systemRootPath'] . 'plugin/PlayerSkins/actionButton.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