2022-04-24 08:06:45 +03:00
|
|
|
{var $author = $post->getOwner()}
|
|
|
|
{var $comments = $post->getLastComments(3)}
|
|
|
|
{var $commentsCount = $post->getCommentsCount()}
|
2021-11-28 14:39:42 +03:00
|
|
|
|
2022-04-24 08:06:45 +03:00
|
|
|
{var $commentTextAreaId = $post === null ? rand(1,300) : $post->getId()}
|
2021-01-27 20:40:37 +03:00
|
|
|
|
|
|
|
<table border="0" style="font-size: 11px;" n:class="post, !$compact ? post-divider, $post->isExplicit() ? post-nsfw">
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
2022-04-26 12:07:41 +03:00
|
|
|
<td width="{ifset $compact}27{else}54{/ifset}" style="{ifset $compact}display: block;{/ifset}" valign="top">
|
2022-02-05 20:24:46 +03:00
|
|
|
<a href="{$author->getURL()}">
|
2022-04-05 14:39:13 +03:00
|
|
|
<img src="{$author->getAvatarURL('miniscule')}" width="{ifset $compact}25{else}50{/ifset}" {ifset $compact}class="cCompactAvatars"{/ifset} />
|
2022-03-24 15:29:00 +03:00
|
|
|
<span n:if="!$post->isPostedOnBehalfOfGroup() && !$compact && $author->isOnline()" class="post-online">{_online}</span>
|
2022-02-05 20:24:46 +03:00
|
|
|
</a>
|
2021-01-27 20:40:37 +03:00
|
|
|
</td>
|
|
|
|
<td width="100%" valign="top">
|
|
|
|
<div class="post-author">
|
2022-03-24 15:29:00 +03:00
|
|
|
<a href="{$author->getURL()}"><b>{$author->getCanonicalName()}</b></a>
|
|
|
|
<img n:if="$author->isVerified()" class="name-checkmark" src="/assets/packages/static/openvk/img/checkmark.png">
|
2021-12-08 17:26:56 +03:00
|
|
|
{if ($onWallOf ?? false) &&!$post->isPostedOnBehalfOfGroup() && $post->getOwnerPost() !== $post->getTargetWall()}
|
2022-04-24 08:06:45 +03:00
|
|
|
{var $wallId = $post->getTargetWall()}
|
|
|
|
{var $wallURL = $wallId > -1 ? "/id$wallId" : "/club" . abs($wallId)}
|
2021-12-08 17:26:56 +03:00
|
|
|
на
|
|
|
|
<a href="{$wallURL}">
|
|
|
|
<b>
|
|
|
|
{if isset($thisUser) && $thisUser->getId() === $wallId}
|
|
|
|
вашей
|
|
|
|
{/if}
|
|
|
|
стене
|
|
|
|
{if $wallId < 0}
|
|
|
|
группы
|
|
|
|
{/if}
|
|
|
|
</b>
|
|
|
|
</a>
|
|
|
|
{/if}
|
2021-01-27 20:40:37 +03:00
|
|
|
|
2022-03-24 15:29:00 +03:00
|
|
|
{ifset $compact}
|
|
|
|
<br>
|
|
|
|
<a href="/wall{$post->getPrettyId()}" class="date">
|
|
|
|
{$post->getPublicationTime()}
|
|
|
|
</a>
|
2021-01-27 20:40:37 +03:00
|
|
|
{/ifset}
|
2022-03-24 15:29:00 +03:00
|
|
|
|
|
|
|
<span n:if="$post->isPinned()" class="nobold">{_pinned}</span>
|
|
|
|
|
|
|
|
<a n:if="$post->canBeDeletedBy($thisUser) && !($forceNoDeleteLink ?? false) && !isset($compact)" class="delete" href="/wall{$post->getPrettyId()}/delete"></a>
|
2021-09-20 16:46:55 +03:00
|
|
|
|
|
|
|
{if $post->canBePinnedBy($thisUser) && !($forceNoPinLink ?? false) && !isset($compact)}
|
2021-09-20 15:19:15 +03:00
|
|
|
{if $post->isPinned()}
|
2021-10-09 11:22:08 +03:00
|
|
|
<a class="pin" href="/wall{$post->getPrettyId()}/pin?act=unpin&hash={rawurlencode($csrfToken)}"></a>
|
2021-09-20 15:19:15 +03:00
|
|
|
{else}
|
2021-10-09 11:22:08 +03:00
|
|
|
<a class="pin" href="/wall{$post->getPrettyId()}/pin?act=pin&hash={rawurlencode($csrfToken)}"></a>
|
2021-09-20 15:19:15 +03:00
|
|
|
{/if}
|
2021-01-27 20:40:37 +03:00
|
|
|
{/if}
|
|
|
|
</div>
|
|
|
|
<div class="post-content" id="{$post->getPrettyId()}">
|
|
|
|
<div class="text" id="text{$post->getPrettyId()}">
|
|
|
|
{$post->getText()|noescape}
|
|
|
|
|
|
|
|
<div n:ifcontent class="attachments_b">
|
|
|
|
<div class="attachment" n:foreach="$post->getChildren() as $attachment" data-localized-nsfw-text="{_nsfw_warning}">
|
|
|
|
{include "../attachment.xml", attachment => $attachment}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div n:if="$post->isAd()" style="color:grey;">
|
|
|
|
<br/>
|
|
|
|
! Этот пост был размещён за взятку.
|
|
|
|
</div>
|
|
|
|
<div n:if="$post->isSigned()" class="post-signature">
|
2022-04-24 08:06:45 +03:00
|
|
|
{var $actualAuthor = $post->getOwner(false)}
|
2021-01-27 20:40:37 +03:00
|
|
|
<span>
|
2022-03-24 15:29:00 +03:00
|
|
|
{_author}:
|
|
|
|
<a href="{$actualAuthor->getURL()}">
|
|
|
|
{$actualAuthor->getCanonicalName()}
|
2021-01-27 20:40:37 +03:00
|
|
|
</a>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="post-menu" n:if="!isset($compact)">
|
|
|
|
<a href="/wall{$post->getPrettyId()}" class="date">{$post->getPublicationTime()}</a>
|
|
|
|
{if isset($thisUser)}
|
|
|
|
|
|
|
|
|
2022-03-24 15:29:00 +03:00
|
|
|
<a n:if="!($forceNoCommentsLink ?? false) && $commentsCount == 0" href="javascript:expand_comment_textarea({$commentTextAreaId})">{_comment}</a>
|
2021-01-27 20:40:37 +03:00
|
|
|
|
|
|
|
<div class="like_wrap">
|
2022-03-24 15:29:00 +03:00
|
|
|
<a n:if="!($forceNoShareLink ?? false)" class="post-share-button" href="javascript:repostPost('{$post->getPrettyId()}', '{rawurlencode($csrfToken)}')">
|
|
|
|
<div class="repost-icon" style="opacity: 0.4;"></div>
|
|
|
|
<span class="likeCnt">{if $post->getRepostCount() > 0}{$post->getRepostCount()}{/if}</span>
|
|
|
|
</a>
|
2021-01-27 20:40:37 +03:00
|
|
|
|
2021-12-26 14:05:22 +03:00
|
|
|
{if !($forceNoLike ?? false)}
|
2022-04-24 08:06:45 +03:00
|
|
|
{var $liked = $post->hasLikeFrom($thisUser)}
|
2022-03-24 15:29:00 +03:00
|
|
|
<a href="/wall{$post->getPrettyId()}/like?hash={rawurlencode($csrfToken)}" class="post-like-button" data-liked="{(int) $liked}" data-likes="{$post->getLikesCount()}">
|
2021-12-26 14:05:22 +03:00
|
|
|
<div class="heart" id="{if $liked}liked{/if}"></div>
|
|
|
|
<span class="likeCnt">{if $post->getLikesCount() > 0}{$post->getLikesCount()}{/if}</span>
|
|
|
|
</a>
|
|
|
|
{/if}
|
2021-01-27 20:40:37 +03:00
|
|
|
</div>
|
|
|
|
{/if}
|
|
|
|
</div>
|
2022-03-24 15:29:00 +03:00
|
|
|
<div n:if="!($forceNoCommentsLink ?? false) && $commentSection == true && $compact == false" class="post-menu-s">
|
|
|
|
<a n:if="$commentsCount > 3" href="/wall{$post->getPrettyId()}" class="expand_button">{_view_other_comments}</a>
|
|
|
|
{foreach $comments as $comment}
|
|
|
|
{include "../comment.xml", comment => $comment, $compact => true}
|
|
|
|
{/foreach}
|
|
|
|
<div n:ifset="$thisUser" id="commentTextArea{$commentTextAreaId}" n:attr="style => ($commentsCount == 0 ? 'display: none;')" class="commentsTextFieldWrap">
|
2022-04-24 08:06:45 +03:00
|
|
|
{var $commentsURL = "/al_comments/create/posts/" . $post->getId()}
|
|
|
|
{var $club = is_null($club) ? ($post->getTargetWall() < 0 ? (new openvk\Web\Models\Repositories\Clubs)->get(abs($post->getTargetWall())) : NULL) : $club}
|
2022-03-24 15:29:00 +03:00
|
|
|
{include "../textArea.xml", route => $commentsURL, postOpts => false, graffiti => (bool) ovkGetQuirk("comments.allow-graffiti"), post => $post, club => $club}
|
2021-11-28 14:39:42 +03:00
|
|
|
</div>
|
2022-03-24 15:29:00 +03:00
|
|
|
</div>
|
2021-01-27 20:40:37 +03:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|