From a571c79dd76741a5d2155ff56b8bed8bb5240098 Mon Sep 17 00:00:00 2001 From: themohooks <81331307+themohooks@users.noreply.github.com> Date: Sat, 6 Jul 2024 10:28:50 +0300 Subject: [PATCH] add photos limit --- ngallery-example.yaml | 2 ++ views/components/Navbar.php | 15 ++++++++++++++- views/pages/Main.php | 2 +- views/pages/Photo.php | 9 ++++++++- 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/ngallery-example.yaml b/ngallery-example.yaml index 17021fe..7c4e227 100644 --- a/ngallery-example.yaml +++ b/ngallery-example.yaml @@ -1,5 +1,7 @@ ngallery: root: + title: "NativeGallery" + logo: "/static/img/logosmall.png" maintenance: false debug: true botkey: '' diff --git a/views/components/Navbar.php b/views/components/Navbar.php index d170d65..13bd6bc 100644 --- a/views/components/Navbar.php +++ b/views/components/Navbar.php @@ -4,6 +4,19 @@ use \App\Services\Auth; use \App\Models\User; $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'; +} + ?> @@ -83,5 +96,5 @@ $user = new \App\Models\User(Auth::userid()); - TransPhotoNativeGallery + <?=$title?> \ No newline at end of file diff --git a/views/pages/Main.php b/views/pages/Main.php index fd2dac8..dafed5d 100644 --- a/views/pages/Main.php +++ b/views/pages/Main.php @@ -138,7 +138,7 @@ use App\Models\{User, Vote, Comment};

Недавно добавленные фотографии

diff --git a/views/pages/Photo.php b/views/pages/Photo.php index 79c89f4..f174ab5 100644 --- a/views/pages/Photo.php +++ b/views/pages/Photo.php @@ -111,7 +111,14 @@ $photouser = new \App\Models\User($photo->i('user_id'));
content('comment') ?>

-
Прислал i('username') ?>          Дата: i('posted_at')) ?>
+ i('posted_at') === 943909200) { + $date = 'не указана'; + } else { + $date = Date::zmdate($photo->i('posted_at')); + } + ?> +
Прислал i('username') ?>          Дата: