openvk/Web/Presenters/templates/components/post/oldpost.xml

169 lines
9.8 KiB
XML
Raw Normal View History

2022-04-24 08:06:45 +03:00
{var $author = $post->getOwner()}
2022-12-17 02:03:02 +03:00
{var $platform = $post->getPlatform()}
{var $platformDetails = $post->getPlatformDetails()}
2022-08-05 23:00:52 +03:00
{if $post->isDeactivationMessage() && $post->getText()}
{var $deac = "post_deact"}
{else}
{var $deac = "post_deact_silent"}
{/if}
2021-01-27 20:40:37 +03:00
2021-01-27 20:40:37 +03:00
<table border="0" style="font-size: 11px;" n:class="post, $post->isExplicit() ? post-nsfw">
<tbody>
<tr>
<td width="54" valign="top">
<a href="{$author->getURL()}">
<img src="{$author->getAvatarURL('miniscule')}" class="post-avatar" width="50" />
<span n:if="!$post->isPostedOnBehalfOfGroup() && !($compact ?? false) && $author->isOnline()" class="post-online">{_online}</span>
</a>
2021-01-27 20:40:37 +03:00
</td>
<td width="100%" valign="top">
<div class="post-author">
<a href="{$author->getURL()}"><b class="post-author-name">{$author->getCanonicalName()}</b></a>
<img n:if="$author->isVerified()" class="name-checkmark" src="/assets/packages/static/openvk/img/checkmark.png">
{if $post->isDeactivationMessage()}
{$author->isFemale() ? tr($deac . "_f") : tr($deac . "_m")}
{elseif $post->isUpdateAvatarMessage() && !$post->isPostedOnBehalfOfGroup()}
{$author->isFemale() ? tr("upd_f") : tr("upd_m")}
{elseif $post->isUpdateAvatarMessage() && $post->isPostedOnBehalfOfGroup()}
{tr("upd_g")}
{elseif $post->isPostedOnBehalfOfGroup()}
{_post_writes_g}
{else}
{if $author->isFemale()}
{_post_writes_f}
{elseif $author->isNeutral()}
{_post_writes_g}
{else}
{_post_writes_m}
{/if}
{/if}
2021-01-27 20:40:37 +03:00
{if ($onWallOf ?? false) &&!$post->isPostedOnBehalfOfGroup() && $post->getOwnerPost() !== $post->getTargetWall()}
{var $wallOwner = $post->getWallOwner()}
<a href="{$wallOwner->getURL()}" class="mention" data-mention-ref="{$post->getTargetWall()}">
2021-01-27 20:40:37 +03:00
<b>
{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-01-27 20:40:37 +03:00
{/if}
</b>
</a>
{/if}
<br/>
Groups: Wall: add suggestions (#935) * Wall: add early suggestions * Fix br * Fix empty posts * fck * Add offset for api * Add notifications of new suggestion posts * Fix mentions in suggested posts * 🤮🤢 * Change regex Теперь оно удаляет все теги а не только <br> * Add da koroche pohuy * Эдд апи метходс Методы нестандартные немного * Pon * Add skloneniyia * newlines * int * Update loaders and add avtopodgruzka postov * Update JOERGK.strings * Blin * Remove repeated code, fix loaded buttons on chr... ...ome and fix getting suggested posts via API.Wall.getPost * Fix polls * Fihes Теперь уведомление о принятии поста не приходит, если вы приняли свой же пост Пофикшен баг перехода в предложку Добавлен старый вид постов в предложке Теперь счётчик постов в предложке у прикреплённой группы обновляется при принятии или отклонении поста Убрано всплывающее уведомление об отклонении поста (оно раздражает) Теперь если вы посмотрели все посты на одной странице (не на первой) и на ней не осталось постов, вас телепортирует на предыдущую страницу * Remove ability to delete your accepted psto * oi blin * Improvements 2 api * g * openvk.uk Возможно, приведение кода к кодстайлу (удаление скобочек то есть) * aiaks * al_wall.js -> al_suggestions.js * 👨‍💻 Add 👨‍💻 fading 👨‍💻 * Add "owner's posts' and "other's posts" Давайте рофлить👨‍💻👨‍💻👨‍💻 * planshet openvk Add tabs for post view, add signer's object in wall get and add person icon in microblog * Simplefai ze kod * PHP 8 FIX WATAFAK * Add indesk
2023-11-16 19:44:12 +03:00
<a href="{if !$suggestion}/wall{$post->getPrettyId()}{else}javascript:void(0){/if}" class="date">
{$post->getPublicationTime()} <span n:if="$post->getEditTime()" class="editedMark">({_edited_short})</span>{if $post->isPinned()}, {_pinned}{/if}
Groups: Wall: add suggestions (#935) * Wall: add early suggestions * Fix br * Fix empty posts * fck * Add offset for api * Add notifications of new suggestion posts * Fix mentions in suggested posts * 🤮🤢 * Change regex Теперь оно удаляет все теги а не только <br> * Add da koroche pohuy * Эдд апи метходс Методы нестандартные немного * Pon * Add skloneniyia * newlines * int * Update loaders and add avtopodgruzka postov * Update JOERGK.strings * Blin * Remove repeated code, fix loaded buttons on chr... ...ome and fix getting suggested posts via API.Wall.getPost * Fix polls * Fihes Теперь уведомление о принятии поста не приходит, если вы приняли свой же пост Пофикшен баг перехода в предложку Добавлен старый вид постов в предложке Теперь счётчик постов в предложке у прикреплённой группы обновляется при принятии или отклонении поста Убрано всплывающее уведомление об отклонении поста (оно раздражает) Теперь если вы посмотрели все посты на одной странице (не на первой) и на ней не осталось постов, вас телепортирует на предыдущую страницу * Remove ability to delete your accepted psto * oi blin * Improvements 2 api * g * openvk.uk Возможно, приведение кода к кодстайлу (удаление скобочек то есть) * aiaks * al_wall.js -> al_suggestions.js * 👨‍💻 Add 👨‍💻 fading 👨‍💻 * Add "owner's posts' and "other's posts" Давайте рофлить👨‍💻👨‍💻👨‍💻 * planshet openvk Add tabs for post view, add signer's object in wall get and add person icon in microblog * Simplefai ze kod * PHP 8 FIX WATAFAK * Add indesk
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-09-20 15:19:15 +03:00
</a>
2021-01-27 20:40:37 +03:00
</div>
<div class="post-content" id="{$post->getPrettyId()}">
Groups: Wall: add suggestions (#935) * Wall: add early suggestions * Fix br * Fix empty posts * fck * Add offset for api * Add notifications of new suggestion posts * Fix mentions in suggested posts * 🤮🤢 * Change regex Теперь оно удаляет все теги а не только <br> * Add da koroche pohuy * Эдд апи метходс Методы нестандартные немного * Pon * Add skloneniyia * newlines * int * Update loaders and add avtopodgruzka postov * Update JOERGK.strings * Blin * Remove repeated code, fix loaded buttons on chr... ...ome and fix getting suggested posts via API.Wall.getPost * Fix polls * Fihes Теперь уведомление о принятии поста не приходит, если вы приняли свой же пост Пофикшен баг перехода в предложку Добавлен старый вид постов в предложке Теперь счётчик постов в предложке у прикреплённой группы обновляется при принятии или отклонении поста Убрано всплывающее уведомление об отклонении поста (оно раздражает) Теперь если вы посмотрели все посты на одной странице (не на первой) и на ней не осталось постов, вас телепортирует на предыдущую страницу * Remove ability to delete your accepted psto * oi blin * Improvements 2 api * g * openvk.uk Возможно, приведение кода к кодстайлу (удаление скобочек то есть) * aiaks * al_wall.js -> al_suggestions.js * 👨‍💻 Add 👨‍💻 fading 👨‍💻 * Add "owner's posts' and "other's posts" Давайте рофлить👨‍💻👨‍💻👨‍💻 * planshet openvk Add tabs for post view, add signer's object in wall get and add person icon in microblog * Simplefai ze kod * PHP 8 FIX WATAFAK * Add indesk
2023-11-16 19:44:12 +03:00
<div class="text" id="text{$post->getPrettyId()}">
{var $owner = $author->getId()}
<span data-text="{$post->getText(false)}" class="really_text">{$post->getText()|noescape}</span>
[WIP] Textarea: Upload multiple pictures (#800) * VKAPI: Fix bug when DELETED user appear if there is no user_ids * Textarea: Make multiple attachments * постмодернистское искусство * Use only attachPic for grabbing pic attachments TODO throw flashFail on bruh moment with pic attachments * draft masonry picture layout in posts xddd где мои опиаты??? * fix funny typos in computeMasonryLayout * Fix video bruh moment in textarea * Posts: add multiple kakahi for microblog * Photo: Add minimal implementation of миниатюра открывашка Co-authored-by: Daniel <60743585+myslivets@users.noreply.github.com> * Photo: Add ability to slide trough photos in one post This also gives ability to easily implement comments and actions * Photo: The Fxck Is This implementation of comments under photo in viewer * FloatingPhotoViewer: Better CSS - Fix that details background issue - Make slide buttons slightly shorter by height * FloatingPhotoViewer: Refactor, and make it better - Now you can actually check the comments under EVERY photo - Fix for textarea. Now you can publish comments * Fix funny typos xddd * Kinda fix poll display in non-microblog posts * Posts: Fix poll display in microblog posts * Add photos picker (#986) * early implementation of photos pickir Добавлен пикер фоточек и быстрая загрузка фото. Так же пофикшен просмотрщик фото в группах. Но, правда, я сломал копипейст, но это ладн. * Fiks fotos viver four coments. * Add picking photos from clubs albums Копипейст и граффити так и не пофикшены * Fix graffiti and copypaste Какого-то хуя копипаста у постов срабатывает два раза. * some fixesx * dragon drop * Fix PHP 8 compatibility * 5 (#988) --------- Co-authored-by: celestora <kitsuruko@gmail.com> Co-authored-by: Daniel <60743585+myslivets@users.noreply.github.com> Co-authored-by: lalka2016 <99399973+lalka2016@users.noreply.github.com> Co-authored-by: Alexander Minkin <weryskok@gmail.com>
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};">
<div class="attachment" n:foreach="$attachmentsLayout->tiles as $attachment" style="float: {$attachment[3]|noescape}; width: {$attachment[0]|noescape}; height: {$attachment[1]|noescape};" data-localized-nsfw-text="{_nsfw_warning}">
{include "../attachment.xml", attachment => $attachment[2], parent => $post, parentType => "post"}
</div>
</div>
<div n:ifcontent class="attachments attachments_m">
<div class="attachment" n:foreach="$attachmentsLayout->extras as $attachment">
2021-01-27 20:40:37 +03:00
{include "../attachment.xml", attachment => $attachment}
</div>
</div>
</div>
Groups: Wall: add suggestions (#935) * Wall: add early suggestions * Fix br * Fix empty posts * fck * Add offset for api * Add notifications of new suggestion posts * Fix mentions in suggested posts * 🤮🤢 * Change regex Теперь оно удаляет все теги а не только <br> * Add da koroche pohuy * Эдд апи метходс Методы нестандартные немного * Pon * Add skloneniyia * newlines * int * Update loaders and add avtopodgruzka postov * Update JOERGK.strings * Blin * Remove repeated code, fix loaded buttons on chr... ...ome and fix getting suggested posts via API.Wall.getPost * Fix polls * Fihes Теперь уведомление о принятии поста не приходит, если вы приняли свой же пост Пофикшен баг перехода в предложку Добавлен старый вид постов в предложке Теперь счётчик постов в предложке у прикреплённой группы обновляется при принятии или отклонении поста Убрано всплывающее уведомление об отклонении поста (оно раздражает) Теперь если вы посмотрели все посты на одной странице (не на первой) и на ней не осталось постов, вас телепортирует на предыдущую страницу * Remove ability to delete your accepted psto * oi blin * Improvements 2 api * g * openvk.uk Возможно, приведение кода к кодстайлу (удаление скобочек то есть) * aiaks * al_wall.js -> al_suggestions.js * 👨‍💻 Add 👨‍💻 fading 👨‍💻 * Add "owner's posts' and "other's posts" Давайте рофлить👨‍💻👨‍💻👨‍💻 * planshet openvk Add tabs for post view, add signer's object in wall get and add person icon in microblog * Simplefai ze kod * PHP 8 FIX WATAFAK * Add indesk
2023-11-16 19:44:12 +03:00
<div n:if="$suggestion && $post->canBePinnedBy($thisUser ?? NULL)" class="suggestionControls" style="margin-bottom: 7px;">
<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
<div n:if="$post->isAd()" style="color:grey;">
<br/>
&nbsp;! {_post_is_ad}
2021-01-27 20:40:37 +03:00
</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>
{_author}:
<a href="{$actualAuthor->getURL()}" class="mention" data-mention-ref="{$actualAuthor->getId()}">
{$actualAuthor->getCanonicalName()}
2021-01-27 20:40:37 +03:00
</a>
</span>
</div>
</div>
<div n:if="!($compact ?? false)" class="post-menu">
{if is_null($thisUser)}
{var $forceNoDeleteLink = true}
{var $forceNoPinLink = true}
{/if}
{if !($forceNoEditLink ?? false) && $post->canBeEditedBy($thisUser)}
<a id="editPost"
data-id="{$post->getId()}"
data-nsfw="{(int)$post->isExplicit()}"
{if $post->getTargetWall() < 0 && $post->getWallOwner()->canBeModifiedBy($thisUser)}data-fromgroup="{(int)$post->isPostedOnBehalfOfGroup()}"{/if}>{_edit}</a> &nbsp;|&nbsp;
{/if}
{if !($forceNoDeleteLink ?? false) && $post->canBeDeletedBy($thisUser)}
<a href="/wall{$post->getPrettyId()}/delete">{_delete}</a> &nbsp;|&nbsp;
{/if}
{if !($forceNoPinLink ?? false) && $post->canBePinnedBy($thisUser)}
2021-09-20 15:19:15 +03:00
{if $post->isPinned()}
<a href="/wall{$post->getPrettyId()}/pin?act=unpin&hash={rawurlencode($csrfToken)}">{_unpin}</a>
2021-09-20 15:19:15 +03:00
{else}
<a href="/wall{$post->getPrettyId()}/pin?act=pin&hash={rawurlencode($csrfToken)}">{_pin}</a>
2021-09-20 15:19:15 +03:00
{/if}
&nbsp;|&nbsp;
2021-01-27 20:40:37 +03:00
{/if}
<a n:if="!($forceNoCommentsLink ?? false)" href="/wall{$post->getPrettyId()}#comments">
{_comments}
{if $post->getCommentsCount() > 0}
(<b>{$post->getCommentsCount()}</b>)
{/if}
</a>
{if !($forceNoCommentsLink ?? false) && !($forceNoShareLink ?? false)}
2021-01-27 20:40:37 +03:00
&nbsp;|&nbsp;
{/if}
2023-05-21 18:38:39 +03:00
<a n:if="!($forceNoShareLink ?? false)" id="reposts{$post->getPrettyId()}" class="post-share-button" {ifset $thisUser} href="javascript:repostPost('{$post->getPrettyId()}', '{rawurlencode($csrfToken)}')"{/ifset}>
{_share}
{if $post->getRepostCount() > 0}
2023-05-21 18:38:39 +03:00
(<b id="repostsCount{$post->getPrettyId()}">{$post->getRepostCount()}</b>)
{/if}
</a>
<div n:if="!($forceNoLike ?? false)" class="like_wrap">
{ifset $thisUser}
{var $liked = $post->hasLikeFrom($thisUser)}
<a href="/wall{$post->getPrettyId()}/like?hash={rawurlencode($csrfToken)}" class="post-like-button" data-liked="{(int) $liked}" data-likes="{$post->getLikesCount()}">
<div class="heart" id="{if $liked}liked{/if}"></div>
<span class="likeCnt">{if $post->getLikesCount() > 0}{$post->getLikesCount()}{/if}</span>
</a>
{else}
<a n:if="$post->getLikesCount() > 0" class="post-like-button">
<div class="heart"></div>
<span class="likeCnt">{$post->getLikesCount()}</span>
</a>
{/ifset}
</div>
2021-01-27 20:40:37 +03:00
</div>
</td>
</tr>
</tbody>
</table>