diff --git a/Web/Presenters/WallPresenter.php b/Web/Presenters/WallPresenter.php index 19a64edd..07258877 100644 --- a/Web/Presenters/WallPresenter.php +++ b/Web/Presenters/WallPresenter.php @@ -39,7 +39,7 @@ final class WallPresenter extends OpenVKPresenter $this->logPostView($post, $wall); } - function renderWall(int $user): void + function renderWall(int $user, bool $embedded = false): void { if(false) exit("Ошибка доступа: " . (string) random_int(0, 255)); @@ -57,6 +57,7 @@ final class WallPresenter extends OpenVKPresenter else $canPost = false; + if ($embedded == true) $this->template->_template = "components/wall.xml"; $this->template->oObj = $owner; $this->template->owner = $user; $this->template->canPost = $canPost; @@ -68,9 +69,15 @@ final class WallPresenter extends OpenVKPresenter "amount" => sizeof($this->template->posts), "perPage" => OPENVK_DEFAULT_PER_PAGE, ]; + $this->logPostsViewed($this->template->posts, $user); } + + function renderWallEmbedded(int $user): void + { + $this->renderWall($user, true); + } function renderFeed(): void { diff --git a/Web/Presenters/templates/User/View.xml b/Web/Presenters/templates/User/View.xml index 83fc8b46..4df13723 100644 --- a/Web/Presenters/templates/User/View.xml +++ b/Web/Presenters/templates/User/View.xml @@ -462,7 +462,7 @@

- {presenter "openvk!Wall->wall", $user->getId()} + {presenter "openvk!Wall->wallEmbedded", $user->getId()} + + + + {/if} + + + + + + +
+ +
+ + {_attach_photo} + +
+ + - +
- {foreach $posts->page($__page, 10) as $post} - {include "post.xml", post => $post} - {/foreach} - - {include "paginator.xml", page => $__page, bag => $posts} + {if sizeof($posts) > 0} + {foreach $posts as $post} + + + {include "../components/post.xml", post => $post} + {/foreach} + {include "../components/paginator.xml", conf => $paginatorConf} + {else} + {_no_posts_abstract} + {/if}
- + \ No newline at end of file diff --git a/Web/routes.yml b/Web/routes.yml index 7db983e1..31952b24 100644 --- a/Web/routes.yml +++ b/Web/routes.yml @@ -217,6 +217,8 @@ routes: handler: "VKAPI->tokenLogin" - url: "/sandbox_cocksex" handler: "About->sandbox" + - url: "/internal/wall{num}" + handler: "Wall->wallEmbedded" - url: "/{?shortCode}" handler: "UnknownTextRouteStrategy->delegate" placeholders: