1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-06 03:50:04 +02:00
This commit is contained in:
DanielnetoDotCom 2020-07-21 14:58:52 -03:00
parent 7dae633143
commit d1b20fc718
8 changed files with 80 additions and 22 deletions

View file

@ -623,9 +623,9 @@ $t['Want to watch this again later?'] = "後で再度視聴しますか?";
$t['Warning'] = "警告";
$t['Watch on YouTube'] = "YouTubeで見る";
$t['Watching Now'] = "今すぐ見る";
$t['We could not notify anyone ({$email}, {$siteOwnerEmail}), but we marked it as a inapropriated'] = "ご指定の情報では、誰にも通知することができませんでした({$email}, {$siteOwnerEmail}), 不正利用としてマークしました.";
$t['We could not notify the video owner {$email}, but we marked it as a inapropriated'] = "ビデオの所有者 {$email}を知らせることはできませんが、不正利用であるとマークしました.";
$t['We could not notify the video owner {$siteOwnerEmail}, but we marked it as a inapropriated'] = "ビデオの所有者{$siteOwnerEmail}に通知することはできませんでしたが、不適切なものとしてマークしました.";
$t['We could not notify anyone ({$email}, {$siteOwnerEmail}), but we marked it as a inapropriated'] = "ご指定の情報では、誰にも通知することができませんでした({\$email}, {\$siteOwnerEmail}), 不正利用としてマークしました.";
$t['We could not notify the video owner {$email}, but we marked it as a inapropriated'] = "ビデオの所有者 {\$email}を知らせることはできませんが、不正利用であるとマークしました.";
$t['We could not notify the video owner {$siteOwnerEmail}, but we marked it as a inapropriated'] = "ビデオの所有者{\$siteOwnerEmail}に通知することはできませんでしたが、不適切なものとしてマークしました.";
$t['We detected a total of %s pending updates, if you want to do it now click (Update Now) button'] = "合計で %s の保留中の更新を検出しました。今すぐ更新したい場合は、(今すぐ更新)ボタンをクリックしてください。.";
$t['We have not found any videos or audios to show'] = "視聴できるビデオやオーディオは見つかりませんでした.";
$t['We sent you an e-mail with instructions'] = "ご指定のメールアドレスにメールを送信しました.";

View file

@ -126,3 +126,9 @@ $advancedCustomUser = AVideoPlugin::getObjectData("CustomizeUser");
$customizePlugin = AVideoPlugin::getObjectData("Customize");
AVideoPlugin::loadPlugin("PlayerSkins");
$sitemapFile = "{$global['systemRootPath']}sitemap.xml";
if(!empty($_GET['type'])){
$metaDescription = " {$_GET['type']}";
}else if(!empty($_GET['showOnly'])){
$metaDescription = " {$_GET['showOnly']}";
}

View file

@ -1,4 +1,5 @@
<?php
global $global;
require_once $global['systemRootPath'] . 'plugin/Plugin.abstract.php';
@ -463,8 +464,7 @@ class API extends PluginAbstract {
require_once $global['systemRootPath'] . 'plugin/Live/stats.json.php';
exit;
}
/**
* Return a user livestream information
* @param type $parameters
@ -481,21 +481,21 @@ class API extends PluginAbstract {
global $global;
require_once $global['systemRootPath'] . 'objects/video.php';
$obj = $this->startResponseObject($parameters);
if(empty($parameters['title']) && !isset($parameters['public'])){
if (empty($parameters['title']) && !isset($parameters['public'])) {
return new ApiObject("Invalid parameters");
}
$dataObj = $this->getDataObject();
if ($dataObj->APISecret === @$_GET['APISecret'] || User::isLogged()) {
if(!empty($parameters['users_id'])){
if($dataObj->APISecret !== @$_GET['APISecret']){
if (!empty($parameters['users_id'])) {
if ($dataObj->APISecret !== @$_GET['APISecret']) {
$parameters['users_id'] = User::getId();
}
}else{
} else {
$parameters['users_id'] = User::getId();
}
$user = new User($parameters['users_id']);
if (empty($user->getUser())){
if (empty($user->getUser())) {
return new ApiObject("User Not defined");
}
$p = AVideoPlugin::loadPlugin("Live");
@ -504,16 +504,16 @@ class API extends PluginAbstract {
$trans = new LiveTransmition($trasnmition['id']);
$trans->setTitle($parameters['title']);
$trans->setPublic($parameters['public']);
if($obj->id = $trans->save()){
if ($obj->id = $trans->save()) {
return new ApiObject("", false, $obj);
}else{
} else {
return new ApiObject("Error on save");
}
} else {
return new ApiObject("API Secret is not valid");
}
}
/**
* Return a user livestream information
* @param type $parameters
@ -530,17 +530,17 @@ class API extends PluginAbstract {
$obj = $this->startResponseObject($parameters);
$dataObj = $this->getDataObject();
if ($dataObj->APISecret === @$_GET['APISecret'] || User::isLogged()) {
if(!empty($parameters['users_id'])){
if($dataObj->APISecret !== @$_GET['APISecret']){
if (!empty($parameters['users_id'])) {
if ($dataObj->APISecret !== @$_GET['APISecret']) {
$parameters['users_id'] = User::getId();
}
}else{
} else {
$parameters['users_id'] = User::getId();
}
$user = new User($parameters['users_id']);
if (empty($user->getUser())){
if (empty($user->getUser())) {
return new ApiObject("User Not defined");
}
$p = AVideoPlugin::loadPlugin("Live");
@ -549,7 +549,7 @@ class API extends PluginAbstract {
$obj->livestream = LiveTransmition::getFromDbByUser($user->getBdId());
$obj->livestream["live_servers_id"] = Live::getCurrentLiveServersId();
$obj->livestream["server"] = $p->getServer($obj->livestream["live_servers_id"]) . "?p=" . $user->getPassword();
$obj->livestream["poster"] = $global['webSiteRootURL'].$p->getPosterImage($user->getBdId(), $obj->livestream["live_servers_id"]);
$obj->livestream["poster"] = $global['webSiteRootURL'] . $p->getPosterImage($user->getBdId(), $obj->livestream["live_servers_id"]);
return new ApiObject("", false, $obj);
} else {
@ -1043,6 +1043,48 @@ class API extends PluginAbstract {
return $obj->APISecret;
}
/**
* @param type $parameters
* Return available locales translations
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}
* @return type
*/
public function get_api_locales($parameters) {
global $global, $config;
$langs = new stdClass();
$langs->default = $config->getLanguage();
$langs->options = getEnabledLangs();
$langs->isRTL = isRTL();
return new ApiObject("", false, $langs);
}
/**
* @param type $parameters
* 'language' specify what translation array the API should return, for example cn = chinese
* Return available locales translations
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&language=cn
* @return type
*/
public function get_api_locale($parameters) {
global $global, $config;
$obj = $this->startResponseObject($parameters);
if (empty($parameters['language'])) {
return new ApiObject("You must specify a language");
}
$parameters['language'] = strtolower($parameters['language']);
$file = "{$global['systemRootPath']}locale/{$parameters['language']}.php";
if (!file_exists("{$file}")) {
return new ApiObject("This language does not exists");
}
include $file;
if(empty($t)){
return new ApiObject("This language is empty");
}
return new ApiObject("", false, $t);
}
}
class ApiObject {

View file

@ -3,6 +3,7 @@ global $global, $config;
if(!isset($global['systemRootPath'])){
require_once '../videos/configuration.php';
}
$metaDescription = "About Page";
?>
<!DOCTYPE html>
<html lang="<?php echo $config->getLanguage(); ?>">

View file

@ -35,6 +35,7 @@ $bgSize = getimagesize($bgImagePath);
if($bgSize[0]<2048){
$channelFluidLayout = false;
}
$metaDescription = " Channel - {$_GET['channelName']}";
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">

View file

@ -28,6 +28,7 @@ $_POST['rowCount'] = 10;
$channels = Channel::getChannels(true, "u.id, '". implode(",", $users_id_array)."'");
$totalPages = ceil($totalChannels / $_POST['rowCount']);
$metaDescription = " Our Channels";
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">

View file

@ -8,6 +8,7 @@ $email = "";
if (User::isLogged()) {
$email = User::getEmail_();
}
$metaDescription = " Contact Form";
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">

View file

@ -33,12 +33,18 @@ foreach ($custom as $key => $value) {
}
}
if(!empty($metaDescription)){
$metaDescription = implode(" - ", $custom)." - {$metaDescription}";
}else{
$metaDescription = implode(" - ", $custom);
}
$theme = $config->getTheme();
?>
<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="description" content="<?php echo implode(" - ", $custom); ?>">
<meta name="description" content="<?php echo $metaDescription; ?>">
<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); ?>">