From 8ccb98473fd553eaf05b3aaa37f59279dcb4d908 Mon Sep 17 00:00:00 2001 From: lalka2018 <99399973+lalka2016@users.noreply.github.com> Date: Sun, 21 May 2023 18:38:39 +0300 Subject: [PATCH 1/6] =?UTF-8?q?=D0=A0=D0=B5=D0=BF=D0=BE=D1=81=D1=82=20?= =?UTF-8?q?=D0=B2=20=D0=B3=D1=80=D1=83=D0=BF=D0=BF=D1=83=20(#873)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ServiceAPI/Groups.php | 39 ++++++++ VKAPI/Handlers/Wall.php | 24 +++-- Web/Models/Repositories/Clubs.php | 32 +++++-- Web/Presenters/WallPresenter.php | 41 +++++++-- .../components/post/microblogpost.xml | 4 +- .../templates/components/post/oldpost.xml | 4 +- Web/static/js/openvk.cls.js | 89 ++++++++++++++----- locales/en.strings | 3 + locales/ru.strings | 3 + 9 files changed, 197 insertions(+), 42 deletions(-) create mode 100644 ServiceAPI/Groups.php diff --git a/ServiceAPI/Groups.php b/ServiceAPI/Groups.php new file mode 100644 index 00000000..9eed0e8d --- /dev/null +++ b/ServiceAPI/Groups.php @@ -0,0 +1,39 @@ +user = $user; + $this->groups = new Clubs; + } + + function getWriteableClubs(callable $resolve, callable $reject) + { + $clubs = []; + $wclubs = $this->groups->getWriteableClubs($this->user->getId()); + $count = $this->groups->getWriteableClubsCount($this->user->getId()); + + if(!$count) { + $reject("You don't have any groups with write access"); + + return; + } + + foreach($wclubs as $club) { + $clubs[] = [ + "name" => $club->getName(), + "id" => $club->getId(), + "avatar" => $club->getAvatarUrl() # если в овк когда-нибудь появится крутой список с аватарками, то можно использовать это поле + ]; + } + + $resolve($clubs); + } +} diff --git a/VKAPI/Handlers/Wall.php b/VKAPI/Handlers/Wall.php index c39a3316..41af5c0d 100644 --- a/VKAPI/Handlers/Wall.php +++ b/VKAPI/Handlers/Wall.php @@ -453,25 +453,38 @@ final class Wall extends VKAPIRequestHandler return (object)["post_id" => $post->getVirtualId()]; } - function repost(string $object, string $message = "") { + function repost(string $object, string $message = "", int $group_id = 0) { $this->requireUser(); $this->willExecuteWriteAction(); $postArray; if(preg_match('/wall((?:-?)[0-9]+)_([0-9]+)/', $object, $postArray) == 0) $this->fail(100, "One of the parameters specified was missing or invalid: object is incorrect"); - + $post = (new PostsRepo)->getPostById((int) $postArray[1], (int) $postArray[2]); if(!$post || $post->isDeleted()) $this->fail(100, "One of the parameters specified was missing or invalid"); - + $nPost = new Post; $nPost->setOwner($this->user->getId()); - $nPost->setWall($this->user->getId()); + + if($group_id > 0) { + $club = (new ClubsRepo)->get($group_id); + if(!$club) + $this->fail(42, "Invalid group"); + + if(!$club->canBeModifiedBy($this->user)) + $this->fail(16, "Access to group denied"); + + $nPost->setWall($group_id * -1); + } else { + $nPost->setWall($this->user->getId()); + } + $nPost->setContent($message); $nPost->setApi_Source_Name($this->getPlatform()); $nPost->save(); $nPost->attach($post); - + if($post->getOwner(false)->getId() !== $this->user->getId() && !($post->getOwner() instanceof Club)) (new RepostNotification($post->getOwner(false), $post, $this->user->identity))->emit(); @@ -483,6 +496,7 @@ final class Wall extends VKAPIRequestHandler ]; } + function getComments(int $owner_id, int $post_id, bool $need_likes = true, int $offset = 0, int $count = 10, string $fields = "sex,screen_name,photo_50,photo_100,online_info,online", string $sort = "asc", bool $extended = false) { $this->requireUser(); diff --git a/Web/Models/Repositories/Clubs.php b/Web/Models/Repositories/Clubs.php index edbe75c6..8e97f3eb 100644 --- a/Web/Models/Repositories/Clubs.php +++ b/Web/Models/Repositories/Clubs.php @@ -1,7 +1,7 @@ context = DatabaseConnection::i()->getContext(); - $this->clubs = $this->context->table("groups"); + $this->context = DatabaseConnection::i()->getContext(); + $this->clubs = $this->context->table("groups"); + $this->coadmins = $this->context->table("group_coadmins"); } private function toClub(?ActiveRow $ar): ?Club @@ -70,6 +72,26 @@ class Clubs ]; */ } - + + function getWriteableClubs(int $id): \Traversable + { + $result = $this->clubs->where("owner", $id); + $coadmins = $this->coadmins->where("user", $id); + + foreach($result as $entry) { + yield new Club($entry); + } + + foreach($coadmins as $coadmin) { + $cl = new Manager($coadmin); + yield $cl->getClub(); + } + } + + function getWriteableClubsCount(int $id): int + { + return sizeof($this->clubs->where("owner", $id)) + sizeof($this->coadmins->where("user", $id)); + } + use \Nette\SmartObject; } diff --git a/Web/Presenters/WallPresenter.php b/Web/Presenters/WallPresenter.php index ffcec2a7..928026f8 100644 --- a/Web/Presenters/WallPresenter.php +++ b/Web/Presenters/WallPresenter.php @@ -363,21 +363,52 @@ final class WallPresenter extends OpenVKPresenter $this->assertNoCSRF(); $post = $this->posts->getPostById($wall, $post_id); - if(!$post || $post->isDeleted()) $this->notFound(); + + if(!$post || $post->isDeleted()) + $this->notFound(); + $where = $this->postParam("type") ?? "wall"; + $groupId = NULL; + $flags = 0; + + if($where == "group") + $groupId = $this->postParam("groupId"); + if(!is_null($this->user)) { $nPost = new Post; - $nPost->setOwner($this->user->id); - $nPost->setWall($this->user->id); + + if($where == "wall") { + $nPost->setOwner($this->user->id); + $nPost->setWall($this->user->id); + } elseif($where == "group") { + $nPost->setOwner($this->user->id); + $club = (new Clubs)->get((int)$groupId); + + if(!$club || !$club->canBeModifiedBy($this->user->identity)) + $this->notFound(); + + if($this->postParam("asGroup") == 1) + $flags |= 0b10000000; + + if($this->postParam("signed") == 1) + $flags |= 0b01000000; + + $nPost->setWall($groupId * -1); + } + $nPost->setContent($this->postParam("text")); + $nPost->setFlags($flags); $nPost->save(); + $nPost->attach($post); if($post->getOwner(false)->getId() !== $this->user->identity->getId() && !($post->getOwner() instanceof Club)) (new RepostNotification($post->getOwner(false), $post, $this->user->identity))->emit(); }; - - $this->returnJson(["wall_owner" => $this->user->identity->getId()]); + + $this->returnJson([ + "wall_owner" => $where == "wall" ? $this->user->identity->getId() : $groupId * -1 + ]); } function renderDelete(int $wall, int $post_id): void diff --git a/Web/Presenters/templates/components/post/microblogpost.xml b/Web/Presenters/templates/components/post/microblogpost.xml index 4c383d12..98a41d72 100644 --- a/Web/Presenters/templates/components/post/microblogpost.xml +++ b/Web/Presenters/templates/components/post/microblogpost.xml @@ -98,9 +98,9 @@ {_comment}
- +
- {if $post->getRepostCount() > 0}{$post->getRepostCount()}{/if} + {if $post->getRepostCount() > 0}{$post->getRepostCount()}{/if}
{if !($forceNoLike ?? false)} diff --git a/Web/Presenters/templates/components/post/oldpost.xml b/Web/Presenters/templates/components/post/oldpost.xml index 66903cca..c893e289 100644 --- a/Web/Presenters/templates/components/post/oldpost.xml +++ b/Web/Presenters/templates/components/post/oldpost.xml @@ -111,10 +111,10 @@  |  {/if} - + {_share} {if $post->getRepostCount() > 0} - ({$post->getRepostCount()}) + ({$post->getRepostCount()}) {/if} diff --git a/Web/static/js/openvk.cls.js b/Web/static/js/openvk.cls.js index 8cb6ecb5..ded00fbb 100644 --- a/Web/static/js/openvk.cls.js +++ b/Web/static/js/openvk.cls.js @@ -1,3 +1,4 @@ + function expand_wall_textarea(id) { var el = document.getElementById('post-buttons'+id); var wi = document.getElementById('wall-post-input'+id); @@ -65,7 +66,6 @@ function toggleMenu(id) { }); } } - document.addEventListener("DOMContentLoaded", function() { //BEGIN u("#_photoDelete").on("click", function(e) { @@ -88,7 +88,6 @@ document.addEventListener("DOMContentLoaded", function() { //BEGIN return e.preventDefault(); }); - /* @rem-pai why this func wasn't named as "#_deleteDialog"? It looks universal IMO */ u("#_noteDelete").on("click", function(e) { @@ -170,28 +169,72 @@ document.addEventListener("DOMContentLoaded", function() { //BEGIN }); //END ONREADY DECLS -function repostPost(id, hash) { - uRepostMsgTxt = tr('your_comment') + ":

"; - - MessageBox(tr('share'), uRepostMsgTxt, [tr('send'), tr('cancel')], [ - (function() { - text = document.querySelector("#uRepostMsgInput_"+id).value; - hash = encodeURIComponent(hash); - xhr = new XMLHttpRequest(); - xhr.open("POST", "/wall"+id+"/repost?hash="+hash, true); - xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); - xhr.onload = (function() { +async function repostPost(id, hash) { + uRepostMsgTxt = ` + ${tr('auditory')}:
+ ${tr("in_wall")}
+ ${tr("in_group")}
+
+ ${tr('your_comment')}: + + +

`; + let clubs = []; + repostsCount = document.getElementById("repostsCount"+id) + prevVal = repostsCount != null ? Number(repostsCount.innerHTML) : 0; + + MessageBox(tr('share'), uRepostMsgTxt, [tr('send'), tr('cancel')], [ + (function() { + text = document.querySelector("#uRepostMsgInput_"+id).value; + type = "user"; + radios = document.querySelectorAll('input[name="type"]') + for(const r of radios) + { + if(r.checked) + { + type = r.value; + break; + } + } + groupId = document.querySelector("#groupId").value; + asGroup = asgroup.checked == true ? 1 : 0; + signed = signed.checked == true ? 1 : 0; + hash = encodeURIComponent(hash); + + xhr = new XMLHttpRequest(); + xhr.open("POST", "/wall"+id+"/repost?hash="+hash, true); + xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); + xhr.onload = (function() { if(xhr.responseText.indexOf("wall_owner") === -1) - MessageBox(tr('error'), tr('error_repost_fail'), [tr('ok')], [Function.noop]); - else { - let jsonR = JSON.parse(xhr.responseText); + MessageBox(tr('error'), tr('error_repost_fail'), [tr('ok')], [Function.noop]); + else { + let jsonR = JSON.parse(xhr.responseText); NewNotification(tr('information_-1'), tr('shared_succ'), null, () => {window.location.href = "/wall" + jsonR.wall_owner}); - } - }); - xhr.send('text=' + encodeURI(text)); - }), - Function.noop - ]); + repostsCount != null ? + repostsCount.innerHTML = prevVal+1 : + document.getElementById("reposts"+id).insertAdjacentHTML("beforeend", "(1)") //для старого вида постов + } + }); + xhr.send('text='+encodeURI(text) + '&type='+type + '&groupId='+groupId + "&asGroup="+asGroup + "&signed="+signed); + }), + Function.noop + ]); + + try + { + clubs = await API.Groups.getWriteableClubs(); + for(const el of clubs) { + document.getElementById("groupId").insertAdjacentHTML("beforeend", ``) + } + + } catch(rejection) { + console.error(rejection) + document.getElementById("group").setAttribute("disabled", "disabled") + } } function setClubAdminComment(clubId, adminId, hash) { @@ -535,4 +578,4 @@ $(document).on("scroll", () => { $(".floating_sidebar")[0].classList.remove("hide_anim"); }, 250); } -}) +}) \ No newline at end of file diff --git a/locales/en.strings b/locales/en.strings index 8e32ea66..c70bc259 100644 --- a/locales/en.strings +++ b/locales/en.strings @@ -175,6 +175,9 @@ "pinned" = "pinned"; "comments_tip" = "Be first, who leaves a comment at this post!"; "your_comment" = "Your comment"; +"auditory" = "Auditory"; +"in_wall" = "to user's wall"; +"in_group" = "to group"; "shown" = "Shown"; "x_out_of" = "$1 of"; "wall_zero" = "no posts"; diff --git a/locales/ru.strings b/locales/ru.strings index 567cdc2f..6c62de66 100644 --- a/locales/ru.strings +++ b/locales/ru.strings @@ -157,6 +157,9 @@ "pinned" = "закреплено"; "comments_tip" = "Будьте первым, кто оставит комментарий!"; "your_comment" = "Ваш комментарий"; +"auditory" = "Аудитория"; +"in_wall" = "на стену"; +"in_group" = "в группу"; "shown" = "Показано"; "x_out_of" = "$1 из"; "wall_zero" = "нет записей"; From 9eeb710e4709ee23b03c7ea81d0853068ef74aee Mon Sep 17 00:00:00 2001 From: Ilya Prokopenko Date: Mon, 22 May 2023 21:37:37 +0700 Subject: [PATCH 2/6] BSDN: Some fixes --- Web/static/css/bsdn.css | 2 +- Web/static/js/player.js | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Web/static/css/bsdn.css b/Web/static/css/bsdn.css index 6ed03359..59904104 100644 --- a/Web/static/css/bsdn.css +++ b/Web/static/css/bsdn.css @@ -176,7 +176,7 @@ time.bsdn_timeFull { border: 1px solid #908f90; width: 232px; height: 169px; - font-size: 15px; + font-size: 13px; box-sizing: border-box; } diff --git a/Web/static/js/player.js b/Web/static/js/player.js index 9cc30112..b170606f 100644 --- a/Web/static/js/player.js +++ b/Web/static/js/player.js @@ -26,14 +26,14 @@ function _bsdnTpl(name, author) { OpenVK BSDN///Player 0.1
Developers: - - - celstora - - - - Report a problem... + + - celestora
- About Adobe Flash Player... + + Report a problem... + + About Adobe Flash Player...
From 8c983599040dbd11fd05922c6252e22d79d7c37e Mon Sep 17 00:00:00 2001 From: Ilya Prokopenko Date: Mon, 22 May 2023 21:38:31 +0700 Subject: [PATCH 3/6] OpenVK Midnight: Add changes related to the player --- themepacks/midnight/stylesheet.css | 31 +++++++++++++++++++----------- themepacks/midnight/theme.yml | 4 ++-- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/themepacks/midnight/stylesheet.css b/themepacks/midnight/stylesheet.css index c0f0b6ea..53554e8c 100644 --- a/themepacks/midnight/stylesheet.css +++ b/themepacks/midnight/stylesheet.css @@ -65,6 +65,15 @@ hr { background-color: #2c2640; } +.bsdn_contextMenu { + background-color: #1f1a2c; + border-color: #2c2640; +} + +.bsdn_contextMenuElement:hover { + background-color: #29223a; +} + #ovkDraw .literally .lc-picker, .literally .lc-options.horz-toolbar, .mb_tab#active { background-color: #453e5e; } @@ -128,11 +137,11 @@ h4, .content_title_expanded, .summaryBar .summary, .content_title_unexpanded { } .content_title_expanded { - background-image: url("/themepack/midnight/0.0.2.4/resource/flex_arrow_open.png") !important; + background-image: url("/themepack/midnight/0.0.2.5/resource/flex_arrow_open.png") !important; } .content_title_unexpanded { - background-image: url("/themepack/midnight/0.0.2.4/resource/flex_arrow_shut.gif") !important; + background-image: url("/themepack/midnight/0.0.2.5/resource/flex_arrow_shut.gif") !important; } .ovk-video > .preview, .video-preview { @@ -154,17 +163,17 @@ h4, .content_title_expanded, .summaryBar .summary, .content_title_unexpanded { .page_yellowheader { color: #c6d2e8; - background-image: url("/themepack/midnight/0.0.2.4/resource/header_purple.png") !important; + background-image: url("/themepack/midnight/0.0.2.5/resource/header_purple.png") !important; background-color: #231f34; border-color: #231f34; } .page_header { - background-image: url("/themepack/midnight/0.0.2.4/resource/header.png") !important; + background-image: url("/themepack/midnight/0.0.2.5/resource/header.png") !important; } .page_custom_header { - background-image: url("/themepack/midnight/0.0.2.4/resource/header_custom.png") !important; + background-image: url("/themepack/midnight/0.0.2.5/resource/header_custom.png") !important; } .page_yellowheader span, .page_yellowheader a { @@ -184,11 +193,11 @@ form[action="/search"] > input, .header_search_input, textarea, input[type="text } input[type="checkbox"] { - background-image: url("/themepack/midnight/0.0.2.4/resource/checkbox.png") !important; + background-image: url("/themepack/midnight/0.0.2.5/resource/checkbox.png") !important; } input[type="radio"] { - background-image: url("/themepack/midnight/0.0.2.4/resource/radio.png") !important; + background-image: url("/themepack/midnight/0.0.2.5/resource/radio.png") !important; } .header_navigation .link { @@ -196,19 +205,19 @@ input[type="radio"] { } .heart { - background-image: url("/themepack/midnight/0.0.2.4/resource/like.gif") !important; + background-image: url("/themepack/midnight/0.0.2.5/resource/like.gif") !important; } .pinned-mark, .post-author .pin { - background-image: url("/themepack/midnight/0.0.2.4/resource/pin.png") !important; + background-image: url("/themepack/midnight/0.0.2.5/resource/pin.png") !important; } .repost-icon { - background-image: url("/themepack/midnight/0.0.2.4/resource/published.gif") !important; + background-image: url("/themepack/midnight/0.0.2.5/resource/published.gif") !important; } .post-author .delete { - background-image: url("/themepack/midnight/0.0.2.4/resource/input_clear.gif") !important; + background-image: url("/themepack/midnight/0.0.2.5/resource/input_clear.gif") !important; } .user-alert { diff --git a/themepacks/midnight/theme.yml b/themepacks/midnight/theme.yml index 34bb392d..bc10b12e 100644 --- a/themepacks/midnight/theme.yml +++ b/themepacks/midnight/theme.yml @@ -1,5 +1,5 @@ id: midnight -version: "0.0.2.4" +version: "0.0.2.5" openvk_version: 0 enabled: 1 metadata: @@ -8,5 +8,5 @@ metadata: en: "OpenVK Midnight" ru: "OpenVK Midnight" uk: "OpenVK Midnight" - author: "Ilya Prokopenko" + author: "Lumaeris" description: "A dark theme for OpenVK" From 4bfdeddd22669a91e0b80931291fbe4a84096d9f Mon Sep 17 00:00:00 2001 From: Ilya Prokopenko Date: Tue, 23 May 2023 19:28:21 +0700 Subject: [PATCH 4/6] Video: Fast addition of a video with its file name For example, how would you know there were spoilers for Steins;Gate if the video was titled "Unnamed Video.ogv"? --- VKAPI/Handlers/Wall.php | 2 +- Web/Models/Entities/Video.php | 4 ++-- Web/Presenters/CommentPresenter.php | 2 +- Web/Presenters/TopicsPresenter.php | 2 +- Web/Presenters/WallPresenter.php | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/VKAPI/Handlers/Wall.php b/VKAPI/Handlers/Wall.php index 41af5c0d..adddaccf 100644 --- a/VKAPI/Handlers/Wall.php +++ b/VKAPI/Handlers/Wall.php @@ -418,7 +418,7 @@ final class Wall extends VKAPIRequestHandler } if($_FILES["video"]["error"] === UPLOAD_ERR_OK) - $video = Video::fastMake($this->getUser()->getId(), $message, $_FILES["video"], $anon); + $video = Video::fastMake($this->getUser()->getId(), $_FILES["video"]["name"], $message, $_FILES["video"], $anon); } catch(\DomainException $ex) { $this->fail(-156, "The media file is corrupted"); } catch(ISE $ex) { diff --git a/Web/Models/Entities/Video.php b/Web/Models/Entities/Video.php index ee53b378..bddb00a4 100644 --- a/Web/Models/Entities/Video.php +++ b/Web/Models/Entities/Video.php @@ -195,11 +195,11 @@ class Video extends Media $this->save(); } - static function fastMake(int $owner, string $description = "", array $file, bool $unlisted = true, bool $anon = false): Video + static function fastMake(int $owner, string $name = "Unnamed Video.ogv", string $description = "", array $file, bool $unlisted = true, bool $anon = false): Video { $video = new Video; $video->setOwner($owner); - $video->setName("Unnamed Video.ogv"); + $video->setName(ovk_proc_strtr($name, 61)); $video->setDescription(ovk_proc_strtr($description, 300)); $video->setAnonymous($anon); $video->setCreated(time()); diff --git a/Web/Presenters/CommentPresenter.php b/Web/Presenters/CommentPresenter.php index 50c72248..93d2a816 100644 --- a/Web/Presenters/CommentPresenter.php +++ b/Web/Presenters/CommentPresenter.php @@ -74,7 +74,7 @@ final class CommentPresenter extends OpenVKPresenter } if($_FILES["_vid_attachment"]["error"] === UPLOAD_ERR_OK) { - $video = Video::fastMake($this->user->id, $this->postParam("text"), $_FILES["_vid_attachment"]); + $video = Video::fastMake($this->user->id, $_FILES["_vid_attachment"]["name"], $this->postParam("text"), $_FILES["_vid_attachment"]); } } catch(ISE $ex) { $this->flashFail("err", "Не удалось опубликовать комментарий", "Файл медиаконтента повреждён или слишком велик."); diff --git a/Web/Presenters/TopicsPresenter.php b/Web/Presenters/TopicsPresenter.php index 528b51ad..e081382a 100644 --- a/Web/Presenters/TopicsPresenter.php +++ b/Web/Presenters/TopicsPresenter.php @@ -105,7 +105,7 @@ final class TopicsPresenter extends OpenVKPresenter } if($_FILES["_vid_attachment"]["error"] === UPLOAD_ERR_OK) { - $video = Video::fastMake($this->user->id, $this->postParam("text"), $_FILES["_vid_attachment"]); + $video = Video::fastMake($this->user->id, $_FILES["_vid_attachment"]["name"], $this->postParam("text"), $_FILES["_vid_attachment"]); } } catch(ISE $ex) { $this->flash("err", "Не удалось опубликовать комментарий", "Файл медиаконтента повреждён или слишком велик."); diff --git a/Web/Presenters/WallPresenter.php b/Web/Presenters/WallPresenter.php index 928026f8..5c9326db 100644 --- a/Web/Presenters/WallPresenter.php +++ b/Web/Presenters/WallPresenter.php @@ -258,7 +258,7 @@ final class WallPresenter extends OpenVKPresenter } if($_FILES["_vid_attachment"]["error"] === UPLOAD_ERR_OK) - $video = Video::fastMake($this->user->id, $this->postParam("text"), $_FILES["_vid_attachment"], $anon); + $video = Video::fastMake($this->user->id, $_FILES["_vid_attachment"]["name"], $this->postParam("text"), $_FILES["_vid_attachment"], $anon); } catch(\DomainException $ex) { $this->flashFail("err", tr("failed_to_publish_post"), tr("media_file_corrupted")); } catch(ISE $ex) { From 4d996fddacd460b29eb84f854d2abb2d992e059e Mon Sep 17 00:00:00 2001 From: Ilya Prokopenko Date: Tue, 23 May 2023 20:31:32 +0700 Subject: [PATCH 5/6] reason -> disablingReason and some fixes --- Web/Presenters/templates/About/Version.xml | 4 ++-- Web/Presenters/templates/Auth/Register.xml | 4 ++-- openvk-example.yml | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Web/Presenters/templates/About/Version.xml b/Web/Presenters/templates/About/Version.xml index 36fbbb64..4d89a93d 100644 --- a/Web/Presenters/templates/About/Version.xml +++ b/Web/Presenters/templates/About/Version.xml @@ -458,7 +458,7 @@ Initial hosting - Ilya Prokopenko (dsrev) and Celestora + Lumaeris and Celestora Initial bug-tracker hosting @@ -492,7 +492,7 @@ kovaltim, Vladimir Lapskiy (0x7d5), Alexander Minkin (WerySkok), Polina Katunina (RousPhaul), veth, Egor Shevchenko, Vadim Korovin (yuni), Ash Defenders, - Pavel Silaev, Dmitriy Daemon, Ilya Prokopenko (dsrev), + Pavel Silaev, Dmitriy Daemon, Lumaeris, cmed404 and unknown tester, who disappeared shortly after trying to upload post with cat. diff --git a/Web/Presenters/templates/Auth/Register.xml b/Web/Presenters/templates/Auth/Register.xml index ac2743dc..a279e930 100644 --- a/Web/Presenters/templates/Auth/Register.xml +++ b/Web/Presenters/templates/Auth/Register.xml @@ -129,12 +129,12 @@ {_registration_disabled_info} - {if OPENVK_ROOT_CONF['openvk']['preferences']['registration']['reason']} + {if OPENVK_ROOT_CONF['openvk']['preferences']['registration']['disablingReason']}

{_admin_banned_link_reason}:
- {php echo OPENVK_ROOT_CONF['openvk']['preferences']['registration']['reason']} + {php echo OPENVK_ROOT_CONF['openvk']['preferences']['registration']['disablingReason']} {/if} diff --git a/openvk-example.yml b/openvk-example.yml index 4b6ab4aa..c0428283 100644 --- a/openvk-example.yml +++ b/openvk-example.yml @@ -37,9 +37,9 @@ openvk: autoban: true registration: enable: true - reason: "" # reason for disabling registration + disablingReason: "" support: - supportName: "Moderator" + supportName: "Agent" adminAccount: 1 # Change this ok fastAnswers: - "This is a list of quick answers to common questions for support. Post your responses here and agents can send it quickly with just 3 clicks" @@ -125,9 +125,9 @@ openvk: token: "TOKEN_HERE" helpdeskChat: "" eventDB: - enable: false # Better enable this + enable: true database: - dsn: "mysql:unix_socket=/tmp/mysql.sock;dbname=openvk-eventdb" + dsn: "mysql:unix_host=localhost;dbname=openvk-eventdb" # or unix_socket=/tmp/mysql.sock user: "root" password: "DATABASE_PASSWORD" notificationsBroker: From 42132170634ce202cf5db02c5b611da40d4c1f90 Mon Sep 17 00:00:00 2001 From: Vladimir Barinov Date: Fri, 26 May 2023 00:42:58 +0300 Subject: [PATCH 6/6] L10n: Ukrainian: Add missing strings --- locales/uk.strings | 3 +++ 1 file changed, 3 insertions(+) diff --git a/locales/uk.strings b/locales/uk.strings index f0870f22..92a8b309 100644 --- a/locales/uk.strings +++ b/locales/uk.strings @@ -159,6 +159,9 @@ "pinned" = "прикріплено"; "comments_tip" = "Будьте першим, хто залишить коментар!"; "your_comment" = "Ваш коментар"; +"auditory" = "Аудиторія"; +"in_wall" = "на стіну"; +"in_group" = "у групу"; "shown" = "Показано"; "x_out_of" = "$1 з"; "wall_zero" = "немає записів";