mirror of
https://github.com/WerySkok/nativegallery.git
synced 2024-11-15 03:31:19 +03:00
add photos limit
This commit is contained in:
parent
7a86eb54be
commit
a571c79dd7
4 changed files with 25 additions and 3 deletions
|
@ -1,5 +1,7 @@
|
||||||
ngallery:
|
ngallery:
|
||||||
root:
|
root:
|
||||||
|
title: "NativeGallery"
|
||||||
|
logo: "/static/img/logosmall.png"
|
||||||
maintenance: false
|
maintenance: false
|
||||||
debug: true
|
debug: true
|
||||||
botkey: ''
|
botkey: ''
|
||||||
|
|
|
@ -4,6 +4,19 @@ use \App\Services\Auth;
|
||||||
use \App\Models\User;
|
use \App\Models\User;
|
||||||
|
|
||||||
$user = new \App\Models\User(Auth::userid());
|
$user = new \App\Models\User(Auth::userid());
|
||||||
|
|
||||||
|
if (NGALLERY['root']['logo'] != null) {
|
||||||
|
$logo = NGALLERY['root']['logo'];
|
||||||
|
} else {
|
||||||
|
$logo = '/static/img/logosmall.png';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (NGALLERY['root']['title'] != null) {
|
||||||
|
$title = NGALLERY['root']['title'];
|
||||||
|
} else {
|
||||||
|
$title = 'NativeGallery';
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="mm-bar">
|
<td class="mm-bar">
|
||||||
|
@ -83,5 +96,5 @@ $user = new \App\Models\User(Auth::userid());
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="/" id="title"><img src="/static/img/logosmall.png" alt="TransPhoto"><span>NativeGallery</span></a></td>
|
<td><a href="/" id="title"><img src="<?=$logo?>" alt="<?=$title?>"><span><?=$title?></span></a></td>
|
||||||
</tr>
|
</tr>
|
|
@ -138,7 +138,7 @@ use App\Models\{User, Vote, Comment};
|
||||||
<h4 style="clear:both"><a href="/update.php?time=72">Недавно добавленные фотографии</a></h4>
|
<h4 style="clear:both"><a href="/update.php?time=72">Недавно добавленные фотографии</a></h4>
|
||||||
<div id="recent-photos" class="ix-photos ix-photos-multiline" lastpid="1970527" firstpid="1970550">
|
<div id="recent-photos" class="ix-photos ix-photos-multiline" lastpid="1970527" firstpid="1970550">
|
||||||
<?php
|
<?php
|
||||||
$photos = DB::query('SELECT * FROM photos ORDER BY id DESC');
|
$photos = DB::query('SELECT * FROM photos ORDER BY id DESC LIMIT 30');
|
||||||
foreach ($photos as $p) {
|
foreach ($photos as $p) {
|
||||||
$bck = 'background-image:url("' . $p['photourl'] . '")';
|
$bck = 'background-image:url("' . $p['photourl'] . '")';
|
||||||
echo ' <div class="prw-grid-item">
|
echo ' <div class="prw-grid-item">
|
||||||
|
|
|
@ -111,7 +111,14 @@ $photouser = new \App\Models\User($photo->i('user_id'));
|
||||||
<div>
|
<div>
|
||||||
<div style="padding-top:8px"><?= $photo->content('comment') ?></div>
|
<div style="padding-top:8px"><?= $photo->content('comment') ?></div>
|
||||||
</div><br>
|
</div><br>
|
||||||
<div>Прислал <a href="/author/<?= $photo->i('user_id') ?>/"><?= $photouser->i('username') ?></a> Дата: <b><?= Date::zmdate($photo->i('posted_at')) ?></b></div>
|
<?php
|
||||||
|
if ($photo->i('posted_at') === 943909200) {
|
||||||
|
$date = 'не указана';
|
||||||
|
} else {
|
||||||
|
$date = Date::zmdate($photo->i('posted_at'));
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<div>Прислал <a href="/author/<?= $photo->i('user_id') ?>/"><?= $photouser->i('username') ?></a> Дата: <b><?= $date ?></b></div>
|
||||||
<table id="pp-items">
|
<table id="pp-items">
|
||||||
<tr>
|
<tr>
|
||||||
<td id="pp-left-col">
|
<td id="pp-left-col">
|
||||||
|
|
Loading…
Reference in a new issue