mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-06 03:50:04 +02:00
option for VAST
This commit is contained in:
parent
57bd04bcf0
commit
3eee7b9165
3 changed files with 28 additions and 11 deletions
|
@ -822,6 +822,25 @@ class API extends PluginAbstract {
|
|||
require_once $global['systemRootPath'] . 'plugin/GoogleAds_IMA/VMAP.php';
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* If you do not pass the user and password, it will always show ads, if you pass it the script will check if will display ads or not
|
||||
* @param type $parameters
|
||||
* 'videos_id' the video id to calculate the ads length
|
||||
* ['optionalAdTagUrl' a tag number 1 or 2 or 3 or 4 to use another tag, if do not pass it will use the default tag]
|
||||
* ['user' usename of the user]
|
||||
* ['pass' password of the user]
|
||||
* ['encodedPass' tell the script id the password submited is raw or encrypted]
|
||||
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}&videos_id=3&user=admin&pass=f321d14cdeeb7cded7489f504fa8862b&encodedPass=true&optionalAdTagUrl=2
|
||||
* @return type
|
||||
*/
|
||||
public function get_api_vast($parameters) {
|
||||
global $global;
|
||||
$this->getToPost();
|
||||
$vastOnly = 1;
|
||||
require_once $global['systemRootPath'] . 'plugin/GoogleAds_IMA/VMAP.php';
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the location based on the provided IP
|
||||
|
|
|
@ -7,11 +7,11 @@ session_write_close();
|
|||
require_once $global['systemRootPath'] . 'objects/video.php';
|
||||
require_once $global['systemRootPath'] . 'objects/category.php';
|
||||
|
||||
$_POST['rowCount'] = 2;
|
||||
$_REQUEST['rowCount'] = 2;
|
||||
if(empty($_GET['current'])){
|
||||
$_POST['current'] = 1;
|
||||
$_REQUEST['current'] = 1;
|
||||
}else{
|
||||
$_POST['current'] = intval($_GET['current']);
|
||||
$_REQUEST['current'] = intval($_GET['current']);
|
||||
}
|
||||
|
||||
$obj = AVideoPlugin::getObjectData("YouPHPFlix2");
|
||||
|
@ -42,14 +42,14 @@ if ($obj->Categories) {
|
|||
unset($_POST['searchPhrase']);
|
||||
}
|
||||
unset($_POST['sort']);
|
||||
$_POST['rowCount'] = 2;
|
||||
$_REQUEST['rowCount'] = 2;
|
||||
$categories = Category::getAllCategories(false, true);
|
||||
if(empty($categories)){
|
||||
echo "</div>";
|
||||
return false;
|
||||
}
|
||||
$_POST['current']=1;
|
||||
$_POST['rowCount'] = $obj->maxVideos;
|
||||
$_REQUEST['current']=1;
|
||||
$_REQUEST['rowCount'] = $obj->maxVideos;
|
||||
$_POST['searchPhrase'] = $searchPhrase;
|
||||
$showAllVideos = false;
|
||||
if (!empty($_GET['catName'])) {
|
||||
|
@ -94,7 +94,7 @@ if ($obj->Categories) {
|
|||
if ($showAllVideos) {
|
||||
TimeLogStart("modeFlixCategory.php showAllVideos");
|
||||
while (1) {
|
||||
$_POST['current'] ++;
|
||||
$_REQUEST['current'] ++;
|
||||
$videos = Video::getAllVideos("viewableNotUnlisted", false, true);
|
||||
if (empty($videos)) {
|
||||
break;
|
||||
|
@ -115,5 +115,5 @@ TimeLogEnd($timeLog, __LINE__);
|
|||
?>
|
||||
</div>
|
||||
<p class="pagination">
|
||||
<a class="pagination__next" href="<?php echo $global['webSiteRootURL']; ?>plugin/YouPHPFlix2/view/modeFlixCategory.php?current=<?php echo count($categories)?$_POST['current'] + 1:$_POST['current']; ?>&rrating=<?php echo @$_GET['rrating']; ?>"></a>
|
||||
<a class="pagination__next" href="<?php echo $global['webSiteRootURL']; ?>plugin/YouPHPFlix2/view/modeFlixCategory.php?current=<?php echo count($categories)?$_REQUEST['current'] + 1:$_REQUEST['current']; ?>&rrating=<?php echo @$_GET['rrating']; ?>"></a>
|
||||
</p>
|
|
@ -10,18 +10,16 @@ if (empty($_GET['redirectUri'])) {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (empty($_COOKIE)) {
|
||||
if (empty($_COOKIE) && get_browser_name()!=='Other (Unknown)') {
|
||||
?>
|
||||
<div style="padding: 10px;">
|
||||
<div class="alert alert-warning">
|
||||
<h1><i class="fas fa-exclamation-circle"></i> <?php echo __("Login Alert"); ?></h1>
|
||||
<h2><?php echo __("Please Login in the window pop up"); ?></h2>
|
||||
|
||||
<button class="btn btn-block btn-warning" onclick="openLoginWindow()"><i class="fas fa-sign-in-alt"></i> <?php echo __("Open pop-up Login window"); ?></button><br>
|
||||
<?php echo __("In case the login window does not open, check how do I disable the pop-up blocker in your browser"); ?>:<br>
|
||||
<a href="https://support.mozilla.org/en-US/kb/pop-blocker-settings-exceptions-troubleshooting" target="_blank">Mozilla Firefox</a><br>
|
||||
<a href="https://support.google.com/chrome/answer/95472" target="_blank">Google Chrome</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue