Skip to content

Commit

Permalink
Merge pull request #19 from hersche/master
Browse files Browse the repository at this point in the history
update
  • Loading branch information
Vinzenz Hersche authored Mar 20, 2018
2 parents f098a40 + 015a9ca commit d047f06
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 73 deletions.
4 changes: 4 additions & 0 deletions plugin/Gallery/Gallery.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,14 @@ public function getEmptyDataObject() {
$obj = new stdClass();
$obj->Description = false;
$obj->SortByName = false;
$obj->SortByNameRowCount = 12;
$obj->BigVideo = true;
$obj->MostPopular = true;
$obj->MostPopularRowCount = 12;
$obj->MostWatched = true;
$obj->MostWatchedRowCount = 12;
$obj->DateAdded = true;
$obj->DateAddedRowCount = 12;
return $obj;
}

Expand Down
131 changes: 58 additions & 73 deletions plugin/Gallery/view/modeGallery.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@
<?php
include 'include/navbar.php';
?>
<div class="text-center" style="padding: 10px;">
<?php
echo $config->getAdsense();
?>
</div>
<div class="container-fluid gallery" itemscope itemtype="http://schema.org/VideoObject">
<div class="row text-center" style="padding: 10px;">
<?php
echo $config->getAdsense();
?>
</div>
<div class="col-xs-12 col-sm-1 col-md-1 col-lg-1"></div>
<div class="col-xs-12 col-sm-10 col-md-10 col-lg-10 list-group-item">
<?php
Expand Down Expand Up @@ -195,15 +195,15 @@

<div class="clear clearfix">
<h3 class="galleryTitle">
<i class="glyphicon glyphicon-eye-open"></i> <?php echo __("Sort by name"); if(!empty($_GET['page'])){ echo " (Page ".$_GET['page'].")"; } ?>
<i class="glyphicon glyphicon-list-alt"></i> <?php echo __("Sort by name"); if(!empty($_GET['page'])){ echo " (Page ".$_GET['page'].")"; } ?>
</h3>
<div class="row">
<?php
$countCols = 0;
unset($_POST['sort']);
$_POST['sort']['title'] = "ASC";
$_POST['current'] = $_GET['page'];
$_POST['rowCount'] = 12;
$_POST['rowCount'] = $obj->SortByNameRowCount;
$videos = Video::getAllVideos();
foreach ($videos as $value) {
$name = User::getNameIdentificationById($value['users_id']);
Expand Down Expand Up @@ -295,6 +295,7 @@
$countCols = 0;
unset($_POST['sort']);
$_POST['sort']['created'] = 'desc';
$_POST['rowCount'] = $obj->DateAddedRowCount;
$videos = Video::getAllVideos();
foreach ($videos as $value) {
$img_portrait = ($value['rotation'] === "90" || $value['rotation'] === "270") ? "img-portrait" : "";
Expand Down Expand Up @@ -378,15 +379,15 @@
<?php } if($obj->MostWatched) { ?>
<div class="clear clearfix">
<h3 class="galleryTitle">
<i class="glyphicon glyphicon-eye-open"></i> <?php echo __("Most Watched"); if(!empty($_GET['page'])){ echo " (Page ".$_GET['page'].")"; } ?>
<i class="glyphicon glyphicon-eye-open"></i> <?php echo __("Most watched"); if(!empty($_GET['page'])){ echo " (Page ".$_GET['page'].")"; } ?>
</h3>
<div class="row">
<?php
$countCols = 0;
unset($_POST['sort']);
$_POST['sort']['views_count'] = "DESC";
$_POST['sort']['views_count'] = "desc";
$_POST['current'] = $_GET['page'];
$_POST['rowCount'] = 12;
$_POST['rowCount'] = $obj->MostWatchedRowCount;
$videos = Video::getAllVideos();
foreach ($videos as $value) {
$name = User::getNameIdentificationById($value['users_id']);
Expand Down Expand Up @@ -417,65 +418,66 @@
<a href="<?php echo $global['webSiteRootURL']; ?>video/<?php echo $value['clean_title']; ?>" title="<?php echo $value['title']; ?>">
<h2><?php echo $value['title']; ?></h2>
</a>


<div class="text-muted galeryDetails">
<div>
<?php
$value['tags'] = Video::getTags($value['id']);
foreach ($value['tags'] as $value2) {
if ($value2->label === __("Group")) {
?>
<span class="label label-<?php echo $value2->type; ?>"><?php echo $value2->text; ?></span>
<?php
}
}
?>
</div>
<div>
<i class="fa fa-eye"></i>
<span itemprop="interactionCount">
<?php echo number_format($value['views_count'], 0); ?> <?php echo __("Views"); ?>
</span>
</div>
<div>
<i class="fa fa-clock-o"></i>
<?php
echo humanTiming(strtotime($value['videoCreation'])), " ", __('ago');
?>
</div>
<div>
<i class="fa fa-user"></i>
<?php
echo $name;
if((!empty($value['description']))&&($obj->Description)){

<div class="text-muted galeryDetails">
<div>
<?php
$value['tags'] = Video::getTags($value['id']);
foreach ($value['tags'] as $value2) {
if ($value2->label === __("Group")) {
?>
<span class="label label-<?php echo $value2->type; ?>"><?php echo $value2->text; ?></span>
<?php
}
}
?>
</div>
<div>
<i class="fa fa-eye"></i>
<span itemprop="interactionCount">
<?php echo number_format($value['views_count'], 0); ?> <?php echo __("Views"); ?>
</span>
</div>
<div>
<i class="fa fa-clock-o"></i>
<?php
echo humanTiming(strtotime($value['videoCreation'])), " ", __('ago');
?>
</div>
<div class="userName">
<i class="fa fa-user"></i>
<?php
echo $name;
if((!empty($value['description']))&&($obj->Description)){
?>
<button type="button" class="btn btn-xs" data-trigger="focus" data-toggle="popover" data-placement="top" data-html="true" title="<?php echo $value['title']; ?>" data-content="<div><?php echo str_replace('"','&quot;',nl2br(textToLink($value['description']))); ?></div>">Description</button>
<?php } ?>
?>
</div>

</div>
</div>

<?php
}
?>
</div>

</div> <div class="row">
<div class="row">
<ul class="pages">
</ul>
</div></div>
</div>
</div>
<?php } if($obj->MostPopular) { ?>
<div class="clear clearfix">
<h3 class="galleryTitle">
<i class="glyphicon glyphicon-thumbs-up"></i> <?php echo __("Most Popular"); if(!empty($_GET['page'])){ echo " (Page ".$_GET['page'].")"; } ?>
<i class="glyphicon glyphicon-thumbs-up"></i> <?php echo __("Most popular"); if(!empty($_GET['page'])){ echo " (Page ".$_GET['page'].")"; } ?>
</h3>
<div class="row">
<?php
$countCols = 0;
unset($_POST['sort']);
$_POST['sort']['likes'] = "DESC";
$_POST['sort']['likes'] = "desc";
$_POST['current'] = $_GET['page'];
$_POST['rowCount'] = $obj->MostPopularRowCount;
$videos = Video::getAllVideos();
foreach ($videos as $value) {
$name = User::getNameIdentificationById($value['users_id']);
Expand All @@ -493,7 +495,7 @@
$poster = $images->thumbsJpg;
?>
<div class="aspectRatio16_9">
<img src="<?php echo $poster; ?>" alt="<?php echo $value['title']; ?>" class="thumbsJPG img img-responsive <?php echo $img_portrait; ?> rotate<?php echo $value['rotation']; ?>" id="thumbsJPG<?php echo $value['id']; ?>"/>
<img src="<?php echo $poster; ?>" alt="<?php echo $value['title']; ?>" class="thumbsJPG img img-responsive <?php echo $img_portrait; ?> rotate<?php echo $value['rotation']; ?>" id="thumbsJPG<?php echo $value['id']; ?>" />

<?php
if (!empty($imgGif)) {
Expand Down Expand Up @@ -541,36 +543,19 @@
<button type="button" class="btn btn-xs" data-trigger="focus" data-toggle="popover" data-placement="top" data-html="true" title="<?php echo $value['title']; ?>" data-content="<div><?php echo str_replace('"','&quot;',nl2br(textToLink($value['description']))); ?></div>">Description</button>
<?php } ?>
</div>

</div>
<div>
<i class="fa fa-eye"></i>
<span itemprop="interactionCount">
<?php echo number_format($value['views_count'], 0); ?> <?php echo __("Views"); ?>
</span>
</div>
<div>
<i class="fa fa-clock-o"></i>
<?php
echo humanTiming(strtotime($value['videoCreation'])), " ", __('ago');
?>
</div>
<div>
<i class="fa fa-user"></i>
<?php
echo $name;
?>

</div>
</div>
</div>
<?php
}
?>
</div>

<?php
}
?>
</div>
<div class="row">
<ul class="pages">
</ul>
</div>
</div>
<?php } ?>
</div>
<?php
Expand Down

0 comments on commit d047f06

Please sign in to comment.