From 500107fa78aa2270280e16bc28c901b78c66478a Mon Sep 17 00:00:00 2001 From: lalka2016 <99399973+lalka2016@users.noreply.github.com> Date: Sat, 2 Sep 2023 13:10:06 +0300 Subject: [PATCH] planshet openvk Add tabs for post view, add signer's object in wall get and add person icon in microblog --- VKAPI/Handlers/Wall.php | 8 ++++---- Web/Presenters/templates/Wall/Post.xml | 14 ++++++++++++++ .../templates/components/post/microblogpost.xml | 4 ++-- Web/static/css/main.css | 14 ++++++++++++++ Web/static/img/person.png | Bin 0 -> 265 bytes 5 files changed, 34 insertions(+), 6 deletions(-) create mode 100644 Web/static/img/person.png diff --git a/VKAPI/Handlers/Wall.php b/VKAPI/Handlers/Wall.php index cf8e8fcf..f58feebf 100644 --- a/VKAPI/Handlers/Wall.php +++ b/VKAPI/Handlers/Wall.php @@ -201,8 +201,8 @@ final class Wall extends VKAPIRequestHandler else $groups[] = $from_id * -1; - /*if($post->isSigned()) - $profiles[] = $post->getOwner(false)->getId();*/ + if($post->isSigned()) + $profiles[] = $post->getOwner(false)->getId(); $attachments = NULL; # free attachments so it will not clone everythingg } @@ -392,8 +392,8 @@ final class Wall extends VKAPIRequestHandler else $groups[] = $from_id * -1; - /*if($post->isSigned()) - $profiles[] = $post->getOwner(false)->getId();*/ + if($post->isSigned()) + $profiles[] = $post->getOwner(false)->getId(); $attachments = NULL; # free attachments so it will not clone everything $repost = NULL; # same diff --git a/Web/Presenters/templates/Wall/Post.xml b/Web/Presenters/templates/Wall/Post.xml index 575c7bba..a0da7599 100644 --- a/Web/Presenters/templates/Wall/Post.xml +++ b/Web/Presenters/templates/Wall/Post.xml @@ -14,6 +14,20 @@ {/block} {block content} +
+
+ {_all_posts} +
+
+ {$post->getTargetWall() < 0 ? tr("clubs_posts") : tr("users_posts", ovk_proc_strtr($wallOwner->getFirstName(), 20))} +
+
+ {_others_posts} +
+
+ {_post} +
+
{include "../components/post.xml", post => $post, forceNoCommentsLink => TRUE, forceNoDeleteLink => TRUE}
diff --git a/Web/Presenters/templates/components/post/microblogpost.xml b/Web/Presenters/templates/components/post/microblogpost.xml index b5060fcb..a28a7b54 100644 --- a/Web/Presenters/templates/components/post/microblogpost.xml +++ b/Web/Presenters/templates/components/post/microblogpost.xml @@ -80,8 +80,8 @@
{var $actualAuthor = $post->getOwner(false)} - {_author}: - +
+
{$actualAuthor->getCanonicalName()}
diff --git a/Web/static/css/main.css b/Web/static/css/main.css index e7e124c7..540a14e9 100644 --- a/Web/static/css/main.css +++ b/Web/static/css/main.css @@ -2736,3 +2736,17 @@ body.article .floating_sidebar, body.article .page_content { text-decoration: underline; color:#4a4a4a; } + +.authorIcon { + height: 11px; + margin-top: 1px; + width: 10px; + float: left; + background: url("/assets/packages/static/openvk/img/person.png") no-repeat 0 0; +} + +.authorName { + margin-left: 4px; + font-weight: normal !important; + font-size: 11px; +} diff --git a/Web/static/img/person.png b/Web/static/img/person.png new file mode 100644 index 0000000000000000000000000000000000000000..9706c1a1771df7ae8595a0b966138e38262470d3 GIT binary patch literal 265 zcmeAS@N?(olHy`uVBq!ia0vp^AT~D#8<2F%laT;YjKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1quc!Fir8jv*Ssxf2Ze+7x))xSJ<3Z;)VnoO&bS z`I0#e%oYzg?|4X*JP*%c_*;8<@n5G~LKPd=Wq-QIoXoT3+Sd4^meaT89u9ZpU<^7n zXW`DGjqk0al#g{>V{K1#$PS3Qtt;W=kUi&l=QY;%5AXLp21@iA){DQ$&h6+r3f8>2sDEOF4d8eVJW3?;*R+34M(oVU4Fimoj*|`njxg HN@xNAN4;aR literal 0 HcmV?d00001