Skip to content

Commit

Permalink
Merge pull request #46 from DanielnetoDotCom/master
Browse files Browse the repository at this point in the history
update
  • Loading branch information
Vinzenz Hersche authored Apr 9, 2018
2 parents 983a2a4 + 3ca9cc4 commit ac55119
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 18 deletions.
3 changes: 1 addition & 2 deletions plugin/Gallery/functions.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

function createOrderInfo($getName, $mostWord, $lessWord, $orderString) {
$upDown = "";
$mostLess = "";
Expand Down Expand Up @@ -31,7 +30,7 @@ function createOrderInfo($getName, $mostWord, $lessWord, $orderString) {
return array($tmpOrderString, $upDown, $mostLess);
}

function createGalerySection($videos) {
function createGallerySection($videos) {
global $global, $config, $obj;
?>
<?php
Expand Down
4 changes: 2 additions & 2 deletions plugin/Gallery/view/BigVideo.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
<div class="text-muted galeryDetails">
<div>
<?php
$value['tags'] = Video::getTags($video['id']);
foreach ($value['tags'] as $value2) {
$video['tags'] = Video::getTags($video['id']);
foreach ($video['tags'] as $value2) {
if ($value2->label === __("Group")) {
?>
<span class="label label-<?php echo $value2->type; ?>"><?php echo $value2->text; ?></span>
Expand Down
31 changes: 17 additions & 14 deletions plugin/Gallery/view/modeGallery.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@
<html lang="<?php echo $_SESSION['language']; ?>">
<head>
<title><?php
echo $config->getWebSiteTitle();
?></title>
echo $config->getWebSiteTitle();
?></title>
<meta name="generator"
content="YouPHPTube - A Free Youtube Clone Script" />
<?php include $global['systemRootPath'] . 'view/include/head.php';
Expand Down Expand Up @@ -108,9 +108,9 @@
</div>
<div class="col-sm-10 col-sm-offset-1 list-group-item">
<?php
if (!empty($currentCat)) {
include $global['systemRootPath'] . 'plugin/Gallery/view/Category.php';
}
if (!empty($currentCat)) {
include $global['systemRootPath'] . 'plugin/Gallery/view/Category.php';
}
if (!empty($video)) {
$name = User::getNameIdentificationById($video['users_id']);
$img_portrait = ($video['rotation'] === "90" || $video['rotation'] === "270") ? "img-portrait" : "";
Expand All @@ -134,6 +134,9 @@ function afterExtraVideos($liveLi) {
return $liveLi;
}
</script>
<?php
echo YouPHPTubePlugin::getGallerySection();
?>
<!-- For Live Videos End -->
<?php if ($obj->SortByName) { ?>
<div class="clear clearfix">
Expand All @@ -159,7 +162,7 @@ function afterExtraVideos($liveLi) {
$_POST['current'] = $_GET['page'];
$_POST['rowCount'] = $obj->SortByNameRowCount;
$videos = Video::getAllVideos();
createGalerySection($videos);
createGallerySection($videos);
?>
<div class="row">
<ul class="pages">
Expand All @@ -184,12 +187,12 @@ function afterExtraVideos($liveLi) {
?>
</h3>
<div class="row"><?php
$countCols = 0;
unset($_POST['sort']);
$_POST['sort']['created'] = $_GET['dateAddedOrder'];
$_POST['rowCount'] = $obj->DateAddedRowCount;
$videos = Video::getAllVideos();
createGalerySection($videos);
$countCols = 0;
unset($_POST['sort']);
$_POST['sort']['created'] = $_GET['dateAddedOrder'];
$_POST['rowCount'] = $obj->DateAddedRowCount;
$videos = Video::getAllVideos();
createGallerySection($videos);
?>
</div>
<div class="row">
Expand Down Expand Up @@ -221,7 +224,7 @@ function afterExtraVideos($liveLi) {
$_POST['current'] = $_GET['page'];
$_POST['rowCount'] = $obj->MostWatchedRowCount;
$videos = Video::getAllVideos();
createGalerySection($videos);
createGallerySection($videos);
?>
</div>
<div class="row">
Expand Down Expand Up @@ -253,7 +256,7 @@ function afterExtraVideos($liveLi) {
$_POST['current'] = $_GET['page'];
$_POST['rowCount'] = $obj->MostPopularRowCount;
$videos = Video::getAllVideos();
createGalerySection($videos);
createGallerySection($videos);
?>
</div>
<div class="row">
Expand Down
4 changes: 4 additions & 0 deletions plugin/Plugin.abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ public function getVideosManagerListButton() {
public function getTags() {

}

public function getGallerySection(){
return "";
}

public function getDataObject() {
$obj = Plugin::getPluginByUUID($this->getUUID());
Expand Down
9 changes: 9 additions & 0 deletions plugin/YouPHPTubePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ public static function getHeadCode(){
}
return $str;
}
public static function getGallerySection(){
$plugins = Plugin::getAllEnabled();
$str = "";
foreach ($plugins as $value) {
$p = static::loadPlugin($value['dirName']);
$str .= $p->getGallerySection();
}
return $str;
}
public static function getFooterCode(){
$plugins = Plugin::getAllEnabled();
$str = "";
Expand Down

0 comments on commit ac55119

Please sign in to comment.