mirror of
https://github.com/openvk/openvk
synced 2024-11-15 03:31:18 +03:00
Compare commits
3 commits
c6a77de234
...
aca48e726e
Author | SHA1 | Date | |
---|---|---|---|
|
aca48e726e | ||
|
beb8b4eaa6 | ||
|
5401871b38 |
5 changed files with 13 additions and 4 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -14,3 +14,5 @@ themepacks/*
|
|||
!themepacks/midnight
|
||||
storage/*
|
||||
!storage/.gitkeep
|
||||
|
||||
.idea
|
|
@ -283,6 +283,14 @@ class Photo extends Media
|
|||
return [$x, $y];
|
||||
}
|
||||
|
||||
function getPageURL(): string
|
||||
{
|
||||
if($this->isAnonymous())
|
||||
return "/photos/" . base_convert((string) $this->getId(), 10, 32);
|
||||
|
||||
return "/photo" . $this->getPrettyId();
|
||||
}
|
||||
|
||||
function getAlbum(): ?Album
|
||||
{
|
||||
return (new Albums)->getAlbumByPhotoId($this);
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
{if $attachment instanceof \openvk\Web\Models\Entities\Photo}
|
||||
{if !$attachment->isDeleted()}
|
||||
{var $link = "/photo" . ($attachment->isAnonymous() ? ("s/" . base_convert((string) $attachment->getId(), 10, 32)) : $attachment->getPrettyId())}
|
||||
<a href="{$link}">
|
||||
<a href="{$attachment->getPageUrl()}">
|
||||
<img class="media" src="{$attachment->getURLBySizeId('normal')}" alt="{$attachment->getDescription()}" />
|
||||
</a>
|
||||
{else}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{var $user = $notification->getModel(0)}
|
||||
{var $post = $notification->getModel(1)}
|
||||
|
||||
{_nt_you_were_mentioned_u} <a href="{$user->getURL()}"><b>{$user->getCanonicalName()}</b></a> {$notification->getDateTime()} <a href="/photo{$post->getURL()}"><b>{_nt_mention_in_photo}</b></a>: "{$notification->getData()}"
|
||||
{_nt_you_were_mentioned_u} <a href="{$user->getURL()}"><b>{$user->getCanonicalName()}</b></a> {$notification->getDateTime()} <a href="/photo{$post->getPageURL()}"><b>{_nt_mention_in_photo}</b></a>: "{$notification->getData()}"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
"__locale" = "en_US.UTF-8;Eng";
|
||||
"__transNames" = "Russian-Latin/BGN; Any-Latin";
|
||||
"__transNames" = "[\P{script=Han}]; Russian-Latin/BGN; Any-Latin";
|
||||
|
||||
/* Check for https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html */
|
||||
|
||||
|
|
Loading…
Reference in a new issue