2022-04-24 08:06:45 +03:00
|
|
|
{var $author = $post->getOwner()}
|
|
|
|
{var $comments = $post->getLastComments(3)}
|
|
|
|
{var $commentsCount = $post->getCommentsCount()}
|
2022-12-17 02:03:02 +03:00
|
|
|
{var $platform = $post->getPlatform()}
|
|
|
|
{var $platformDetails = $post->getPlatformDetails()}
|
2024-11-01 14:46:41 +03:00
|
|
|
{var $likesCount = $post->getLikesCount()}
|
|
|
|
{var $repostsCount = $post->getRepostCount()}
|
|
|
|
{var $canBePinned = $post->canBePinnedBy($thisUser ?? NULL)}
|
|
|
|
{var $canBeDeleted = $post->canBeDeletedBy($thisUser)}
|
|
|
|
{var $wallOwner = $post->getWallOwner()}
|
2022-08-05 23:00:52 +03:00
|
|
|
{if $post->isDeactivationMessage() && $post->getText()}
|
|
|
|
{var $deac = "post_deact"}
|
|
|
|
{else}
|
|
|
|
{var $deac = "post_deact_silent"}
|
|
|
|
{/if}
|
2023-03-29 01:08:01 +03:00
|
|
|
{var $compact = isset($compact) ? true : false}
|
|
|
|
{var $club = isset($club) ? $club}
|
2021-11-28 14:39:42 +03:00
|
|
|
|
2022-05-08 13:06:26 +03:00
|
|
|
{var $commentTextAreaId = $post === NULL ? rand(1,300) : $post->getId()}
|
2021-01-27 20:40:37 +03:00
|
|
|
|
2024-11-17 13:03:49 +03:00
|
|
|
<table border="0" style="font-size: 11px;" data-id="{$post->getPrettyId()}" n:class="post, !$compact ? post-divider, $post->isExplicit() ? post-nsfw">
|
2021-01-27 20:40:37 +03:00
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
<td width="54" valign="top">
|
2022-02-05 20:24:46 +03:00
|
|
|
<a href="{$author->getURL()}">
|
2023-09-14 20:54:22 +03:00
|
|
|
<img src="{$author->getAvatarURL('miniscule')}" width="{if $compact}25{else}50{/if}" class="post-avatar {if $compact}cCompactAvatars{/if}" />
|
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">
|
2023-09-14 20:54:22 +03:00
|
|
|
<a href="{$author->getURL()}"><b class="post-author-name">{$author->getCanonicalName()}</b></a>
|
2022-03-24 15:29:00 +03:00
|
|
|
<img n:if="$author->isVerified()" class="name-checkmark" src="/assets/packages/static/openvk/img/checkmark.png">
|
2023-11-30 17:39:55 +03:00
|
|
|
{$post->isDeactivationMessage() ? ($author->isFemale() ? tr($deac . "_f") : ($author->isNeutral() ? tr($deac . "_g") : tr($deac . "_m")))}
|
|
|
|
{$post->isUpdateAvatarMessage() && !$post->isPostedOnBehalfOfGroup() ? ($author->isFemale() ? tr("upd_f") : ($author->isNeutral() ? tr("upd_n") : tr("upd_m")))}
|
2023-05-14 23:49:33 +03:00
|
|
|
{$post->isUpdateAvatarMessage() && $post->isPostedOnBehalfOfGroup() ? tr("upd_g") : ""}
|
2021-12-08 17:26:56 +03:00
|
|
|
{if ($onWallOf ?? false) &&!$post->isPostedOnBehalfOfGroup() && $post->getOwnerPost() !== $post->getTargetWall()}
|
2022-10-09 11:34:57 +03:00
|
|
|
<a href="{$wallOwner->getURL()}" class="mention" data-mention-ref="{$post->getTargetWall()}">
|
2021-12-08 17:26:56 +03:00
|
|
|
<b>
|
2022-10-08 23:47:21 +03:00
|
|
|
{if isset($thisUser) && $thisUser->getId() === $post->getTargetWall()}
|
|
|
|
{_post_on_your_wall}
|
|
|
|
{elseif $wallOwner instanceof \openvk\Web\Models\Entities\Club}
|
|
|
|
{tr("post_on_group_wall", ovk_proc_strtr($wallOwner->getName(), 52))}
|
|
|
|
{else}
|
|
|
|
{tr("post_on_user_wall", $wallOwner->getMorphedName("genitive", false))}
|
2021-12-08 17:26:56 +03:00
|
|
|
{/if}
|
|
|
|
</b>
|
|
|
|
</a>
|
|
|
|
{/if}
|
2021-01-27 20:40:37 +03:00
|
|
|
|
2023-03-29 01:08:01 +03:00
|
|
|
{if $compact}
|
2022-03-24 15:29:00 +03:00
|
|
|
<br>
|
|
|
|
<a href="/wall{$post->getPrettyId()}" class="date">
|
|
|
|
{$post->getPublicationTime()}
|
|
|
|
</a>
|
2023-03-29 01:08:01 +03:00
|
|
|
{/if}
|
2022-03-24 15:29:00 +03:00
|
|
|
|
|
|
|
<span n:if="$post->isPinned()" class="nobold">{_pinned}</span>
|
|
|
|
|
2024-11-01 14:46:41 +03:00
|
|
|
<a n:if="$canBeDeleted && !($forceNoDeleteLink ?? false) && $compact == false" class="delete" href="/wall{$post->getPrettyId()}/delete"></a>
|
2021-09-20 16:46:55 +03:00
|
|
|
|
2024-11-01 14:46:41 +03:00
|
|
|
{if $canBePinned && !($forceNoPinLink ?? false) && $compact == false}
|
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}
|
2023-09-14 20:54:22 +03:00
|
|
|
|
|
|
|
{if $post->canBeEditedBy($thisUser) && !($forceNoEditLink ?? false) && $compact == false}
|
2024-11-17 13:03:49 +03:00
|
|
|
<a class="edit" id="editPost"></a>
|
2023-09-14 20:54:22 +03:00
|
|
|
{/if}
|
2021-01-27 20:40:37 +03:00
|
|
|
</div>
|
2024-11-17 13:03:49 +03:00
|
|
|
<div class="post-content" id="{$post->getPrettyId()}" data-localized-nsfw-text="{_nsfw_warning}">
|
2023-11-16 19:44:12 +03:00
|
|
|
<div class="text" id="text{$post->getPrettyId()}">
|
2023-09-16 19:14:23 +03:00
|
|
|
<span data-text="{$post->getText(false)}" class="really_text">{$post->getText()|noescape}</span>
|
2023-10-03 19:40:13 +03:00
|
|
|
|
|
|
|
{var $width = ($GLOBALS["_bigWall"] ?? false) ? 550 : 320}
|
|
|
|
{if isset($GLOBALS["_nesAttGloCou"])}
|
|
|
|
{var $width = $width - 70 * $GLOBALS["_nesAttGloCou"]}
|
|
|
|
{/if}
|
|
|
|
{var $attachmentsLayout = $post->getChildrenWithLayout($width)}
|
|
|
|
<div n:ifcontent class="attachments attachments_b" style="height: {$attachmentsLayout->height|noescape}; width: {$attachmentsLayout->width|noescape};">
|
2024-11-17 13:03:49 +03:00
|
|
|
<div class="attachment" n:foreach="$attachmentsLayout->tiles as $attachment" style="float: {$attachment[3]|noescape}; width: {$attachment[0]|noescape}; height: {$attachment[1]|noescape};">
|
|
|
|
{include "../attachment.xml", attachment => $attachment[2], parent => $post, parentType => "post", tilesCount => sizeof($attachmentsLayout->tiles)}
|
2023-10-03 19:40:13 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
2023-09-14 20:54:22 +03:00
|
|
|
|
2023-10-03 19:40:13 +03:00
|
|
|
<div n:ifcontent class="attachments attachments_m">
|
|
|
|
<div class="attachment" n:foreach="$attachmentsLayout->extras as $attachment">
|
|
|
|
{include "../attachment.xml", attachment => $attachment, post => $post}
|
2021-01-27 20:40:37 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div n:if="$post->isAd()" style="color:grey;">
|
|
|
|
<br/>
|
2023-09-17 16:22:59 +03:00
|
|
|
! {_post_is_ad}
|
2021-01-27 20:40:37 +03:00
|
|
|
</div>
|
2024-11-01 14:46:41 +03:00
|
|
|
<div n:if="$post->hasSource()" class="sourceDiv">
|
|
|
|
<span>{_source}: {$post->getSource(true)|noescape}</span>
|
|
|
|
</div>
|
2021-01-27 20:40:37 +03:00
|
|
|
<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>
|
2023-11-16 19:44:12 +03:00
|
|
|
<div class="authorIcon"></div>
|
|
|
|
<a href="{$actualAuthor->getURL()}" class="mention authorName" data-mention-ref="{$actualAuthor->getId()}">
|
2022-03-24 15:29:00 +03:00
|
|
|
{$actualAuthor->getCanonicalName()}
|
2021-01-27 20:40:37 +03:00
|
|
|
</a>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
2024-11-17 13:03:49 +03:00
|
|
|
<div class='post-edit' n:if='!$compact'></div>
|
2023-03-29 01:08:01 +03:00
|
|
|
<div class="post-menu" n:if="$compact == false">
|
2023-11-16 19:44:12 +03:00
|
|
|
<a href="{if !$suggestion}/wall{$post->getPrettyId()}{else}javascript:void(0){/if}" class="date">{$post->getPublicationTime()}
|
2023-09-14 20:54:22 +03:00
|
|
|
<span n:if="$post->getEditTime()" class="edited editedMark">({_edited_short})</span>
|
|
|
|
</a>
|
2023-11-16 19:44:12 +03:00
|
|
|
|
2022-12-17 02:03:02 +03:00
|
|
|
<a n:if="!empty($platform)" class="client_app" data-app-tag="{$platform}" data-app-name="{$platformDetails['name']}" data-app-url="{$platformDetails['url']}" data-app-img="{$platformDetails['img']}">
|
|
|
|
<img src="/assets/packages/static/openvk/img/app_icons_mini/{$post->getPlatform(this)}.svg">
|
|
|
|
</a>
|
2021-01-27 20:40:37 +03:00
|
|
|
{if isset($thisUser)}
|
|
|
|
|
2023-09-14 20:54:22 +03:00
|
|
|
|
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">
|
2024-11-17 13:03:49 +03:00
|
|
|
<a n:if="!($forceNoShareLink ?? false)" id="reposts{$post->getPrettyId()}" class="post-share-button" href="javascript:repost('{$post->getPrettyId()}', 'post')">
|
2022-03-24 15:29:00 +03:00
|
|
|
<div class="repost-icon" style="opacity: 0.4;"></div>
|
2024-11-01 14:46:41 +03:00
|
|
|
<span class="likeCnt" id="repostsCount{$post->getPrettyId()}">{if $repostsCount > 0}{$repostsCount}{/if}</span>
|
2022-03-24 15:29:00 +03:00
|
|
|
</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)}
|
2024-11-22 21:27:21 +03:00
|
|
|
<a href="/wall{$post->getPrettyId()}/like?hash={rawurlencode($csrfToken)}" class="post-like-button" data-liked="{(int) $liked}" data-likes="{$likesCount}" data-id="{$post->getPrettyId()}" data-type='post'>
|
2021-12-26 14:05:22 +03:00
|
|
|
<div class="heart" id="{if $liked}liked{/if}"></div>
|
2024-11-01 14:46:41 +03:00
|
|
|
<span class="likeCnt">{if $likesCount > 0}{$likesCount}{/if}</span>
|
2021-12-26 14:05:22 +03:00
|
|
|
</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>
|
2024-11-01 14:46:41 +03:00
|
|
|
<div n:if="$suggestion && $canBePinned" class="suggestionControls">
|
2023-11-16 19:44:12 +03:00
|
|
|
<input type="button" class="button" id="publish_post" data-id="{$post->getId()}" value="{_publish_suggested}">
|
|
|
|
<input type="button" class="button" id="decline_post" data-id="{$post->getId()}" value="{_decline_suggested}">
|
|
|
|
</div>
|
2021-01-27 20:40:37 +03:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|