openvk/Web/Presenters/templates/components/attachment.xml
celestora 344ba53acd
Смешной мясной плеер (#839)
* Add video title under post attachment box

* Add VK-styled player

* bideoplayer on video page now

sosiski

* Fix context menu display on Chrome

* Videos now use H.264 instead of Theora

hazbin hotel nude mo

а вообще тут мог бы быть AV1, но пидорасы из купертино фанаты libx264
2023-01-28 22:25:00 +02:00

33 lines
1.7 KiB
XML

{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}">
<img class="media" src="{$attachment->getURLBySizeId('normal')}" alt="{$attachment->getDescription()}" />
</a>
{else}
<a href="javascript:alert('{_attach_no_longer_available}');">
<img class="media" src="/assets/packages/static/openvk/img/camera_200.png" alt="{_attach_no_longer_available}" />
</a>
{/if}
{elseif $attachment instanceof \openvk\Web\Models\Entities\Video}
<div class="bsdn media" data-name="{$attachment->getName()}" data-author="{$attachment->getOwner()->getCanonicalName()}">
<video class="media" src="{$attachment->getURL()}"></video>
</div>
<div class="video-wowzer">
<img src="/assets/packages/static/openvk/img/videoico.png" />
<a href="/video{$attachment->getPrettyId()}">{$attachment->getName()}</a>
</div>
{elseif $attachment instanceof \openvk\Web\Models\Entities\Poll}
{presenter "openvk!Poll->view", $attachment->getId()}
{elseif $attachment instanceof \openvk\Web\Models\Entities\Post}
{php $GLOBALS["_nesAttGloCou"] = (isset($GLOBALS["_nesAttGloCou"]) ? $GLOBALS["_nesAttGloCou"] : 0) + 1}
{if $GLOBALS["_nesAttGloCou"] > 2}
<a href="/wall{$attachment->getPrettyId()}">{_open_post}</a>
{else}
{include "post.xml", post => $attachment, compact => true}
{/if}
{else}
<span style="color:red;">{_version_incompatibility}</span>
{/if}
{php $GLOBALS["_nesAttGloCou"] = NULL}