mirror of
https://github.com/openvk/openvk
synced 2025-04-23 08:33:02 +03:00
Merge branch 'master' into ximi
This commit is contained in:
commit
88792d1979
59 changed files with 1444 additions and 318 deletions
|
@ -224,7 +224,7 @@ class Club extends RowModel
|
||||||
"shape" => "spline",
|
"shape" => "spline",
|
||||||
"color" => "#597da3",
|
"color" => "#597da3",
|
||||||
],
|
],
|
||||||
"name" => $unique ? "Полный охват" : "Все просмотры",
|
"name" => $unique ? tr("full_coverage") : tr("all_views"),
|
||||||
],
|
],
|
||||||
"subs" => [
|
"subs" => [
|
||||||
"x" => array_reverse(range(1, 7)),
|
"x" => array_reverse(range(1, 7)),
|
||||||
|
@ -235,7 +235,7 @@ class Club extends RowModel
|
||||||
"color" => "#b05c91",
|
"color" => "#b05c91",
|
||||||
],
|
],
|
||||||
"fill" => "tozeroy",
|
"fill" => "tozeroy",
|
||||||
"name" => $unique ? "Охват подписчиков" : "Просмотры подписчиков",
|
"name" => $unique ? tr("subs_coverage") : tr("subs_views"),
|
||||||
],
|
],
|
||||||
"viral" => [
|
"viral" => [
|
||||||
"x" => array_reverse(range(1, 7)),
|
"x" => array_reverse(range(1, 7)),
|
||||||
|
@ -246,7 +246,7 @@ class Club extends RowModel
|
||||||
"color" => "#4d9fab",
|
"color" => "#4d9fab",
|
||||||
],
|
],
|
||||||
"fill" => "tozeroy",
|
"fill" => "tozeroy",
|
||||||
"name" => $unique ? "Виральный охват" : "Виральные просмотры",
|
"name" => $unique ? tr("viral_coverage") : tr("viral_views"),
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,4 +90,12 @@ class Comment extends Post
|
||||||
{
|
{
|
||||||
return "/wall" . $this->getTarget()->getPrettyId() . "#_comment" . $this->getId();
|
return "/wall" . $this->getTarget()->getPrettyId() . "#_comment" . $this->getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function canBeEditedBy(?User $user = NULL): bool
|
||||||
|
{
|
||||||
|
if(!$user)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return $user->getId() == $this->getOwner(false)->getId();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -246,5 +246,19 @@ class Post extends Postable
|
||||||
$this->save();
|
$this->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function canBeEditedBy(?User $user = NULL): bool
|
||||||
|
{
|
||||||
|
if(!$user)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if($this->isDeactivationMessage() || $this->isUpdateAvatarMessage())
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if($this->getTargetWall() > 0)
|
||||||
|
return $this->getPublicationTime()->timestamp() + WEEK > time() && $user->getId() == $this->getOwner(false)->getId();
|
||||||
|
|
||||||
|
return $user->getId() == $this->getOwner(false)->getId();
|
||||||
|
}
|
||||||
|
|
||||||
use Traits\TRichText;
|
use Traits\TRichText;
|
||||||
}
|
}
|
||||||
|
|
|
@ -167,9 +167,9 @@ abstract class Postable extends Attachable
|
||||||
$this->stateChanges("created", time());
|
$this->stateChanges("created", time());
|
||||||
|
|
||||||
$this->stateChanges("virtual_id", $pCount + 1);
|
$this->stateChanges("virtual_id", $pCount + 1);
|
||||||
} else {
|
} /*else {
|
||||||
$this->stateChanges("edited", time());
|
$this->stateChanges("edited", time());
|
||||||
}
|
}*/
|
||||||
|
|
||||||
parent::save();
|
parent::save();
|
||||||
}
|
}
|
||||||
|
|
|
@ -462,6 +462,7 @@ class User extends RowModel
|
||||||
"news",
|
"news",
|
||||||
"links",
|
"links",
|
||||||
"poster",
|
"poster",
|
||||||
|
"apps"
|
||||||
],
|
],
|
||||||
])->get($id);
|
])->get($id);
|
||||||
}
|
}
|
||||||
|
@ -1026,6 +1027,7 @@ class User extends RowModel
|
||||||
"news",
|
"news",
|
||||||
"links",
|
"links",
|
||||||
"poster",
|
"poster",
|
||||||
|
"apps"
|
||||||
],
|
],
|
||||||
])->set($id, (int) $status)->toInteger();
|
])->set($id, (int) $status)->toInteger();
|
||||||
|
|
||||||
|
|
|
@ -283,7 +283,7 @@ final class AdminPresenter extends OpenVKPresenter
|
||||||
$this->notFound();
|
$this->notFound();
|
||||||
|
|
||||||
$gift->delete();
|
$gift->delete();
|
||||||
$this->flashFail("succ", "Gift moved successfully", "This gift will now be in <b>Recycle Bin</b>.");
|
$this->flashFail("succ", tr("admin_gift_moved_successfully"), tr("admin_gift_moved_to_recycle"));
|
||||||
break;
|
break;
|
||||||
case "copy":
|
case "copy":
|
||||||
case "move":
|
case "move":
|
||||||
|
@ -302,7 +302,7 @@ final class AdminPresenter extends OpenVKPresenter
|
||||||
$catTo->addGift($gift);
|
$catTo->addGift($gift);
|
||||||
|
|
||||||
$name = $catTo->getName();
|
$name = $catTo->getName();
|
||||||
$this->flash("succ", "Gift moved successfully", "This gift will now be in <b>$name</b>.");
|
$this->flash("succ", tr("admin_gift_moved_successfully"), "This gift will now be in <b>$name</b>.");
|
||||||
$this->redirect("/admin/gifts/" . $catTo->getSlug() . "." . $catTo->getId() . "/");
|
$this->redirect("/admin/gifts/" . $catTo->getSlug() . "." . $catTo->getId() . "/");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -333,10 +333,10 @@ final class AdminPresenter extends OpenVKPresenter
|
||||||
$gift->setUsages((int) $this->postParam("usages"));
|
$gift->setUsages((int) $this->postParam("usages"));
|
||||||
if(isset($_FILES["pic"]) && $_FILES["pic"]["error"] === UPLOAD_ERR_OK) {
|
if(isset($_FILES["pic"]) && $_FILES["pic"]["error"] === UPLOAD_ERR_OK) {
|
||||||
if(!$gift->setImage($_FILES["pic"]["tmp_name"]))
|
if(!$gift->setImage($_FILES["pic"]["tmp_name"]))
|
||||||
$this->flashFail("err", "Не удалось сохранить подарок", "Изображение подарка кривое.");
|
$this->flashFail("err", tr("error_when_saving_gift"), tr("error_when_saving_gift_bad_image"));
|
||||||
} else if($gen) {
|
} else if($gen) {
|
||||||
# If there's no gift pic but it's newly created
|
# If there's no gift pic but it's newly created
|
||||||
$this->flashFail("err", "Не удалось сохранить подарок", "Пожалуйста, загрузите изображение подарка.");
|
$this->flashFail("err", tr("error_when_saving_gift"), tr("error_when_saving_gift_no_image"));
|
||||||
}
|
}
|
||||||
|
|
||||||
$gift->save();
|
$gift->save();
|
||||||
|
|
|
@ -55,7 +55,7 @@ final class CommentPresenter extends OpenVKPresenter
|
||||||
$this->flashFail("err", tr("error"), tr("forbidden"));
|
$this->flashFail("err", tr("error"), tr("forbidden"));
|
||||||
|
|
||||||
if($_FILES["_vid_attachment"] && OPENVK_ROOT_CONF['openvk']['preferences']['videos']['disableUploading'])
|
if($_FILES["_vid_attachment"] && OPENVK_ROOT_CONF['openvk']['preferences']['videos']['disableUploading'])
|
||||||
$this->flashFail("err", tr("error"), "Video uploads are disabled by the system administrator.");
|
$this->flashFail("err", tr("error"), tr("video_uploads_disabled"));
|
||||||
|
|
||||||
$flags = 0;
|
$flags = 0;
|
||||||
if($this->postParam("as_group") === "on" && !is_null($club) && $club->canBeModifiedBy($this->user->identity))
|
if($this->postParam("as_group") === "on" && !is_null($club) && $club->canBeModifiedBy($this->user->identity))
|
||||||
|
@ -66,7 +66,7 @@ final class CommentPresenter extends OpenVKPresenter
|
||||||
try {
|
try {
|
||||||
$photo = Photo::fastMake($this->user->id, $this->postParam("text"), $_FILES["_pic_attachment"]);
|
$photo = Photo::fastMake($this->user->id, $this->postParam("text"), $_FILES["_pic_attachment"]);
|
||||||
} catch(ISE $ex) {
|
} catch(ISE $ex) {
|
||||||
$this->flashFail("err", "Не удалось опубликовать пост", "Файл изображения повреждён, слишком велик или одна сторона изображения в разы больше другой.");
|
$this->flashFail("err", tr("error_when_publishing_comment"), tr("error_when_publishing_comment_description"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ final class CommentPresenter extends OpenVKPresenter
|
||||||
$photo = Photo::fastMake($this->user->id, $this->postParam("text"), $_FILES["_pic_attachment"], $album);
|
$photo = Photo::fastMake($this->user->id, $this->postParam("text"), $_FILES["_pic_attachment"], $album);
|
||||||
}
|
}
|
||||||
} catch(ISE $ex) {
|
} catch(ISE $ex) {
|
||||||
$this->flashFail("err", "Не удалось опубликовать комментарий", "Файл медиаконтента повреждён или слишком велик.");
|
$this->flashFail("err", tr("error_when_publishing_comment"), tr("error_comment_file_too_big"));
|
||||||
}
|
}
|
||||||
|
|
||||||
$videos = [];
|
$videos = [];
|
||||||
|
@ -104,7 +104,7 @@ final class CommentPresenter extends OpenVKPresenter
|
||||||
}
|
}
|
||||||
|
|
||||||
if(empty($this->postParam("text")) && !$photo && !$video)
|
if(empty($this->postParam("text")) && !$photo && !$video)
|
||||||
$this->flashFail("err", "Не удалось опубликовать комментарий", "Комментарий пустой или слишком большой.");
|
$this->flashFail("err", tr("error_when_publishing_comment"), tr("error_comment_empty"));
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$comment = new Comment;
|
$comment = new Comment;
|
||||||
|
@ -116,7 +116,7 @@ final class CommentPresenter extends OpenVKPresenter
|
||||||
$comment->setFlags($flags);
|
$comment->setFlags($flags);
|
||||||
$comment->save();
|
$comment->save();
|
||||||
} catch (\LengthException $ex) {
|
} catch (\LengthException $ex) {
|
||||||
$this->flashFail("err", "Не удалось опубликовать комментарий", "Комментарий слишком большой.");
|
$this->flashFail("err", tr("error_when_publishing_comment"), tr("error_comment_too_big"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!is_null($photo))
|
if(!is_null($photo))
|
||||||
|
@ -139,7 +139,7 @@ final class CommentPresenter extends OpenVKPresenter
|
||||||
if($mentionee instanceof User)
|
if($mentionee instanceof User)
|
||||||
(new MentionNotification($mentionee, $entity, $comment->getOwner(), strip_tags($comment->getText())))->emit();
|
(new MentionNotification($mentionee, $entity, $comment->getOwner(), strip_tags($comment->getText())))->emit();
|
||||||
|
|
||||||
$this->flashFail("succ", "Комментарий добавлен", "Ваш комментарий появится на странице.");
|
$this->flashFail("succ", tr("comment_is_added"), tr("comment_is_added_desc"));
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderDeleteComment(int $id): void
|
function renderDeleteComment(int $id): void
|
||||||
|
@ -150,15 +150,15 @@ final class CommentPresenter extends OpenVKPresenter
|
||||||
$comment = (new Comments)->get($id);
|
$comment = (new Comments)->get($id);
|
||||||
if(!$comment) $this->notFound();
|
if(!$comment) $this->notFound();
|
||||||
if(!$comment->canBeDeletedBy($this->user->identity))
|
if(!$comment->canBeDeletedBy($this->user->identity))
|
||||||
$this->throwError(403, "Forbidden", "У вас недостаточно прав чтобы редактировать этот ресурс.");
|
$this->throwError(403, "Forbidden", tr("error_access_denied"));
|
||||||
if ($comment->getTarget() instanceof Post && $comment->getTarget()->getWallOwner()->isBanned())
|
if ($comment->getTarget() instanceof Post && $comment->getTarget()->getWallOwner()->isBanned())
|
||||||
$this->flashFail("err", tr("error"), tr("forbidden"));
|
$this->flashFail("err", tr("error"), tr("forbidden"));
|
||||||
|
|
||||||
$comment->delete();
|
$comment->delete();
|
||||||
$this->flashFail(
|
$this->flashFail(
|
||||||
"succ",
|
"succ",
|
||||||
"Успешно",
|
tr("success"),
|
||||||
"Этот комментарий больше не будет показыватся.<br/><a href='/al_comments/spam?$id'>Отметить как спам</a>?"
|
tr("comment_will_not_appear")
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,7 @@ final class GiftsPresenter extends OpenVKPresenter
|
||||||
$user = $this->users->get((int) ($this->queryParam("user") ?? 0));
|
$user = $this->users->get((int) ($this->queryParam("user") ?? 0));
|
||||||
$cat = $this->gifts->getCat((int) ($this->queryParam("pack") ?? 0));
|
$cat = $this->gifts->getCat((int) ($this->queryParam("pack") ?? 0));
|
||||||
if(!$user || !$cat)
|
if(!$user || !$cat)
|
||||||
$this->flashFail("err", "Не удалось подарить", "Пользователь или набор не существуют.");
|
$this->flashFail("err", tr("error_when_gifting"), tr("error_user_not_exists"));
|
||||||
|
|
||||||
$this->template->page = $page = (int) ($this->queryParam("p") ?? 1);
|
$this->template->page = $page = (int) ($this->queryParam("p") ?? 1);
|
||||||
$gifts = $cat->getGifts($page, null, $this->template->count);
|
$gifts = $cat->getGifts($page, null, $this->template->count);
|
||||||
|
@ -66,14 +66,14 @@ final class GiftsPresenter extends OpenVKPresenter
|
||||||
$gift = $this->gifts->get((int) ($this->queryParam("elid") ?? 0));
|
$gift = $this->gifts->get((int) ($this->queryParam("elid") ?? 0));
|
||||||
$cat = $this->gifts->getCat((int) ($this->queryParam("pack") ?? 0));
|
$cat = $this->gifts->getCat((int) ($this->queryParam("pack") ?? 0));
|
||||||
if(!$user || !$cat || !$gift || !$cat->hasGift($gift))
|
if(!$user || !$cat || !$gift || !$cat->hasGift($gift))
|
||||||
$this->flashFail("err", "Не удалось подарить", "Не удалось подтвердить права на подарок.");
|
$this->flashFail("err", tr("error_when_gifting"), tr("error_no_rights_gifts"));
|
||||||
|
|
||||||
if(!$gift->canUse($this->user->identity))
|
if(!$gift->canUse($this->user->identity))
|
||||||
$this->flashFail("err", "Не удалось подарить", "У вас больше не осталось таких подарков.");
|
$this->flashFail("err", tr("error_when_gifting"), tr("error_no_more_gifts"));
|
||||||
|
|
||||||
$coinsLeft = $this->user->identity->getCoins() - $gift->getPrice();
|
$coinsLeft = $this->user->identity->getCoins() - $gift->getPrice();
|
||||||
if($coinsLeft < 0)
|
if($coinsLeft < 0)
|
||||||
$this->flashFail("err", "Не удалось подарить", "Ору нищ не пук.");
|
$this->flashFail("err", tr("error_when_gifting"), tr("error_no_money"));
|
||||||
|
|
||||||
$this->template->_template = "Gifts/Confirm.xml";
|
$this->template->_template = "Gifts/Confirm.xml";
|
||||||
if($_SERVER["REQUEST_METHOD"] !== "POST") {
|
if($_SERVER["REQUEST_METHOD"] !== "POST") {
|
||||||
|
@ -91,7 +91,7 @@ final class GiftsPresenter extends OpenVKPresenter
|
||||||
$user->gift($this->user->identity, $gift, $comment, !is_null($this->postParam("anonymous")));
|
$user->gift($this->user->identity, $gift, $comment, !is_null($this->postParam("anonymous")));
|
||||||
$gift->used();
|
$gift->used();
|
||||||
|
|
||||||
$this->flash("succ", "Подарок отправлен", "Вы отправили подарок <b>" . $user->getFirstName() . "</b> за " . $gift->getPrice() . " голосов.");
|
$this->flash("succ", tr("gift_sent"), tr("gift_sent_desc", $user->getFirstName(), $gift->getPrice()));
|
||||||
$this->redirect($user->getURL());
|
$this->redirect($user->getURL());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ final class GroupPresenter extends OpenVKPresenter
|
||||||
$club->save();
|
$club->save();
|
||||||
} catch(\PDOException $ex) {
|
} catch(\PDOException $ex) {
|
||||||
if($ex->getCode() == 23000)
|
if($ex->getCode() == 23000)
|
||||||
$this->flashFail("err", "Ошибка", "Произошла ошибка на стороне сервера. Обратитесь к системному администратору.");
|
$this->flashFail("err", tr("error"), tr("error_on_server_side"));
|
||||||
else
|
else
|
||||||
throw $ex;
|
throw $ex;
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,7 @@ final class GroupPresenter extends OpenVKPresenter
|
||||||
$club->toggleSubscription($this->user->identity);
|
$club->toggleSubscription($this->user->identity);
|
||||||
$this->redirect("/club" . $club->getId());
|
$this->redirect("/club" . $club->getId());
|
||||||
}else{
|
}else{
|
||||||
$this->flashFail("err", "Ошибка", "Вы не ввели название группы.");
|
$this->flashFail("err", tr("error"), tr("error_no_group_name"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -132,7 +132,7 @@ final class GroupPresenter extends OpenVKPresenter
|
||||||
$this->notFound();
|
$this->notFound();
|
||||||
|
|
||||||
if(!$club->canBeModifiedBy($this->user->identity ?? NULL))
|
if(!$club->canBeModifiedBy($this->user->identity ?? NULL))
|
||||||
$this->flashFail("err", "Ошибка доступа", "У вас недостаточно прав, чтобы изменять этот ресурс.");
|
$this->flashFail("err", tr("error_access_denied_short"), tr("error_access_denied"));
|
||||||
|
|
||||||
if(!is_null($hidden)) {
|
if(!is_null($hidden)) {
|
||||||
if($club->getOwner()->getId() == $user->getId()) {
|
if($club->getOwner()->getId() == $user->getId()) {
|
||||||
|
@ -150,9 +150,9 @@ final class GroupPresenter extends OpenVKPresenter
|
||||||
}
|
}
|
||||||
|
|
||||||
if($hidden) {
|
if($hidden) {
|
||||||
$this->flashFail("succ", "Операция успешна", "Теперь " . $user->getCanonicalName() . " будет показываться как обычный подписчик всем кроме других администраторов");
|
$this->flashFail("succ", tr("success_action"), tr("x_is_now_hidden", $user->getCanonicalName()));
|
||||||
} else {
|
} else {
|
||||||
$this->flashFail("succ", "Операция успешна", "Теперь все будут знать про то что " . $user->getCanonicalName() . " - администратор");
|
$this->flashFail("succ", tr("success_action"), tr("x_is_now_showed", $user->getCanonicalName()));
|
||||||
}
|
}
|
||||||
} elseif($removeComment) {
|
} elseif($removeComment) {
|
||||||
if($club->getOwner()->getId() == $user->getId()) {
|
if($club->getOwner()->getId() == $user->getId()) {
|
||||||
|
@ -164,11 +164,11 @@ final class GroupPresenter extends OpenVKPresenter
|
||||||
$manager->save();
|
$manager->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->flashFail("succ", "Операция успешна", "Комментарий к администратору удален");
|
$this->flashFail("succ", tr("success_action"), tr("comment_is_deleted"));
|
||||||
} elseif($comment) {
|
} elseif($comment) {
|
||||||
if(mb_strlen($comment) > 36) {
|
if(mb_strlen($comment) > 36) {
|
||||||
$commentLength = (string) mb_strlen($comment);
|
$commentLength = (string) mb_strlen($comment);
|
||||||
$this->flashFail("err", "Ошибка", "Комментарий слишком длинный ($commentLength символов вместо 36 символов)");
|
$this->flashFail("err", tr("error"), tr("comment_is_too_long", $commentLength));
|
||||||
}
|
}
|
||||||
|
|
||||||
if($club->getOwner()->getId() == $user->getId()) {
|
if($club->getOwner()->getId() == $user->getId()) {
|
||||||
|
@ -180,16 +180,16 @@ final class GroupPresenter extends OpenVKPresenter
|
||||||
$manager->save();
|
$manager->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->flashFail("succ", "Операция успешна", "Комментарий к администратору изменён");
|
$this->flashFail("succ", tr("success_action"), tr("comment_is_changed"));
|
||||||
}else{
|
}else{
|
||||||
if($club->canBeModifiedBy($user)) {
|
if($club->canBeModifiedBy($user)) {
|
||||||
$club->removeManager($user);
|
$club->removeManager($user);
|
||||||
$this->flashFail("succ", "Операция успешна", $user->getCanonicalName() . " более не администратор.");
|
$this->flashFail("succ", tr("success_action"), tr("x_no_more_admin", $user->getCanonicalName()));
|
||||||
} else {
|
} else {
|
||||||
$club->addManager($user);
|
$club->addManager($user);
|
||||||
|
|
||||||
(new ClubModeratorNotification($user, $club, $this->user->identity))->emit();
|
(new ClubModeratorNotification($user, $club, $this->user->identity))->emit();
|
||||||
$this->flashFail("succ", "Операция успешна", $user->getCanonicalName() . " назначен(а) администратором.");
|
$this->flashFail("succ", tr("success_action"), tr("x_is_admin", $user->getCanonicalName()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -245,7 +245,7 @@ final class GroupPresenter extends OpenVKPresenter
|
||||||
(new Albums)->getClubAvatarAlbum($club)->addPhoto($photo);
|
(new Albums)->getClubAvatarAlbum($club)->addPhoto($photo);
|
||||||
} catch(ISE $ex) {
|
} catch(ISE $ex) {
|
||||||
$name = $album->getName();
|
$name = $album->getName();
|
||||||
$this->flashFail("err", "Неизвестная ошибка", "Не удалось сохранить фотографию.");
|
$this->flashFail("err", tr("error"), tr("error_when_uploading_photo"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -253,12 +253,12 @@ final class GroupPresenter extends OpenVKPresenter
|
||||||
$club->save();
|
$club->save();
|
||||||
} catch(\PDOException $ex) {
|
} catch(\PDOException $ex) {
|
||||||
if($ex->getCode() == 23000)
|
if($ex->getCode() == 23000)
|
||||||
$this->flashFail("err", "Ошибка", "Произошла ошибка на стороне сервера. Обратитесь к системному администратору.");
|
$this->flashFail("err", tr("error"), tr("error_on_server_side"));
|
||||||
else
|
else
|
||||||
throw $ex;
|
throw $ex;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->flash("succ", "Изменения сохранены", "Новые данные появятся в вашей группе.");
|
$this->flash("succ", tr("changes_saved"), tr("new_changes_desc"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -298,7 +298,7 @@ final class GroupPresenter extends OpenVKPresenter
|
||||||
|
|
||||||
} catch(ISE $ex) {
|
} catch(ISE $ex) {
|
||||||
$name = $album->getName();
|
$name = $album->getName();
|
||||||
$this->flashFail("err", "Неизвестная ошибка", "Не удалось сохранить фотографию.");
|
$this->flashFail("err", tr("error"), tr("error_when_uploading_photo"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->returnJson([
|
$this->returnJson([
|
||||||
|
@ -350,7 +350,7 @@ final class GroupPresenter extends OpenVKPresenter
|
||||||
$this->assertUserLoggedIn();
|
$this->assertUserLoggedIn();
|
||||||
|
|
||||||
if(!eventdb())
|
if(!eventdb())
|
||||||
$this->flashFail("err", "Ошибка подключения", "Не удалось подключится к службе телеметрии.");
|
$this->flashFail("err", tr("connection_error"), tr("connection_error_desc"));
|
||||||
|
|
||||||
$club = $this->clubs->get($id);
|
$club = $this->clubs->get($id);
|
||||||
if(!$club->canBeModifiedBy($this->user->identity))
|
if(!$club->canBeModifiedBy($this->user->identity))
|
||||||
|
|
|
@ -107,7 +107,7 @@ final class NotesPresenter extends OpenVKPresenter
|
||||||
if(!$note || $note->getOwner()->getId() !== $owner || $note->isDeleted())
|
if(!$note || $note->getOwner()->getId() !== $owner || $note->isDeleted())
|
||||||
$this->notFound();
|
$this->notFound();
|
||||||
if(is_null($this->user) || !$note->canBeModifiedBy($this->user->identity))
|
if(is_null($this->user) || !$note->canBeModifiedBy($this->user->identity))
|
||||||
$this->flashFail("err", "Ошибка доступа", "Недостаточно прав для модификации данного ресурса.");
|
$this->flashFail("err", tr("error_access_denied_short"), tr("error_access_denied"));
|
||||||
$this->template->note = $note;
|
$this->template->note = $note;
|
||||||
|
|
||||||
if($_SERVER["REQUEST_METHOD"] === "POST") {
|
if($_SERVER["REQUEST_METHOD"] === "POST") {
|
||||||
|
@ -135,11 +135,11 @@ final class NotesPresenter extends OpenVKPresenter
|
||||||
if(!$note) $this->notFound();
|
if(!$note) $this->notFound();
|
||||||
if($note->getOwner()->getId() . "_" . $note->getId() !== $owner . "_" . $id || $note->isDeleted()) $this->notFound();
|
if($note->getOwner()->getId() . "_" . $note->getId() !== $owner . "_" . $id || $note->isDeleted()) $this->notFound();
|
||||||
if(is_null($this->user) || !$note->canBeModifiedBy($this->user->identity))
|
if(is_null($this->user) || !$note->canBeModifiedBy($this->user->identity))
|
||||||
$this->flashFail("err", "Ошибка доступа", "Недостаточно прав для модификации данного ресурса.");
|
$this->flashFail("err", tr("error_access_denied_short"), tr("error_access_denied"));
|
||||||
|
|
||||||
$name = $note->getName();
|
$name = $note->getName();
|
||||||
$note->delete();
|
$note->delete();
|
||||||
$this->flash("succ", "Заметка удалена", "Заметка \"$name\" была успешно удалена.");
|
$this->flash("succ", tr("note_is_deleted"), tr("note_x_is_now_deleted", $name));
|
||||||
$this->redirect("/notes" . $this->user->id);
|
$this->redirect("/notes" . $this->user->id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ final class PhotosPresenter extends OpenVKPresenter
|
||||||
if(!$user) $this->notFound();
|
if(!$user) $this->notFound();
|
||||||
if (!$user->getPrivacyPermission('photos.read', $this->user->identity ?? NULL))
|
if (!$user->getPrivacyPermission('photos.read', $this->user->identity ?? NULL))
|
||||||
$this->flashFail("err", tr("forbidden"), tr("forbidden_comment"));
|
$this->flashFail("err", tr("forbidden"), tr("forbidden_comment"));
|
||||||
$this->template->albums = $this->albums->getUserAlbums($user, $this->queryParam("p") ?? 1);
|
$this->template->albums = $this->albums->getUserAlbums($user, (int)($this->queryParam("p") ?? 1));
|
||||||
$this->template->count = $this->albums->getUserAlbumsCount($user);
|
$this->template->count = $this->albums->getUserAlbumsCount($user);
|
||||||
$this->template->owner = $user;
|
$this->template->owner = $user;
|
||||||
$this->template->canEdit = false;
|
$this->template->canEdit = false;
|
||||||
|
@ -36,7 +36,7 @@ final class PhotosPresenter extends OpenVKPresenter
|
||||||
} else {
|
} else {
|
||||||
$club = (new Clubs)->get(abs($owner));
|
$club = (new Clubs)->get(abs($owner));
|
||||||
if(!$club) $this->notFound();
|
if(!$club) $this->notFound();
|
||||||
$this->template->albums = $this->albums->getClubAlbums($club, $this->queryParam("p") ?? 1);
|
$this->template->albums = $this->albums->getClubAlbums($club, (int)($this->queryParam("p") ?? 1));
|
||||||
$this->template->count = $this->albums->getClubAlbumsCount($club);
|
$this->template->count = $this->albums->getClubAlbumsCount($club);
|
||||||
$this->template->owner = $club;
|
$this->template->owner = $club;
|
||||||
$this->template->canEdit = false;
|
$this->template->canEdit = false;
|
||||||
|
@ -46,7 +46,7 @@ final class PhotosPresenter extends OpenVKPresenter
|
||||||
|
|
||||||
$this->template->paginatorConf = (object) [
|
$this->template->paginatorConf = (object) [
|
||||||
"count" => $this->template->count,
|
"count" => $this->template->count,
|
||||||
"page" => $this->queryParam("p") ?? 1,
|
"page" => (int)($this->queryParam("p") ?? 1),
|
||||||
"amount" => NULL,
|
"amount" => NULL,
|
||||||
"perPage" => OPENVK_DEFAULT_PER_PAGE,
|
"perPage" => OPENVK_DEFAULT_PER_PAGE,
|
||||||
];
|
];
|
||||||
|
@ -94,7 +94,7 @@ final class PhotosPresenter extends OpenVKPresenter
|
||||||
if(!$album) $this->notFound();
|
if(!$album) $this->notFound();
|
||||||
if($album->getPrettyId() !== $owner . "_" . $id || $album->isDeleted()) $this->notFound();
|
if($album->getPrettyId() !== $owner . "_" . $id || $album->isDeleted()) $this->notFound();
|
||||||
if(is_null($this->user) || !$album->canBeModifiedBy($this->user->identity) || $album->isDeleted())
|
if(is_null($this->user) || !$album->canBeModifiedBy($this->user->identity) || $album->isDeleted())
|
||||||
$this->flashFail("err", "Ошибка доступа", "Недостаточно прав для модификации данного ресурса.");
|
$this->flashFail("err", tr("error_access_denied_short"), tr("error_access_denied"));
|
||||||
$this->template->album = $album;
|
$this->template->album = $album;
|
||||||
|
|
||||||
if($_SERVER["REQUEST_METHOD"] === "POST") {
|
if($_SERVER["REQUEST_METHOD"] === "POST") {
|
||||||
|
@ -106,7 +106,7 @@ final class PhotosPresenter extends OpenVKPresenter
|
||||||
$album->setEdited(time());
|
$album->setEdited(time());
|
||||||
$album->save();
|
$album->save();
|
||||||
|
|
||||||
$this->flash("succ", "Изменения сохранены", "Новые данные приняты.");
|
$this->flash("succ", tr("changes_saved"), tr("new_data_accepted"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,13 +120,13 @@ final class PhotosPresenter extends OpenVKPresenter
|
||||||
if(!$album) $this->notFound();
|
if(!$album) $this->notFound();
|
||||||
if($album->getPrettyId() !== $owner . "_" . $id || $album->isDeleted()) $this->notFound();
|
if($album->getPrettyId() !== $owner . "_" . $id || $album->isDeleted()) $this->notFound();
|
||||||
if(is_null($this->user) || !$album->canBeModifiedBy($this->user->identity))
|
if(is_null($this->user) || !$album->canBeModifiedBy($this->user->identity))
|
||||||
$this->flashFail("err", "Ошибка доступа", "Недостаточно прав для модификации данного ресурса.");
|
$this->flashFail("err", tr("error_access_denied_short"), tr("error_access_denied"));
|
||||||
|
|
||||||
$name = $album->getName();
|
$name = $album->getName();
|
||||||
$owner = $album->getOwner();
|
$owner = $album->getOwner();
|
||||||
$album->delete();
|
$album->delete();
|
||||||
|
|
||||||
$this->flash("succ", "Альбом удалён", "Альбом $name был успешно удалён.");
|
$this->flash("succ", tr("album_is_deleted"), tr("album_x_is_deleted", $name));
|
||||||
$this->redirect("/albums" . ($owner instanceof Club ? "-" : "") . $owner->getId());
|
$this->redirect("/albums" . ($owner instanceof Club ? "-" : "") . $owner->getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -147,7 +147,7 @@ final class PhotosPresenter extends OpenVKPresenter
|
||||||
$this->template->photos = iterator_to_array( $album->getPhotos( (int) ($this->queryParam("p") ?? 1), 20) );
|
$this->template->photos = iterator_to_array( $album->getPhotos( (int) ($this->queryParam("p") ?? 1), 20) );
|
||||||
$this->template->paginatorConf = (object) [
|
$this->template->paginatorConf = (object) [
|
||||||
"count" => $album->getPhotosCount(),
|
"count" => $album->getPhotosCount(),
|
||||||
"page" => $this->queryParam("p") ?? 1,
|
"page" => (int)($this->queryParam("p") ?? 1),
|
||||||
"amount" => sizeof($this->template->photos),
|
"amount" => sizeof($this->template->photos),
|
||||||
"perPage" => 20,
|
"perPage" => 20,
|
||||||
"atBottom" => true
|
"atBottom" => true
|
||||||
|
@ -205,13 +205,13 @@ final class PhotosPresenter extends OpenVKPresenter
|
||||||
$photo = $this->photos->getByOwnerAndVID($ownerId, $photoId);
|
$photo = $this->photos->getByOwnerAndVID($ownerId, $photoId);
|
||||||
if(!$photo) $this->notFound();
|
if(!$photo) $this->notFound();
|
||||||
if(is_null($this->user) || $this->user->id != $ownerId)
|
if(is_null($this->user) || $this->user->id != $ownerId)
|
||||||
$this->flashFail("err", "Ошибка доступа", "Недостаточно прав для модификации данного ресурса.");
|
$this->flashFail("err", tr("error_access_denied_short"), tr("error_access_denied"));
|
||||||
|
|
||||||
if($_SERVER["REQUEST_METHOD"] === "POST") {
|
if($_SERVER["REQUEST_METHOD"] === "POST") {
|
||||||
$photo->setDescription(empty($this->postParam("desc")) ? NULL : $this->postParam("desc"));
|
$photo->setDescription(empty($this->postParam("desc")) ? NULL : $this->postParam("desc"));
|
||||||
$photo->save();
|
$photo->save();
|
||||||
|
|
||||||
$this->flash("succ", "Изменения сохранены", "Обновлённое описание появится на странице с фоткой.");
|
$this->flash("succ", tr("changes_saved"), tr("new_description_will_appear"));
|
||||||
$this->redirect("/photo" . $photo->getPrettyId());
|
$this->redirect("/photo" . $photo->getPrettyId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -221,39 +221,74 @@ final class PhotosPresenter extends OpenVKPresenter
|
||||||
function renderUploadPhoto(): void
|
function renderUploadPhoto(): void
|
||||||
{
|
{
|
||||||
$this->assertUserLoggedIn();
|
$this->assertUserLoggedIn();
|
||||||
$this->willExecuteWriteAction();
|
$this->willExecuteWriteAction(true);
|
||||||
|
|
||||||
if(is_null($this->queryParam("album")))
|
if(is_null($this->queryParam("album")))
|
||||||
$this->flashFail("err", "Неизвестная ошибка", "Не удалось сохранить фотографию в <b>DELETED</b>.");
|
$this->flashFail("err", tr("error"), tr("error_adding_to_deleted"), 500, true);
|
||||||
|
|
||||||
[$owner, $id] = explode("_", $this->queryParam("album"));
|
[$owner, $id] = explode("_", $this->queryParam("album"));
|
||||||
$album = $this->albums->get((int) $id);
|
$album = $this->albums->get((int) $id);
|
||||||
if(!$album)
|
if(!$album)
|
||||||
$this->flashFail("err", "Неизвестная ошибка", "Не удалось сохранить фотографию в <b>DELETED</b>.");
|
$this->flashFail("err", tr("error"), tr("error_adding_to_deleted"), 500, true);
|
||||||
if(is_null($this->user) || !$album->canBeModifiedBy($this->user->identity))
|
if(is_null($this->user) || !$album->canBeModifiedBy($this->user->identity))
|
||||||
$this->flashFail("err", "Ошибка доступа", "Недостаточно прав для модификации данного ресурса.");
|
$this->flashFail("err", tr("error_access_denied_short"), tr("error_access_denied"), 500, true);
|
||||||
|
|
||||||
if($_SERVER["REQUEST_METHOD"] === "POST") {
|
if($_SERVER["REQUEST_METHOD"] === "POST") {
|
||||||
if(!isset($_FILES["blob"]))
|
if($this->queryParam("act") == "finish") {
|
||||||
$this->flashFail("err", "Нету фотографии", "Выберите файл.");
|
$result = json_decode($this->postParam("photos"), true);
|
||||||
|
|
||||||
|
foreach($result as $photoId => $description) {
|
||||||
|
$phot = $this->photos->get($photoId);
|
||||||
|
|
||||||
|
if(!$phot || $phot->isDeleted() || $phot->getOwner()->getId() != $this->user->id)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if(iconv_strlen($description) > 255)
|
||||||
|
$this->flashFail("err", tr("error"), tr("description_too_long"), 500, true);
|
||||||
|
|
||||||
|
$phot->setDescription($description);
|
||||||
|
$phot->save();
|
||||||
|
|
||||||
|
$album = $phot->getAlbum();
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->returnJson(["success" => true,
|
||||||
|
"album" => $album->getId(),
|
||||||
|
"owner" => $album->getOwner() instanceof User ? $album->getOwner()->getId() : $album->getOwner()->getId() * -1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!isset($_FILES))
|
||||||
|
$this->flashFail("err", tr("no_photo"), tr("select_file"), 500, true);
|
||||||
|
|
||||||
|
$photos = [];
|
||||||
|
for($i = 0; $i < $this->postParam("count"); $i++) {
|
||||||
try {
|
try {
|
||||||
$photo = new Photo;
|
$photo = new Photo;
|
||||||
$photo->setOwner($this->user->id);
|
$photo->setOwner($this->user->id);
|
||||||
$photo->setDescription($this->postParam("desc"));
|
$photo->setDescription("");
|
||||||
$photo->setFile($_FILES["blob"]);
|
$photo->setFile($_FILES["photo_".$i]);
|
||||||
$photo->setCreated(time());
|
$photo->setCreated(time());
|
||||||
$photo->save();
|
$photo->save();
|
||||||
|
|
||||||
|
$photos[] = [
|
||||||
|
"url" => $photo->getURLBySizeId("tiny"),
|
||||||
|
"id" => $photo->getId(),
|
||||||
|
"vid" => $photo->getVirtualId(),
|
||||||
|
"owner" => $photo->getOwner()->getId(),
|
||||||
|
"link" => $photo->getURL()
|
||||||
|
];
|
||||||
} catch(ISE $ex) {
|
} catch(ISE $ex) {
|
||||||
$name = $album->getName();
|
$name = $album->getName();
|
||||||
$this->flashFail("err", "Неизвестная ошибка", "Не удалось сохранить фотографию в <b>$name</b>.");
|
$this->flashFail("err", "Неизвестная ошибка", "Не удалось сохранить фотографию в $name.", 500, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
$album->addPhoto($photo);
|
$album->addPhoto($photo);
|
||||||
$album->setEdited(time());
|
$album->setEdited(time());
|
||||||
$album->save();
|
$album->save();
|
||||||
|
}
|
||||||
|
|
||||||
$this->redirect("/photo" . $photo->getPrettyId() . "?from=album" . $album->getId());
|
$this->returnJson(["success" => true,
|
||||||
|
"photos" => $photos]);
|
||||||
} else {
|
} else {
|
||||||
$this->template->album = $album;
|
$this->template->album = $album;
|
||||||
}
|
}
|
||||||
|
@ -269,7 +304,7 @@ final class PhotosPresenter extends OpenVKPresenter
|
||||||
if(!$album || !$photo) $this->notFound();
|
if(!$album || !$photo) $this->notFound();
|
||||||
if(!$album->hasPhoto($photo)) $this->notFound();
|
if(!$album->hasPhoto($photo)) $this->notFound();
|
||||||
if(is_null($this->user) || !$album->canBeModifiedBy($this->user->identity))
|
if(is_null($this->user) || !$album->canBeModifiedBy($this->user->identity))
|
||||||
$this->flashFail("err", "Ошибка доступа", "Недостаточно прав для модификации данного ресурса.");
|
$this->flashFail("err", tr("error_access_denied_short"), tr("error_access_denied"));
|
||||||
|
|
||||||
if($_SERVER["REQUEST_METHOD"] === "POST") {
|
if($_SERVER["REQUEST_METHOD"] === "POST") {
|
||||||
$this->assertNoCSRF();
|
$this->assertNoCSRF();
|
||||||
|
@ -277,7 +312,7 @@ final class PhotosPresenter extends OpenVKPresenter
|
||||||
$album->setEdited(time());
|
$album->setEdited(time());
|
||||||
$album->save();
|
$album->save();
|
||||||
|
|
||||||
$this->flash("succ", "Фотография удалена", "Эта фотография была успешно удалена.");
|
$this->flash("succ", tr("photo_is_deleted"), tr("photo_is_deleted_desc"));
|
||||||
$this->redirect("/album" . $album->getPrettyId());
|
$this->redirect("/album" . $album->getPrettyId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -285,20 +320,23 @@ final class PhotosPresenter extends OpenVKPresenter
|
||||||
function renderDeletePhoto(int $ownerId, int $photoId): void
|
function renderDeletePhoto(int $ownerId, int $photoId): void
|
||||||
{
|
{
|
||||||
$this->assertUserLoggedIn();
|
$this->assertUserLoggedIn();
|
||||||
$this->willExecuteWriteAction();
|
$this->willExecuteWriteAction($_SERVER["REQUEST_METHOD"] === "POST");
|
||||||
$this->assertNoCSRF();
|
$this->assertNoCSRF();
|
||||||
|
|
||||||
$photo = $this->photos->getByOwnerAndVID($ownerId, $photoId);
|
$photo = $this->photos->getByOwnerAndVID($ownerId, $photoId);
|
||||||
if(!$photo) $this->notFound();
|
if(!$photo) $this->notFound();
|
||||||
if(is_null($this->user) || $this->user->id != $ownerId)
|
if(is_null($this->user) || $this->user->id != $ownerId)
|
||||||
$this->flashFail("err", "Ошибка доступа", "Недостаточно прав для модификации данного ресурса.");
|
$this->flashFail("err", tr("error_access_denied_short"), tr("error_access_denied"));
|
||||||
|
|
||||||
$redirect = $photo->getAlbum()->getOwner() instanceof User ? "/id0" : "/club" . $ownerId;
|
$redirect = $photo->getAlbum()->getOwner() instanceof User ? "/id0" : "/club" . $ownerId;
|
||||||
|
|
||||||
$photo->isolate();
|
$photo->isolate();
|
||||||
$photo->delete();
|
$photo->delete();
|
||||||
|
|
||||||
$this->flash("succ", "Фотография удалена", "Эта фотография была успешно удалена.");
|
if($_SERVER["REQUEST_METHOD"] === "POST")
|
||||||
|
$this->returnJson(["success" => true]);
|
||||||
|
|
||||||
|
$this->flash("succ", tr("photo_is_deleted"), tr("photo_is_deleted_desc"));
|
||||||
$this->redirect($redirect);
|
$this->redirect($redirect);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -118,22 +118,22 @@ final class ReportPresenter extends OpenVKPresenter
|
||||||
$report->deleteContent();
|
$report->deleteContent();
|
||||||
$report->banUser($this->user->identity->getId());
|
$report->banUser($this->user->identity->getId());
|
||||||
|
|
||||||
$this->flash("suc", "Смэрть...", "Пользователь успешно забанен.");
|
$this->flash("suc", tr("death"), tr("user_successfully_banned"));
|
||||||
} else if ($this->postParam("delete")) {
|
} else if ($this->postParam("delete")) {
|
||||||
$report->deleteContent();
|
$report->deleteContent();
|
||||||
|
|
||||||
$this->flash("suc", "Нехай живе!", "Контент удалён, а пользователю прилетело предупреждение.");
|
$this->flash("suc", tr("nehay"), tr("content_is_deleted"));
|
||||||
} else if ($this->postParam("ignore")) {
|
} else if ($this->postParam("ignore")) {
|
||||||
$report->delete();
|
$report->delete();
|
||||||
|
|
||||||
$this->flash("suc", "Нехай живе!", "Жалоба проигнорирована.");
|
$this->flash("suc", tr("nehay"), tr("report_is_ignored"));
|
||||||
} else if ($this->postParam("banClubOwner") || $this->postParam("banClub")) {
|
} else if ($this->postParam("banClubOwner") || $this->postParam("banClub")) {
|
||||||
if ($report->getContentType() !== "group")
|
if ($report->getContentType() !== "group")
|
||||||
$this->flashFail("err", "Ошибка доступа", "Недостаточно прав для модификации данного ресурса.");
|
$this->flashFail("err", tr("error_access_denied_short"), tr("error_access_denied"));
|
||||||
|
|
||||||
$club = $report->getContentObject();
|
$club = $report->getContentObject();
|
||||||
if (!$club || $club->isBanned())
|
if (!$club || $club->isBanned())
|
||||||
$this->flashFail("err", "Ошибка доступа", "Недостаточно прав для модификации данного ресурса.");
|
$this->flashFail("err", tr("error_access_denied_short"), tr("error_access_denied"));
|
||||||
|
|
||||||
if ($this->postParam("banClubOwner")) {
|
if ($this->postParam("banClubOwner")) {
|
||||||
$club->getOwner()->ban("**content-" . $report->getContentType() . "-" . $report->getContentId() . "**", false, $club->getOwner()->getNewBanTime(), $this->user->identity->getId());
|
$club->getOwner()->ban("**content-" . $report->getContentType() . "-" . $report->getContentId() . "**", false, $club->getOwner()->getNewBanTime(), $this->user->identity->getId());
|
||||||
|
@ -143,7 +143,7 @@ final class ReportPresenter extends OpenVKPresenter
|
||||||
|
|
||||||
$report->delete();
|
$report->delete();
|
||||||
|
|
||||||
$this->flash("suc", "Смэрть...", ($this->postParam("banClubOwner") ? "Создатель сообщества успешно забанен." : "Сообщество успешно забанено"));
|
$this->flash("suc", tr("death"), ($this->postParam("banClubOwner") ? tr("group_owner_is_banned") : tr("group_is_banned")));
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->redirect("/scumfeed");
|
$this->redirect("/scumfeed");
|
||||||
|
|
|
@ -111,7 +111,7 @@ final class TopicsPresenter extends OpenVKPresenter
|
||||||
$video = Video::fastMake($this->user->id, $_FILES["_vid_attachment"]["name"], $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) {
|
} catch(ISE $ex) {
|
||||||
$this->flash("err", "Не удалось опубликовать комментарий", "Файл медиаконтента повреждён или слишком велик.");
|
$this->flash("err", tr("error_when_publishing_comment"), tr("error_comment_file_too_big"));
|
||||||
$this->redirect("/topic" . $topic->getPrettyId());
|
$this->redirect("/topic" . $topic->getPrettyId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ final class TopicsPresenter extends OpenVKPresenter
|
||||||
$comment->setFlags($flags);
|
$comment->setFlags($flags);
|
||||||
$comment->save();
|
$comment->save();
|
||||||
} catch (\LengthException $ex) {
|
} catch (\LengthException $ex) {
|
||||||
$this->flash("err", "Не удалось опубликовать комментарий", "Комментарий слишком большой.");
|
$this->flash("err", tr("error_when_publishing_comment"), tr("error_comment_too_big"));
|
||||||
$this->redirect("/topic" . $topic->getPrettyId());
|
$this->redirect("/topic" . $topic->getPrettyId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@ final class UserPresenter extends OpenVKPresenter
|
||||||
if(!is_null($this->user)) {
|
if(!is_null($this->user)) {
|
||||||
if($this->template->mode !== "friends" && $this->user->id !== $id) {
|
if($this->template->mode !== "friends" && $this->user->id !== $id) {
|
||||||
$name = $user->getFullName();
|
$name = $user->getFullName();
|
||||||
$this->flash("err", "Ошибка доступа", "Вы не можете просматривать полный список подписок $name.");
|
$this->flash("err", tr("error_access_denied_short"), tr("error_viewing_subs", $name));
|
||||||
|
|
||||||
$this->redirect($user->getURL());
|
$this->redirect($user->getURL());
|
||||||
}
|
}
|
||||||
|
@ -107,11 +107,11 @@ final class UserPresenter extends OpenVKPresenter
|
||||||
$this->notFound();
|
$this->notFound();
|
||||||
|
|
||||||
if(!$club->canBeModifiedBy($this->user->identity ?? NULL))
|
if(!$club->canBeModifiedBy($this->user->identity ?? NULL))
|
||||||
$this->flashFail("err", "Ошибка доступа", "У вас недостаточно прав, чтобы изменять этот ресурс.", NULL, true);
|
$this->flashFail("err", tr("error_access_denied_short"), tr("error_access_denied"), NULL, true);
|
||||||
|
|
||||||
$isClubPinned = $this->user->identity->isClubPinned($club);
|
$isClubPinned = $this->user->identity->isClubPinned($club);
|
||||||
if(!$isClubPinned && $this->user->identity->getPinnedClubCount() > 10)
|
if(!$isClubPinned && $this->user->identity->getPinnedClubCount() > 10)
|
||||||
$this->flashFail("err", "Ошибка", "Находится в левом меню могут максимум 10 групп", NULL, true);
|
$this->flashFail("err", tr("error"), tr("error_max_pinned_clubs"), NULL, true);
|
||||||
|
|
||||||
if($club->getOwner()->getId() === $this->user->identity->getId()) {
|
if($club->getOwner()->getId() === $this->user->identity->getId()) {
|
||||||
$club->setOwner_Club_Pinned(!$isClubPinned);
|
$club->setOwner_Club_Pinned(!$isClubPinned);
|
||||||
|
@ -237,7 +237,7 @@ final class UserPresenter extends OpenVKPresenter
|
||||||
} elseif($_GET['act'] === "status") {
|
} elseif($_GET['act'] === "status") {
|
||||||
if(mb_strlen($this->postParam("status")) > 255) {
|
if(mb_strlen($this->postParam("status")) > 255) {
|
||||||
$statusLength = (string) mb_strlen($this->postParam("status"));
|
$statusLength = (string) mb_strlen($this->postParam("status"));
|
||||||
$this->flashFail("err", "Ошибка", "Статус слишком длинный ($statusLength символов вместо 255 символов)", NULL, true);
|
$this->flashFail("err", tr("error"), tr("error_status_too_long", $statusLength), NULL, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
$user->setStatus(empty($this->postParam("status")) ? NULL : $this->postParam("status"));
|
$user->setStatus(empty($this->postParam("status")) ? NULL : $this->postParam("status"));
|
||||||
|
@ -281,7 +281,7 @@ final class UserPresenter extends OpenVKPresenter
|
||||||
|
|
||||||
if($_SERVER["REQUEST_METHOD"] === "POST") {
|
if($_SERVER["REQUEST_METHOD"] === "POST") {
|
||||||
if(!$user->verifyNumber($this->postParam("code") ?? 0))
|
if(!$user->verifyNumber($this->postParam("code") ?? 0))
|
||||||
$this->flashFail("err", "Ошибка", "Не удалось подтвердить номер телефона: неверный код.");
|
$this->flashFail("err", tr("error"), tr("invalid_code"));
|
||||||
|
|
||||||
$this->flash("succ", tr("changes_saved"), tr("changes_saved_comment"));
|
$this->flash("succ", tr("changes_saved"), tr("changes_saved_comment"));
|
||||||
}
|
}
|
||||||
|
@ -481,6 +481,7 @@ final class UserPresenter extends OpenVKPresenter
|
||||||
"menu_novajoj" => "news",
|
"menu_novajoj" => "news",
|
||||||
"menu_ligiloj" => "links",
|
"menu_ligiloj" => "links",
|
||||||
"menu_standardo" => "poster",
|
"menu_standardo" => "poster",
|
||||||
|
"menu_aplikoj" => "apps"
|
||||||
];
|
];
|
||||||
foreach($settings as $checkbox => $setting)
|
foreach($settings as $checkbox => $setting)
|
||||||
$user->setLeftMenuItemStatus($setting, $this->checkbox($checkbox));
|
$user->setLeftMenuItemStatus($setting, $this->checkbox($checkbox));
|
||||||
|
|
|
@ -58,7 +58,7 @@ final class VideosPresenter extends OpenVKPresenter
|
||||||
$this->willExecuteWriteAction();
|
$this->willExecuteWriteAction();
|
||||||
|
|
||||||
if(OPENVK_ROOT_CONF['openvk']['preferences']['videos']['disableUploading'])
|
if(OPENVK_ROOT_CONF['openvk']['preferences']['videos']['disableUploading'])
|
||||||
$this->flashFail("err", tr("error"), "Video uploads are disabled by the system administrator.");
|
$this->flashFail("err", tr("error"), tr("video_uploads_disabled"));
|
||||||
|
|
||||||
if($_SERVER["REQUEST_METHOD"] === "POST") {
|
if($_SERVER["REQUEST_METHOD"] === "POST") {
|
||||||
if(!empty($this->postParam("name"))) {
|
if(!empty($this->postParam("name"))) {
|
||||||
|
@ -74,18 +74,18 @@ final class VideosPresenter extends OpenVKPresenter
|
||||||
else if(!empty($this->postParam("link")))
|
else if(!empty($this->postParam("link")))
|
||||||
$video->setLink($this->postParam("link"));
|
$video->setLink($this->postParam("link"));
|
||||||
else
|
else
|
||||||
$this->flashFail("err", "Нету видеозаписи", "Выберите файл или укажите ссылку.");
|
$this->flashFail("err", tr("no_video"), tr("no_video_desc"));
|
||||||
} catch(\DomainException $ex) {
|
} catch(\DomainException $ex) {
|
||||||
$this->flashFail("err", "Произошла ошибка", "Файл повреждён или не содержит видео." );
|
$this->flashFail("err", tr("error_occured"), tr("error_video_damaged_file"));
|
||||||
} catch(ISE $ex) {
|
} catch(ISE $ex) {
|
||||||
$this->flashFail("err", "Произошла ошибка", "Возможно, ссылка некорректна.");
|
$this->flashFail("err", tr("error_occured"), tr("error_video_incorrect_link"));
|
||||||
}
|
}
|
||||||
|
|
||||||
$video->save();
|
$video->save();
|
||||||
|
|
||||||
$this->redirect("/video" . $video->getPrettyId());
|
$this->redirect("/video" . $video->getPrettyId());
|
||||||
} else {
|
} else {
|
||||||
$this->flashFail("err", "Произошла ошибка", "Видео не может быть опубликовано без названия.");
|
$this->flashFail("err", tr("error_occured"), tr("error_video_no_title"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -99,14 +99,14 @@ final class VideosPresenter extends OpenVKPresenter
|
||||||
if(!$video)
|
if(!$video)
|
||||||
$this->notFound();
|
$this->notFound();
|
||||||
if(is_null($this->user) || $this->user->id !== $owner)
|
if(is_null($this->user) || $this->user->id !== $owner)
|
||||||
$this->flashFail("err", "Ошибка доступа", "Вы не имеете права редактировать этот ресурс.");
|
$this->flashFail("err", tr("error_access_denied_short"), tr("error_access_denied"));
|
||||||
|
|
||||||
if($_SERVER["REQUEST_METHOD"] === "POST") {
|
if($_SERVER["REQUEST_METHOD"] === "POST") {
|
||||||
$video->setName(empty($this->postParam("name")) ? NULL : $this->postParam("name"));
|
$video->setName(empty($this->postParam("name")) ? NULL : $this->postParam("name"));
|
||||||
$video->setDescription(empty($this->postParam("desc")) ? NULL : $this->postParam("desc"));
|
$video->setDescription(empty($this->postParam("desc")) ? NULL : $this->postParam("desc"));
|
||||||
$video->save();
|
$video->save();
|
||||||
|
|
||||||
$this->flash("succ", "Изменения сохранены", "Обновлённое описание появится на странице с видосиком.");
|
$this->flash("succ", tr("changes_saved"), tr("new_data_video"));
|
||||||
$this->redirect("/video" . $video->getPrettyId());
|
$this->redirect("/video" . $video->getPrettyId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ final class VideosPresenter extends OpenVKPresenter
|
||||||
$video->deleteVideo($owner, $vid);
|
$video->deleteVideo($owner, $vid);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$this->flashFail("err", "Не удалось удалить пост", "Вы не вошли в аккаунт.");
|
$this->flashFail("err", tr("error_deleting_video"), tr("login_please"));
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->redirect("/videos" . $owner);
|
$this->redirect("/videos" . $owner);
|
||||||
|
|
|
@ -3,7 +3,7 @@ namespace openvk\Web\Presenters;
|
||||||
use openvk\Web\Models\Exceptions\TooMuchOptionsException;
|
use openvk\Web\Models\Exceptions\TooMuchOptionsException;
|
||||||
use openvk\Web\Models\Entities\{Poll, Post, Photo, Video, Club, User};
|
use openvk\Web\Models\Entities\{Poll, Post, Photo, Video, Club, User};
|
||||||
use openvk\Web\Models\Entities\Notifications\{MentionNotification, RepostNotification, WallPostNotification};
|
use openvk\Web\Models\Entities\Notifications\{MentionNotification, RepostNotification, WallPostNotification};
|
||||||
use openvk\Web\Models\Repositories\{Posts, Users, Clubs, Albums, Notes, Videos};
|
use openvk\Web\Models\Repositories\{Posts, Users, Clubs, Albums, Notes, Videos, Comments};
|
||||||
use Chandler\Database\DatabaseConnection;
|
use Chandler\Database\DatabaseConnection;
|
||||||
use Nette\InvalidStateException as ISE;
|
use Nette\InvalidStateException as ISE;
|
||||||
use Bhaktaraz\RSSGenerator\Item;
|
use Bhaktaraz\RSSGenerator\Item;
|
||||||
|
@ -515,4 +515,64 @@ final class WallPresenter extends OpenVKPresenter
|
||||||
# TODO localize message based on language and ?act=(un)pin
|
# TODO localize message based on language and ?act=(un)pin
|
||||||
$this->flashFail("succ", tr("information_-1"), tr("changes_saved_comment"));
|
$this->flashFail("succ", tr("information_-1"), tr("changes_saved_comment"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function renderEdit()
|
||||||
|
{
|
||||||
|
$this->assertUserLoggedIn();
|
||||||
|
$this->willExecuteWriteAction();
|
||||||
|
|
||||||
|
if($_SERVER["REQUEST_METHOD"] !== "POST")
|
||||||
|
$this->redirect("/id0");
|
||||||
|
|
||||||
|
if($this->postParam("type") == "post")
|
||||||
|
$post = $this->posts->get((int)$this->postParam("postid"));
|
||||||
|
else
|
||||||
|
$post = (new Comments)->get((int)$this->postParam("postid"));
|
||||||
|
|
||||||
|
if(!$post || $post->isDeleted())
|
||||||
|
$this->returnJson(["error" => "Invalid post"]);
|
||||||
|
|
||||||
|
if(!$post->canBeEditedBy($this->user->identity))
|
||||||
|
$this->returnJson(["error" => "Access denied"]);
|
||||||
|
|
||||||
|
$attachmentsCount = sizeof(iterator_to_array($post->getChildren()));
|
||||||
|
|
||||||
|
if(empty($this->postParam("newContent")) && $attachmentsCount < 1)
|
||||||
|
$this->returnJson(["error" => "Empty post"]);
|
||||||
|
|
||||||
|
$post->setEdited(time());
|
||||||
|
|
||||||
|
try {
|
||||||
|
$post->setContent($this->postParam("newContent"));
|
||||||
|
} catch(\LengthException $e) {
|
||||||
|
$this->returnJson(["error" => $e->getMessage()]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if($this->postParam("type") === "post") {
|
||||||
|
$post->setNsfw($this->postParam("nsfw") == "true");
|
||||||
|
$flags = 0;
|
||||||
|
|
||||||
|
if($post->getTargetWall() < 0 && $post->getWallOwner()->canBeModifiedBy($this->user->identity)) {
|
||||||
|
if($this->postParam("fromgroup") == "true") {
|
||||||
|
$flags |= 0b10000000;
|
||||||
|
$post->setFlags($flags);
|
||||||
|
} else
|
||||||
|
$post->setFlags($flags);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$post->save(true);
|
||||||
|
|
||||||
|
$this->returnJson(["error" => "no",
|
||||||
|
"new_content" => $post->getText(),
|
||||||
|
"new_edited" => (string)$post->getEditTime(),
|
||||||
|
"nsfw" => $this->postParam("type") === "post" ? (int)$post->isExplicit() : 0,
|
||||||
|
"from_group" => $this->postParam("type") === "post" && $post->getTargetWall() < 0 ?
|
||||||
|
((int)$post->isPostedOnBehalfOfGroup()) : "false",
|
||||||
|
"new_text" => $post->getText(false),
|
||||||
|
"author" => [
|
||||||
|
"name" => $post->getOwner()->getCanonicalName(),
|
||||||
|
"avatar" => $post->getOwner()->getAvatarUrl()
|
||||||
|
]]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,9 +38,8 @@
|
||||||
<body>
|
<body>
|
||||||
<div id="sudo-banner" n:if="isset($thisUser) && $userTainted">
|
<div id="sudo-banner" n:if="isset($thisUser) && $userTainted">
|
||||||
<p>
|
<p>
|
||||||
Вы вошли как <b>{$thisUser->getCanonicalName()}</b>. Пожалуйста, уважайте
|
{_you_entered_as} <b>{$thisUser->getCanonicalName()}</b>. {_please_rights}
|
||||||
право на тайну переписки других людей и не злоупотребляйте подменой пользователя.
|
{_click_on} <a href="/setSID/unset?hash={rawurlencode($csrfToken)}">{_there}</a>, {_to_leave}.
|
||||||
Нажмите <a href="/setSID/unset?hash={rawurlencode($csrfToken)}">здесь</a>, чтобы выйти.
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -196,7 +195,7 @@
|
||||||
(<b>{$thisUser->getNotificationsCount()}</b>)
|
(<b>{$thisUser->getNotificationsCount()}</b>)
|
||||||
{/if}
|
{/if}
|
||||||
</a>
|
</a>
|
||||||
<a href="/apps?act=installed" class="link">{_my_apps}</a>
|
<a n:if="$thisUser->getLeftMenuItemStatus('apps')" href="/apps?act=installed" class="link">{_my_apps}</a>
|
||||||
<a href="/settings" class="link">{_my_settings}</a>
|
<a href="/settings" class="link">{_my_settings}</a>
|
||||||
|
|
||||||
{var $canAccessAdminPanel = $thisUser->getChandlerUser()->can("access")->model("admin")->whichBelongsTo(NULL)}
|
{var $canAccessAdminPanel = $thisUser->getChandlerUser()->can("access")->model("admin")->whichBelongsTo(NULL)}
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
{extends "../@layout.xml"}
|
{extends "../@layout.xml"}
|
||||||
{block title}Ваш браузер устарел{/block}
|
{block title}{_deprecated_browser}{/block}
|
||||||
|
|
||||||
{block header}
|
{block header}
|
||||||
Устаревший браузер
|
{_deprecated_browser}
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block content}
|
{block content}
|
||||||
Для просмотра этого контента вам понадобится Firefox ESR 52+ или
|
{_deprecated_browser_description}
|
||||||
эквивалентный по функционалу навигатор по всемирной сети интернет.<br/>
|
|
||||||
Сожалеем об этом.
|
|
||||||
{/block}
|
{/block}
|
||||||
|
|
|
@ -9,5 +9,5 @@
|
||||||
<div id="faqhead">Для кого этот сайт?</div>
|
<div id="faqhead">Для кого этот сайт?</div>
|
||||||
<div id="faqcontent">Сайт предназначен для поиска друзей и знакомых, а также просмотр данных пользователя. Это как справочник города, с помощью которого люди могут быстро найти актуальную информацию о человеке. Также этот сайт подойдёт для ностальгираторов и тех, кто решил слезть с трубы "ВКонтакте", которого клон и является.<br></div>
|
<div id="faqcontent">Сайт предназначен для поиска друзей и знакомых, а также просмотр данных пользователя. Это как справочник города, с помощью которого люди могут быстро найти актуальную информацию о человеке. Также этот сайт подойдёт для ностальгираторов и тех, кто решил слезть с трубы "ВКонтакте", которого клон и является.<br></div>
|
||||||
Я попозже допишу ок ~~ veselcraft - 12.01.2020 - 22:05 GMT+3
|
Я попозже допишу ок ~~ veselcraft - 12.01.2020 - 22:05 GMT+3
|
||||||
|
Давай
|
||||||
{/block}
|
{/block}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{block title}Sandbox{/block}
|
{block title}Sandbox{/block}
|
||||||
|
|
||||||
{block header}
|
{block header}
|
||||||
Sandbox для разработчиков
|
{_sandbox_for_developers}
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block content}
|
{block content}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{extends "./@layout.xml"}
|
{extends "./@layout.xml"}
|
||||||
|
|
||||||
{block title}
|
{block title}
|
||||||
История блокировок
|
{_bans_history}
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block heading}
|
{block heading}
|
||||||
|
@ -13,13 +13,13 @@
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>ID</th>
|
<th>ID</th>
|
||||||
<th>Забаненный</th>
|
<th>{_bans_history_blocked}</th>
|
||||||
<th>Инициатор</th>
|
<th>{_bans_history_initiator}</th>
|
||||||
<th>Начало</th>
|
<th>{_bans_history_start}</th>
|
||||||
<th>Конец</th>
|
<th>{_bans_history_end}</th>
|
||||||
<th>Время</th>
|
<th>{_bans_history_time}</th>
|
||||||
<th>Причина</th>
|
<th>{_bans_history_reason}</th>
|
||||||
<th>Снята</th>
|
<th>{_bans_history_removed}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
@ -77,7 +77,7 @@
|
||||||
{_admin_banned}
|
{_admin_banned}
|
||||||
</span>
|
</span>
|
||||||
{else}
|
{else}
|
||||||
<b style="color: red;">Активная блокировка</b>
|
<b style="color: red;">{_bans_history_active}</b>
|
||||||
{/if}
|
{/if}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
{extends "@layout.xml"}
|
{extends "@layout.xml"}
|
||||||
|
|
||||||
{block title}
|
{block title}
|
||||||
Логи
|
{_logs}
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block heading}
|
{block heading}
|
||||||
Логи
|
{_logs}
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block content}
|
{block content}
|
||||||
|
@ -18,23 +18,23 @@
|
||||||
</style>
|
</style>
|
||||||
<form class="aui">
|
<form class="aui">
|
||||||
<div>
|
<div>
|
||||||
<select class="select medium-field" type="number" id="type" name="type" placeholder="Тип изменения">
|
<select class="select medium-field" type="number" id="type" name="type" placeholder="{_logs_change_type}">
|
||||||
<option value="any" n:attr="selected => !$type">Любое</option>
|
<option value="any" n:attr="selected => !$type">{_logs_anything}</option>
|
||||||
<option value="0" n:attr="selected => $type === 0">Создание</option>
|
<option value="0" n:attr="selected => $type === 0">{_logs_adding}</option>
|
||||||
<option value="1" n:attr="selected => $type === 1">Редактирование</option>
|
<option value="1" n:attr="selected => $type === 1">{_logs_editing}</option>
|
||||||
<option value="2" n:attr="selected => $type === 2">Удаление</option>
|
<option value="2" n:attr="selected => $type === 2">{_logs_removing}</option>
|
||||||
<option value="3" n:attr="selected => $type === 3">Восстановление</option>
|
<option value="3" n:attr="selected => $type === 3">{_logs_restoring}</option>
|
||||||
</select>
|
</select>
|
||||||
<input class="text medium-field" type="number" id="id" name="id" placeholder="ID записи" n:attr="value => $id"/>
|
<input class="text medium-field" type="number" id="id" name="id" placeholder="{_logs_id_post}" n:attr="value => $id"/>
|
||||||
<input class="text medium-field" type="text" id="uid" name="uid" placeholder="UUID пользователя" n:attr="value => $user"/>
|
<input class="text medium-field" type="text" id="uid" name="uid" placeholder="{_logs_uuid_user}" n:attr="value => $user"/>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin: 8px 0;" />
|
<div style="margin: 8px 0;" />
|
||||||
<div>
|
<div>
|
||||||
<select class="select medium-field" id="obj_type" name="obj_type" placeholder="Тип объекта">
|
<select class="select medium-field" id="obj_type" name="obj_type" placeholder="{_logs_change_object}">
|
||||||
<option value="any" n:attr="selected => !$obj_type">Любой</option>
|
<option value="any" n:attr="selected => !$obj_type">{_logs_anything}</option>
|
||||||
<option n:foreach="$object_types as $type" n:attr="selected => $obj_type === $type">{$type}</option>
|
<option n:foreach="$object_types as $type" n:attr="selected => $obj_type === $type">{$type}</option>
|
||||||
</select>
|
</select>
|
||||||
<input class="text medium-field" type="number" id="obj_id" name="obj_id" placeholder="ID объекта" n:attr="value => $obj_id"/>
|
<input class="text medium-field" type="number" id="obj_id" name="obj_id" placeholder="{_logs_id_object}" n:attr="value => $obj_id"/>
|
||||||
<input type="submit" class="aui-button aui-button-primary medium-field" value="Поиск" style="width: 165px;"/>
|
<input type="submit" class="aui-button aui-button-primary medium-field" value="Поиск" style="width: 165px;"/>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
@ -42,11 +42,11 @@
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>ID</th>
|
<th>ID</th>
|
||||||
<th>Пользователь</th>
|
<th>{_logs_user}</th>
|
||||||
<th>Объект</th>
|
<th>{_logs_object}</th>
|
||||||
<th>Тип</th>
|
<th>{_logs_type}</th>
|
||||||
<th>Изменения</th>
|
<th>{_logs_changes}</th>
|
||||||
<th>Время</th>
|
<th>{_logs_time}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
{block header}
|
{block header}
|
||||||
{$name}
|
{$name}
|
||||||
<a style="float: right;" onClick="reportApp()" n:if="$canReport ?? false">Пожаловаться</a>
|
<a style="float: right;" onClick="reportApp()" n:if="$canReport ?? false">{_report}</a>
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block content}
|
{block content}
|
||||||
|
@ -37,20 +37,20 @@
|
||||||
|
|
||||||
<script n:if="$canReport ?? false">
|
<script n:if="$canReport ?? false">
|
||||||
function reportApp() {
|
function reportApp() {
|
||||||
uReportMsgTxt = "Вы собираетесь пожаловаться на данное приложение.";
|
uReportMsgTxt = {_going_to_report_app};
|
||||||
uReportMsgTxt += "<br/>Что именно вам кажется недопустимым в этом материале?";
|
uReportMsgTxt += "<br/>"+tr("report_question_text");
|
||||||
uReportMsgTxt += "<br/><br/><b>Причина жалобы</b>: <input type='text' id='uReportMsgInput' placeholder='Причина' />"
|
uReportMsgTxt += "<br/><br/><b>"+tr("report_reason")+"</b>: <input type='text' id='uReportMsgInput' placeholder='" + tr("reason") + "' />"
|
||||||
|
|
||||||
MessageBox("Пожаловаться?", uReportMsgTxt, ["Подтвердить", "Отмена"], [
|
MessageBox(tr("report_question"), uReportMsgTxt, [tr("confirm_m"), tr("cancel")], [
|
||||||
(function() {
|
(function() {
|
||||||
res = document.querySelector("#uReportMsgInput").value;
|
res = document.querySelector("#uReportMsgInput").value;
|
||||||
xhr = new XMLHttpRequest();
|
xhr = new XMLHttpRequest();
|
||||||
xhr.open("GET", "/report/" + {$id} + "?reason=" + res + "&type=app", true);
|
xhr.open("GET", "/report/" + {$id} + "?reason=" + res + "&type=app", true);
|
||||||
xhr.onload = (function() {
|
xhr.onload = (function() {
|
||||||
if(xhr.responseText.indexOf("reason") === -1)
|
if(xhr.responseText.indexOf("reason") === -1)
|
||||||
MessageBox("Ошибка", "Не удалось подать жалобу...", ["OK"], [Function.noop]);
|
MessageBox(tr("error"), tr("error_sending_report"), ["OK"], [Function.noop]);
|
||||||
else
|
else
|
||||||
MessageBox("Операция успешна", "Скоро её рассмотрят модераторы", ["OK"], [Function.noop]);
|
MessageBox(tr("action_successfully"), tr("will_be_watched"), ["OK"], [Function.noop]);
|
||||||
});
|
});
|
||||||
xhr.send(null);
|
xhr.send(null);
|
||||||
}),
|
}),
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
{extends "../@layout.xml"}
|
{extends "../@layout.xml"}
|
||||||
|
|
||||||
{block title}Переход по ссылке заблокирован{/block}
|
{block title}{_transition_is_blocked}{/block}
|
||||||
|
|
||||||
{block header}
|
{block header}
|
||||||
Предупреждение
|
{_caution}
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block content}
|
{block content}
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="120" valign="top"><span class="nobold">{_gender}: </span></td>
|
<td width="120" valign="top"><span class="nobold">{_gender}: </span></td>
|
||||||
<td>{$user->isFemale() ? "женский" : "мужской"}</td>
|
<td>{$user->isFemale() ? tr("female"): tr("male")}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="120" valign="top"><span class="nobold">{_registration_date}: </span></td>
|
<td width="120" valign="top"><span class="nobold">{_registration_date}: </span></td>
|
||||||
|
@ -82,8 +82,6 @@
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<script n:if="$club->getOwner()->getId() != $user->getId() && $manager && $thisUser->getId() == $club->getOwner()->getId()">
|
<script n:if="$club->getOwner()->getId() != $user->getId() && $manager && $thisUser->getId() == $club->getOwner()->getId()">
|
||||||
console.log("gayshit");
|
|
||||||
console.log("сам такой");
|
|
||||||
function changeOwner(club, newOwner) {
|
function changeOwner(club, newOwner) {
|
||||||
const action = "/groups/" + club + "/setNewOwner/" + newOwner;
|
const action = "/groups/" + club + "/setNewOwner/" + newOwner;
|
||||||
|
|
||||||
|
|
|
@ -7,12 +7,12 @@
|
||||||
|
|
||||||
{block content}
|
{block content}
|
||||||
<div>
|
<div>
|
||||||
<h4>Охват</h4>
|
<h4>{_coverage}</h4>
|
||||||
<p>Этот график отображает охват за последние 7 дней.</p>
|
<p>{_coverage_this_week}</p>
|
||||||
<div id="reachChart" style="width: 100%; height: 280px;"></div>
|
<div id="reachChart" style="width: 100%; height: 280px;"></div>
|
||||||
|
|
||||||
<h4>Просмотры</h4>
|
<h4>{_views}</h4>
|
||||||
<p>Этот график отображает просмотры постов сообщества за последние 7 дней.</p>
|
<p>{_views_this_week}</p>
|
||||||
<div id="viewsChart" style="width: 100%; height: 280px;"></div>
|
<div id="viewsChart" style="width: 100%; height: 280px;"></div>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<img n:if="$club->isVerified()"
|
<img n:if="$club->isVerified()"
|
||||||
class="name-checkmark"
|
class="name-checkmark"
|
||||||
src="/assets/packages/static/openvk/img/checkmark.png"
|
src="/assets/packages/static/openvk/img/checkmark.png"
|
||||||
alt="Подтверждённая страница"
|
alt="{_verified_page}"
|
||||||
/>
|
/>
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
|
@ -143,24 +143,24 @@
|
||||||
{/if}
|
{/if}
|
||||||
{var $canReport = $thisUser->getId() != $club->getOwner()->getId()}
|
{var $canReport = $thisUser->getId() != $club->getOwner()->getId()}
|
||||||
{if $canReport}
|
{if $canReport}
|
||||||
<a class="profile_link" style="display:block;width:96%;" href="javascript:reportVideo()">{_report}</a>
|
<a class="profile_link" style="display:block;" href="javascript:reportVideo()">{_report}</a>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function reportVideo() {
|
function reportVideo() {
|
||||||
uReportMsgTxt = "Вы собираетесь пожаловаться на данное сообщество.";
|
uReportMsgTxt = tr("going_to_report_club");
|
||||||
uReportMsgTxt += "<br/>Что именно вам кажется недопустимым в этом материале?";
|
uReportMsgTxt += "<br/>"+tr("report_question_text");
|
||||||
uReportMsgTxt += "<br/><br/><b>Причина жалобы</b>: <input type='text' id='uReportMsgInput' placeholder='Причина' />"
|
uReportMsgTxt += "<br/><br/><b>"+tr("report_reason")+"</b>: <input type='text' id='uReportMsgInput' placeholder='" + tr("reason") + "' />"
|
||||||
|
|
||||||
MessageBox("Пожаловаться?", uReportMsgTxt, ["Подтвердить", "Отмена"], [
|
MessageBox(tr("report_question"), uReportMsgTxt, [tr("confirm_m"), tr("cancel")], [
|
||||||
(function() {
|
(function() {
|
||||||
res = document.querySelector("#uReportMsgInput").value;
|
res = document.querySelector("#uReportMsgInput").value;
|
||||||
xhr = new XMLHttpRequest();
|
xhr = new XMLHttpRequest();
|
||||||
xhr.open("GET", "/report/" + {$club->getId()} + "?reason=" + res + "&type=group", true);
|
xhr.open("GET", "/report/" + {$club->getId()} + "?reason=" + res + "&type=group", true);
|
||||||
xhr.onload = (function() {
|
xhr.onload = (function() {
|
||||||
if(xhr.responseText.indexOf("reason") === -1)
|
if(xhr.responseText.indexOf("reason") === -1)
|
||||||
MessageBox("Ошибка", "Не удалось подать жалобу...", ["OK"], [Function.noop]);
|
MessageBox(tr("error"), tr("error_sending_report"), ["OK"], [Function.noop]);
|
||||||
else
|
else
|
||||||
MessageBox("Операция успешна", "Скоро её рассмотрят модераторы", ["OK"], [Function.noop]);
|
MessageBox(tr("action_successfully"), tr("will_be_watched"), ["OK"], [Function.noop]);
|
||||||
});
|
});
|
||||||
xhr.send(null);
|
xhr.send(null);
|
||||||
}),
|
}),
|
||||||
|
|
|
@ -27,13 +27,13 @@
|
||||||
<tbody id="models-list">
|
<tbody id="models-list">
|
||||||
<tr id="0-model">
|
<tr id="0-model">
|
||||||
<td width="83px">
|
<td width="83px">
|
||||||
<span class="nobold">Раздел:</span>
|
<span class="nobold">{_section}:</span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div style="display: flex; gap: 8px; justify-content: space-between;">
|
<div style="display: flex; gap: 8px; justify-content: space-between;">
|
||||||
<div id="add-model" class="noSpamIcon noSpamIcon-Add" style="display: none;" />
|
<div id="add-model" class="noSpamIcon noSpamIcon-Add" style="display: none;" />
|
||||||
<select name="model" id="model" class="model initialModel" style="margin-left: -2px;">
|
<select name="model" id="model" class="model initialModel" style="margin-left: -2px;">
|
||||||
<option selected value="none">Не выбрано</option>
|
<option selected value="none">{_relationship_0}</option>
|
||||||
<option n:foreach="$models as $model" value="{$model}">{$model}</option>
|
<option n:foreach="$models as $model" value="{$model}">{$model}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
@ -47,7 +47,7 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr style="width: 129px; border-top: 1px solid #ECECEC;">
|
<tr style="width: 129px; border-top: 1px solid #ECECEC;">
|
||||||
<td>
|
<td>
|
||||||
<span class="nobold">Подстрока:</span>
|
<span class="nobold">{_substring}:</span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="regex" placeholder="Regex" id="regex">
|
<input type="text" name="regex" placeholder="Regex" id="regex">
|
||||||
|
@ -55,10 +55,10 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr style="width: 129px; border-top: 1px solid #ECECEC;">
|
<tr style="width: 129px; border-top: 1px solid #ECECEC;">
|
||||||
<td>
|
<td>
|
||||||
<span class="nobold">Пользователь:</span>
|
<span class="nobold">{_n_user}:</span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="user" placeholder="Ссылка на страницу" id="user">
|
<input type="text" name="user" placeholder="{_link_to_page}" id="user">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr style="width: 129px">
|
<tr style="width: 129px">
|
||||||
|
@ -66,12 +66,12 @@
|
||||||
<span class="nobold">IP:</span>
|
<span class="nobold">IP:</span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="ip" id="ip" placeholder="или подсеть">
|
<input type="text" name="ip" id="ip" placeholder="{_or_subnet}">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr style="width: 129px">
|
<tr style="width: 129px">
|
||||||
<td>
|
<td>
|
||||||
<span class="nobold">Юзер-агент:</span>
|
<span class="nobold">User-Agent:</span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="useragent" id="useragent" placeholder="Mozila 1.0 Blablabla/test">
|
<input type="text" name="useragent" id="useragent" placeholder="Mozila 1.0 Blablabla/test">
|
||||||
|
@ -79,7 +79,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr style="width: 129px">
|
<tr style="width: 129px">
|
||||||
<td>
|
<td>
|
||||||
<span class="nobold">Время раньше, чем:</span>
|
<span class="nobold">{_time_before}:</span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="datetime-local" name="ts" id="ts">
|
<input type="datetime-local" name="ts" id="ts">
|
||||||
|
@ -87,7 +87,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr style="width: 129px">
|
<tr style="width: 129px">
|
||||||
<td>
|
<td>
|
||||||
<span class="nobold">Время позже, чем:</span>
|
<span class="nobold">{_time_after}:</span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="datetime-local" name="te" id="te">
|
<input type="datetime-local" name="te" id="te">
|
||||||
|
@ -97,19 +97,19 @@
|
||||||
</table>
|
</table>
|
||||||
<textarea style="resize: vertical; width: calc(100% - 6px)" placeholder='city = "Воскресенск" && id = 1'
|
<textarea style="resize: vertical; width: calc(100% - 6px)" placeholder='city = "Воскресенск" && id = 1'
|
||||||
name="where" id="where"/>
|
name="where" id="where"/>
|
||||||
<span style="color: grey; font-size: 8px;">WHERE для поиска по разделу</span>
|
<span style="color: grey; font-size: 8px;">{_where_for_search}</span>
|
||||||
<div style="border-top: 1px solid #ECECEC; margin: 8px 0;"/>
|
<div style="border-top: 1px solid #ECECEC; margin: 8px 0;"/>
|
||||||
<table cellspacing="7" cellpadding="0" width="100%" border="0">
|
<table cellspacing="7" cellpadding="0" width="100%" border="0">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr style="width: 129px; border-top: 1px solid #ECECEC;">
|
<tr style="width: 129px; border-top: 1px solid #ECECEC;">
|
||||||
<td>
|
<td>
|
||||||
<span class="nobold">Параметры блокировки:</span>
|
<span class="nobold">{_block_params}:</span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<select name="ban_type" id="noSpam-ban-type" style="width: 140px;">
|
<select name="ban_type" id="noSpam-ban-type" style="width: 140px;"
|
||||||
<option value="1">Только откат</option>
|
<option value="1">{_only_rollback}</option>
|
||||||
<option value="2">Только блокировка</option>
|
<option value="2">{_only_block}</option>
|
||||||
<option value="3">Откат и блокировка</option>
|
<option value="3">{_rollback_and_block}</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -136,8 +136,8 @@
|
||||||
<div style="border-top: 1px solid #ECECEC; margin: 8px 0;"/>
|
<div style="border-top: 1px solid #ECECEC; margin: 8px 0;"/>
|
||||||
<center>
|
<center>
|
||||||
<div id="noSpam-buttons">
|
<div id="noSpam-buttons">
|
||||||
<input id="search" type="submit" value="Поиск" class="button"/>
|
<input id="search" type="submit" value="{_header_search}" class="button"/>
|
||||||
<input id="apply" type="submit" value="Применить" class="button" style="display: none;"/>
|
<input id="apply" type="submit" value="{_subm}" class="button" style="display: none;"/>
|
||||||
</div>
|
</div>
|
||||||
<div id="noSpam-loader" style="display: none;">
|
<div id="noSpam-loader" style="display: none;">
|
||||||
<img src="/assets/packages/static/openvk/img/loading_mini.gif" style="width: 40px;">
|
<img src="/assets/packages/static/openvk/img/loading_mini.gif" style="width: 40px;">
|
||||||
|
@ -145,7 +145,7 @@
|
||||||
</center>
|
</center>
|
||||||
</div>
|
</div>
|
||||||
<div id="noSpam-model-not-selected">
|
<div id="noSpam-model-not-selected">
|
||||||
<center id="noSpam-model-not-selected-text" style="padding: 71px 25px;">Выберите раздел для начала работы</center>
|
<center id="noSpam-model-not-selected-text" style="padding: 71px 25px;">{_select_section_for_start}</center>
|
||||||
<center id="noSpam-model-not-selected-loader" style="display: none;">
|
<center id="noSpam-model-not-selected-loader" style="display: none;">
|
||||||
<img src="/assets/packages/static/openvk/img/loading_mini.gif" style="width: 40px; margin: 125px 0;">
|
<img src="/assets/packages/static/openvk/img/loading_mini.gif" style="width: 40px; margin: 125px 0;">
|
||||||
</center>
|
</center>
|
||||||
|
@ -155,11 +155,11 @@
|
||||||
<center id="noSpam-results-loader" style="display: none;">
|
<center id="noSpam-results-loader" style="display: none;">
|
||||||
<img src="/assets/packages/static/openvk/img/loading_mini.gif" style="width: 40px; margin: 125px 0;">
|
<img src="/assets/packages/static/openvk/img/loading_mini.gif" style="width: 40px; margin: 125px 0;">
|
||||||
</center>
|
</center>
|
||||||
<center id="noSpam-results-text" style="margin: 125px 25px;">Здесь будут отображаться результаты поиска</center>
|
<center id="noSpam-results-text" style="margin: 125px 25px;">{_results_will_be_there}</center>
|
||||||
<div id="noSpam-results-block" style="display: none;">
|
<div id="noSpam-results-block" style="display: none;">
|
||||||
<h4 style="padding: 8px;">Результаты поиска
|
<h4 style="padding: 8px;">{_search_results}
|
||||||
<span style="color: #a2a2a2; font-weight: inherit">
|
<span style="color: #a2a2a2; font-weight: inherit">
|
||||||
(<span id="noSpam-results-count" style="color: #a2a2a2; font-weight: inherit;"></span> шт.)
|
(<span id="noSpam-results-count" style="color: #a2a2a2; font-weight: inherit;"></span> {_cnt}.)
|
||||||
</span>
|
</span>
|
||||||
</h4>
|
</h4>
|
||||||
<ul style="padding-inline-start:18px;" id="noSpam-results-list"></ul>
|
<ul style="padding-inline-start:18px;" id="noSpam-results-list"></ul>
|
||||||
|
@ -242,17 +242,17 @@
|
||||||
$("#noSpam-results-block").show();
|
$("#noSpam-results-block").show();
|
||||||
$("#apply").show();
|
$("#apply").show();
|
||||||
} else {
|
} else {
|
||||||
$("#noSpam-results-text").text(ban ? "Операция завершена успешно" : "Ничего не найдено :(");
|
$("#noSpam-results-text").text(ban ? tr("operation_successfully") : tr("no_found"));
|
||||||
$("#noSpam-results-text").show();
|
$("#noSpam-results-text").show();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$("#noSpam-results-text").text(response?.error ?? "Неизвестная ошибка");
|
$("#noSpam-results-text").text(response?.error ?? tr("unknown_error"));
|
||||||
$("#noSpam-results-text").show();
|
$("#noSpam-results-text").show();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: (error) => {
|
error: (error) => {
|
||||||
console.error("Error while searching noSpam:", error);
|
console.error("Error while searching noSpam:", error);
|
||||||
$("#noSpam-results-text").text("Ошибка при выполнении запроса");
|
$("#noSpam-results-text").text(tr("error_when_searching"));
|
||||||
$("#noSpam-results-text").show();
|
$("#noSpam-results-text").show();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -323,7 +323,7 @@
|
||||||
<div style="display: flex; gap: 8px; justify-content: space-between;">
|
<div style="display: flex; gap: 8px; justify-content: space-between;">
|
||||||
<div class="noSpamIcon noSpamIcon-Delete" onClick="deleteModelSelect(${ $('.model').length});"></div>
|
<div class="noSpamIcon noSpamIcon-Delete" onClick="deleteModelSelect(${ $('.model').length});"></div>
|
||||||
<select name="model" class="model" style="margin-left: -2px;" onChange="selectChange($(this).val())">
|
<select name="model" class="model" style="margin-left: -2px;" onChange="selectChange($(this).val())">
|
||||||
<option selected value="none">Не выбрано</option>
|
<option selected value="none">{_relationship_0}</option>
|
||||||
{foreach $models as $model}
|
{foreach $models as $model}
|
||||||
<option value={$model}>{$model|noescape}</option>
|
<option value={$model}>{$model|noescape}</option>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<div n:attr="id => ($mode === 'form' ? 'activetabs' : 'ki')" class="tab">
|
<div n:attr="id => ($mode === 'form' ? 'activetabs' : 'ki')" class="tab">
|
||||||
<a n:attr="id => ($mode === 'form' ? 'act_tab_a' : 'ki')" href="/noSpam">Бан по шаблону</a>
|
<a n:attr="id => ($mode === 'form' ? 'act_tab_a' : 'ki')" href="/noSpam">{_template_ban}</a>
|
||||||
</div>
|
</div>
|
||||||
<div n:attr="id => ($mode === 'templates' ? 'activetabs' : 'ki')" class="tab">
|
<div n:attr="id => ($mode === 'templates' ? 'activetabs' : 'ki')" class="tab">
|
||||||
<a n:attr="id => ($mode === 'templates' ? 'act_tab_a' : 'ki')" href="/noSpam?act=templates">Действующие шаблоны</a>
|
<a n:attr="id => ($mode === 'templates' ? 'act_tab_a' : 'ki')" href="/noSpam?act=templates">{_active_templates}</a>
|
||||||
</div>
|
</div>
|
||||||
<div n:attr="id => ($mode === 'reports' ? 'activetabs' : 'ki')" class="tab">
|
<div n:attr="id => ($mode === 'reports' ? 'activetabs' : 'ki')" class="tab">
|
||||||
<a n:attr="id => ($mode === 'reports' ? 'act_tab_a' : 'ki')" href="/scumfeed">Жалобы пользователей</a>
|
<a n:attr="id => ($mode === 'reports' ? 'act_tab_a' : 'ki')" href="/scumfeed">{_users_reports}</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{extends "../@layout.xml"}
|
{extends "../@layout.xml"}
|
||||||
|
|
||||||
{block title}Шаблоны{/block}
|
{block title}{_templates}{/block}
|
||||||
{block header}{include title}{/block}
|
{block header}{include title}{/block}
|
||||||
|
|
||||||
{block content}
|
{block content}
|
||||||
|
@ -44,14 +44,14 @@
|
||||||
<table n:if="count($templates) > 0" cellspacing="0" cellpadding="7" width="100%">
|
<table n:if="count($templates) > 0" cellspacing="0" cellpadding="7" width="100%">
|
||||||
<tr>
|
<tr>
|
||||||
<th style="text-align: center;">ID</th>
|
<th style="text-align: center;">ID</th>
|
||||||
<th>Пользователь</th>
|
<th>{_n_user}</th>
|
||||||
<th style="text-align: center;">Раздел</th>
|
<th style="text-align: center;">{_section}</th>
|
||||||
<th>Подстрока</th>
|
<th>{_substring}</th>
|
||||||
<th>Where</th>
|
<th>Where</th>
|
||||||
<th style="text-align: center;">Тип</th>
|
<th style="text-align: center;">{_type}</th>
|
||||||
<th style="text-align: center;">Количество</th>
|
<th style="text-align: center;">{_count}</th>
|
||||||
<th>Время</th>
|
<th>{_time}</th>
|
||||||
<th style="text-align: center;">Действия</th>
|
<th style="text-align: center;">{_actions}</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr n:foreach="$templates as $template">
|
<tr n:foreach="$templates as $template">
|
||||||
<td id="id-{$template->getId()}" onClick="openTableField('id', {$template->getId()})" style="text-align: center;"><b>{$template->getId()}</b></td>
|
<td id="id-{$template->getId()}" onClick="openTableField('id', {$template->getId()})" style="text-align: center;"><b>{$template->getId()}</b></td>
|
||||||
|
@ -75,8 +75,8 @@
|
||||||
<div id="noSpam-rollback-loader-{$template->getId()}" style="display: none;">
|
<div id="noSpam-rollback-loader-{$template->getId()}" style="display: none;">
|
||||||
<img src="/assets/packages/static/openvk/img/loading_mini.gif" style="width: 40px;">
|
<img src="/assets/packages/static/openvk/img/loading_mini.gif" style="width: 40px;">
|
||||||
</div>
|
</div>
|
||||||
<a n:if="!$template->isRollbacked()" id="noSpam-rollback-template-link-{$template->getId()}" onClick="rollbackTemplate({$template->getId()})">откатить</a>
|
<a n:if="!$template->isRollbacked()" id="noSpam-rollback-template-link-{$template->getId()}" onClick="rollbackTemplate({$template->getId()})">{_roll_back}</a>
|
||||||
<span n:attr="style => $template->isRollbacked() ? '' : 'display: none;'" id="noSpam-rollback-template-rollbacked-{$template->getId()}">откачен</span>
|
<span n:attr="style => $template->isRollbacked() ? '' : 'display: none;'" id="noSpam-rollback-template-rollbacked-{$template->getId()}">{roll_backed}</span>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<textarea name="html" style="display:none;"></textarea>
|
<textarea name="html" style="display:none;"></textarea>
|
||||||
<div id="editor" style="width:600px;height:300px;border:1px solid grey"></div>
|
<div id="editor" style="width:600px;height:300px;border:1px solid grey"></div>
|
||||||
|
|
||||||
<p><i><a href="/kb/notes">Кое-что</a> из (X)HTML поддерживается.</i></p>
|
<p><i><a href="/kb/notes">{_something}</a> {_supports_xhtml}</i></p>
|
||||||
|
|
||||||
<input type="hidden" name="hash" value="{$csrfToken}" />
|
<input type="hidden" name="hash" value="{$csrfToken}" />
|
||||||
<button class="button">{_save}</button>
|
<button class="button">{_save}</button>
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
<textarea name="html" style="display:none;"></textarea>
|
<textarea name="html" style="display:none;"></textarea>
|
||||||
<div id="editor" style="width:600px;height:300px;border:1px solid grey"></div>
|
<div id="editor" style="width:600px;height:300px;border:1px solid grey"></div>
|
||||||
|
|
||||||
<p><i><a href="/kb/notes">Кое-что</a> из (X)HTML поддерживается.</i></p>
|
<p><i><a href="/kb/notes">{_something}</a> {_supports_xhtml}</i></p>
|
||||||
|
|
||||||
<input type="hidden" name="hash" value="{$csrfToken}" />
|
<input type="hidden" name="hash" value="{$csrfToken}" />
|
||||||
<button class="button">{_save}</button>
|
<button class="button">{_save}</button>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{extends "../@layout.xml"}
|
{extends "../@layout.xml"}
|
||||||
|
|
||||||
{block title}Альбом {$album->getName()}{/block}
|
{block title}{_album} {$album->getName()}{/block}
|
||||||
|
|
||||||
{block header}
|
{block header}
|
||||||
{var $isClub = ($album->getOwner() instanceof openvk\Web\Models\Entities\Club)}
|
{var $isClub = ($album->getOwner() instanceof openvk\Web\Models\Entities\Club)}
|
||||||
|
@ -18,7 +18,8 @@
|
||||||
|
|
||||||
{block content}
|
{block content}
|
||||||
<a href="/album{$album->getPrettyId()}">
|
<a href="/album{$album->getPrettyId()}">
|
||||||
<b>{$album->getPhotosCount()} фотографий</b>
|
{* TODO: Добавить склонения *}
|
||||||
|
<b>{$album->getPhotosCount()} {_photos}</b>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
{if !is_null($thisUser) && $album->canBeModifiedBy($thisUser) && !$album->isCreatedBySystem()}
|
{if !is_null($thisUser) && $album->canBeModifiedBy($thisUser) && !$album->isCreatedBySystem()}
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
|
|
||||||
{block description}
|
{block description}
|
||||||
<span>{$x->getDescription() ?? $x->getName()}</span><br />
|
<span>{$x->getDescription() ?? $x->getName()}</span><br />
|
||||||
<span style="color: grey;">{$x->getPhotosCount()} фотографий</span><br />
|
<span style="color: grey;">{$x->getPhotosCount()} {_photos}</span><br />
|
||||||
<span style="color: grey;">{tr("updated_at", $x->getEditTime() ?? $x->getCreationTime())}</span><br />
|
<span style="color: grey;">{tr("updated_at", $x->getEditTime() ?? $x->getCreationTime())}</span><br />
|
||||||
<span style="color: grey;">{_created} {$x->getCreationTime()}</span><br />
|
<span style="color: grey;">{_created} {$x->getCreationTime()}</span><br />
|
||||||
{/block}
|
{/block}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{extends "../@layout.xml"}
|
{extends "../@layout.xml"}
|
||||||
{block title}Изменить альбом{/block}
|
{block title}{_edit_album}{/block}
|
||||||
|
|
||||||
{block header}
|
{block header}
|
||||||
<a href="{$album->getOwner()->getURL()}">{$album->getOwner()->getCanonicalName()}</a>
|
<a href="{$album->getOwner()->getURL()}">{$album->getOwner()->getCanonicalName()}</a>
|
||||||
|
@ -14,6 +14,15 @@
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block content}
|
{block content}
|
||||||
|
<div class="tabs">
|
||||||
|
<div id="activetabs" class="tab">
|
||||||
|
<a id="act_tab_a" href="/album{$album->getPrettyId()}/edit">{_edit_album}</a>
|
||||||
|
</div>
|
||||||
|
<div class="tab">
|
||||||
|
<a href="/photos/upload?album={$album->getPrettyId()}">{_add_photos}</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<form method="post" enctype="multipart/form-data">
|
<form method="post" enctype="multipart/form-data">
|
||||||
<table cellspacing="6">
|
<table cellspacing="6">
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{extends "../@layout.xml"}
|
{extends "../@layout.xml"}
|
||||||
{block title}Изменить фотографию{/block}
|
{block title}{_edit_photo}{/block}
|
||||||
|
|
||||||
{block header}
|
{block header}
|
||||||
<a href="{$thisUser->getURL()}">{$thisUser->getCanonicalName()}</a>
|
<a href="{$thisUser->getURL()}">{$thisUser->getCanonicalName()}</a>
|
||||||
|
|
|
@ -53,20 +53,20 @@
|
||||||
<a n:if="$canReport ?? false" class="profile_link" style="display:block;width:96%;" href="javascript:reportPhoto()">{_report}</a>
|
<a n:if="$canReport ?? false" class="profile_link" style="display:block;width:96%;" href="javascript:reportPhoto()">{_report}</a>
|
||||||
<script n:if="$canReport ?? false">
|
<script n:if="$canReport ?? false">
|
||||||
function reportPhoto() {
|
function reportPhoto() {
|
||||||
uReportMsgTxt = "Вы собираетесь пожаловаться на данную фотографию.";
|
uReportMsgTxt = tr("going_to_report_photo");
|
||||||
uReportMsgTxt += "<br/>Что именно вам кажется недопустимым в этом материале?";
|
uReportMsgTxt += "<br/>"+tr("report_question_text");
|
||||||
uReportMsgTxt += "<br/><br/><b>Причина жалобы</b>: <input type='text' id='uReportMsgInput' placeholder='Причина' />"
|
uReportMsgTxt += "<br/><br/><b>"+tr("report_reason")+"</b>: <input type='text' id='uReportMsgInput' placeholder='" + tr("reason") + "' />"
|
||||||
|
|
||||||
MessageBox("Пожаловаться?", uReportMsgTxt, ["Подтвердить", "Отмена"], [
|
MessageBox(tr("report_question"), uReportMsgTxt, [tr("confirm_m"), tr("cancel")], [
|
||||||
(function() {
|
(function() {
|
||||||
res = document.querySelector("#uReportMsgInput").value;
|
res = document.querySelector("#uReportMsgInput").value;
|
||||||
xhr = new XMLHttpRequest();
|
xhr = new XMLHttpRequest();
|
||||||
xhr.open("GET", "/report/" + {$photo->getId()} + "?reason=" + res + "&type=photo", true);
|
xhr.open("GET", "/report/" + {$photo->getId()} + "?reason=" + res + "&type=photo", true);
|
||||||
xhr.onload = (function() {
|
xhr.onload = (function() {
|
||||||
if(xhr.responseText.indexOf("reason") === -1)
|
if(xhr.responseText.indexOf("reason") === -1)
|
||||||
MessageBox("Ошибка", "Не удалось подать жалобу...", ["OK"], [Function.noop]);
|
MessageBox(tr("error"), tr("error_sending_report"), ["OK"], [Function.noop]);
|
||||||
else
|
else
|
||||||
MessageBox("Операция успешна", "Скоро её рассмотрят модераторы", ["OK"], [Function.noop]);
|
MessageBox(tr("action_successfully"), tr("will_be_watched"), ["OK"], [Function.noop]);
|
||||||
});
|
});
|
||||||
xhr.send(null);
|
xhr.send(null);
|
||||||
}),
|
}),
|
||||||
|
@ -74,7 +74,6 @@
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<a href="{$photo->getURL()}" class="profile_link" target="_blank" style="display:block;width:96%;">{_open_original}</a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/block}
|
{/block}
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
{extends "../@layout.xml"}
|
{extends "../@layout.xml"}
|
||||||
|
|
||||||
{block title}Удалить фотографию?{/block}
|
{block title}{_delete_photo}{/block}
|
||||||
|
|
||||||
{block header}
|
{block header}
|
||||||
Удаление фотографии
|
{_delete_photo}
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block content}
|
{block content}
|
||||||
Вы уверены что хотите удалить эту фотографию?
|
{_sure_deleting_photo}
|
||||||
<br/>
|
<br/>
|
||||||
<br/>
|
<br/>
|
||||||
<form method="POST">
|
<form method="POST">
|
||||||
<input type="hidden" value="{$csrfToken}" name="hash" />
|
<input type="hidden" value="{$csrfToken}" name="hash" />
|
||||||
|
|
||||||
<a href="{$_SERVER['HTTP_REFERER']}" class="button">Нет</a>
|
<a href="{$_SERVER['HTTP_REFERER']}" class="button">{_no}</a>
|
||||||
|
|
||||||
<button class="button">Да</button>
|
<button class="button">{_yes}</button>
|
||||||
</form>
|
</form>
|
||||||
{/block}
|
{/block}
|
||||||
|
|
|
@ -2,9 +2,13 @@
|
||||||
{block title}{_upload_photo}{/block}
|
{block title}{_upload_photo}{/block}
|
||||||
|
|
||||||
{block header}
|
{block header}
|
||||||
<a href="{$thisUser->getURL()}">{$thisUser->getCanonicalName()}</a>
|
<a href="{$album->getOwner()->getURL()}">{$album->getOwner()->getCanonicalName()}</a>
|
||||||
»
|
»
|
||||||
<a href="/albums{$thisUser->getId()}">{_albums}</a>
|
{if $album->getOwner() instanceof openvk\Web\Models\Entities\Club}
|
||||||
|
<a href="/albums{$album->getOwner()->getId() * -1}">{_albums}</a>
|
||||||
|
{else}
|
||||||
|
<a href="/albums{$album->getOwner()->getId()}">{_albums}</a>
|
||||||
|
{/if}
|
||||||
»
|
»
|
||||||
<a href="/album{$album->getPrettyId()}">{$album->getName()}</a>
|
<a href="/album{$album->getPrettyId()}">{$album->getName()}</a>
|
||||||
»
|
»
|
||||||
|
@ -12,32 +16,53 @@
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block content}
|
{block content}
|
||||||
<form action="/photos/upload?album={$album->getPrettyId()}" method="post" enctype="multipart/form-data">
|
<div class="tabs">
|
||||||
<table cellspacing="6">
|
<div class="tab">
|
||||||
<tbody>
|
<a href="/album{$album->getPrettyId()}/edit">{_edit_album}</a>
|
||||||
<tr>
|
</div>
|
||||||
<td width="120" valign="top"><span class="nobold">{_description}:</span></td>
|
<div id="activetabs" class="tab">
|
||||||
<td><textarea style="margin: 0px; height: 50px; width: 159px; resize: none;" name="desc"></textarea></td>
|
<a id="act_tab_a" href="#">{_add_photos}</a>
|
||||||
</tr>
|
</div>
|
||||||
<tr>
|
</div>
|
||||||
<td width="120" valign="top"><span class="nobold">{_photo}:</span></td>
|
|
||||||
<td>
|
|
||||||
<label class="button" style="">{_browse}
|
|
||||||
<input type="file" id="blob" name="blob" style="display: none;" onchange="filename.innerHTML=blob.files[0].name" />
|
|
||||||
</label>
|
|
||||||
<div id="filename" style="margin-top: 10px;"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td width="120" valign="top"></td>
|
|
||||||
<td>
|
|
||||||
<input type="hidden" name="hash" value="{$csrfToken}" />
|
|
||||||
<input type="submit" class="button" name="submit" value="Загрузить" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<input n:ifset="$_GET['album']" type="hidden" name="album" value="{$_GET['album']}" />
|
<input type="file" accept=".jpg,.png,.gif" name="files[]" multiple class="button" id="uploadButton" style="display:none">
|
||||||
</form>
|
|
||||||
|
<div class="container_gray" style="min-height: 344px;">
|
||||||
|
<div class="insertThere"></div>
|
||||||
|
<div class="whiteBox" style="display: block;">
|
||||||
|
<div class="boxContent">
|
||||||
|
<h4>{_uploading_photos_from_computer}</h4>
|
||||||
|
|
||||||
|
<div class="limits" style="margin-top:17px">
|
||||||
|
<b style="color:#45688E">{_admin_limits}</b>
|
||||||
|
<ul class="blueList" style="margin-left: -25px;margin-top: 1px;">
|
||||||
|
<li>{_supported_formats}</li>
|
||||||
|
<li>{_max_load_photos}</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div style="text-align: center;padding-top: 4px;" class="insertAgain">
|
||||||
|
<input type="button" class="button" id="fakeButton" onclick="uploadButton.click()" value="{_upload_picts}">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tipping" style="margin-top: 19px;">
|
||||||
|
<span style="line-height: 15px"><b>{_tip}</b>: {_tip_ctrl}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="insertPhotos" id="photos" style="margin-top: 9px;padding-bottom: 12px;"></div>
|
||||||
|
|
||||||
|
<input type="button" class="button" style="display:none;margin-left: auto;margin-right: auto;" id="endUploading" value="{_end_uploading}">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<input n:ifset="$_GET['album']" type="hidden" id="album" value="{$_GET['album']}" />
|
||||||
|
|
||||||
|
<script>
|
||||||
|
uploadButton.value = ''
|
||||||
|
</script>
|
||||||
|
{/block}
|
||||||
|
|
||||||
|
{block bodyScripts}
|
||||||
|
{script "js/al_photos.js"}
|
||||||
{/block}
|
{/block}
|
||||||
|
|
|
@ -344,9 +344,9 @@
|
||||||
<form method="POST" enctype="multipart/form-data">
|
<form method="POST" enctype="multipart/form-data">
|
||||||
<div id="backdropEditor">
|
<div id="backdropEditor">
|
||||||
<div id="backdropFilePicker">
|
<div id="backdropFilePicker">
|
||||||
<label class="button" style="">Обзор<input type="file" accept="image/*" name="backdrop1" style="display: none;"></label>
|
<label class="button" style="">{_browse}<input type="file" accept="image/*" name="backdrop1" style="display: none;"></label>
|
||||||
<div id="spacer" style="width: 366px;"></div>
|
<div id="spacer" style="width: 366px;"></div>
|
||||||
<label class="button" style="">Обзор<input type="file" accept="image/*" name="backdrop2" style="display: none;"></label>
|
<label class="button" style="">{_browse}<input type="file" accept="image/*" name="backdrop2" style="display: none;"></label>
|
||||||
<div id="spacer" style="width: 366px;"></div>
|
<div id="spacer" style="width: 366px;"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -190,13 +190,13 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function viewBackupCodes() {
|
function viewBackupCodes() {
|
||||||
MessageBox("Просмотр резервных кодов", `
|
MessageBox(tr("viewing_backup_codes"), `
|
||||||
<form id="back-codes-view-form" method="post" action="/settings/2fa">
|
<form id="back-codes-view-form" method="post" action="/settings/2fa">
|
||||||
<label for="password">Пароль</label>
|
<label for="password">Пароль</label>
|
||||||
<input type="password" id="password" name="password" required />
|
<input type="password" id="password" name="password" required />
|
||||||
<input type="hidden" name="hash" value={$csrfToken} />
|
<input type="hidden" name="hash" value={$csrfToken} />
|
||||||
</form>
|
</form>
|
||||||
`, ["Просмотреть", "Отменить"], [
|
`, [tr("viewing"), tr("cancel")], [
|
||||||
() => {
|
() => {
|
||||||
document.querySelector("#back-codes-view-form").submit();
|
document.querySelector("#back-codes-view-form").submit();
|
||||||
}, Function.noop
|
}, Function.noop
|
||||||
|
@ -204,13 +204,13 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function disableTwoFactorAuth() {
|
function disableTwoFactorAuth() {
|
||||||
MessageBox("Отключить 2FA", `
|
MessageBox(tr("disable_2fa"), `
|
||||||
<form id="two-factor-auth-disable-form" method="post" action="/settings/2fa/disable">
|
<form id="two-factor-auth-disable-form" method="post" action="/settings/2fa/disable">
|
||||||
<label for="password">Пароль</label>
|
<label for="password">Пароль</label>
|
||||||
<input type="password" id="password" name="password" required />
|
<input type="password" id="password" name="password" required />
|
||||||
<input type="hidden" name="hash" value={$csrfToken} />
|
<input type="hidden" name="hash" value={$csrfToken} />
|
||||||
</form>
|
</form>
|
||||||
`, ["Отключить", "Отменить"], [
|
`, [tr("disable"), tr("cancel")], [
|
||||||
() => {
|
() => {
|
||||||
document.querySelector("#two-factor-auth-disable-form").submit();
|
document.querySelector("#two-factor-auth-disable-form").submit();
|
||||||
}, Function.noop
|
}, Function.noop
|
||||||
|
@ -650,6 +650,16 @@
|
||||||
<td>
|
<td>
|
||||||
<span class="nobold">{_my_feed}</span>
|
<span class="nobold">{_my_feed}</span>
|
||||||
</td>
|
</td>
|
||||||
|
</tr><tr>
|
||||||
|
<td width="120" valign="top" align="right" align="right">
|
||||||
|
<input
|
||||||
|
n:attr="checked => $user->getLeftMenuItemStatus('apps')"
|
||||||
|
type="checkbox"
|
||||||
|
name="menu_aplikoj" />
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<span class="nobold">{_my_apps}</span>
|
||||||
|
</td>
|
||||||
</tr><tr n:if="sizeof(OPENVK_ROOT_CONF['openvk']['preferences']['menu']['links']) > 0">
|
</tr><tr n:if="sizeof(OPENVK_ROOT_CONF['openvk']['preferences']['menu']['links']) > 0">
|
||||||
<td width="120" valign="top" align="right" align="right">
|
<td width="120" valign="top" align="right" align="right">
|
||||||
<input
|
<input
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
{extends "../@layout.xml"}
|
{extends "../@layout.xml"}
|
||||||
{block title}Подтвердить номер телефона{/block}
|
{block title}{_verify_phone_number}{/block}
|
||||||
|
|
||||||
{block header}
|
{block header}
|
||||||
Подтвердить номер телефона
|
{_verify_phone_number}
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block content}
|
{block content}
|
||||||
<center>
|
<center>
|
||||||
<p>Мы отправили SMS с кодом на номер <b>{substr_replace($change->number, "*****", 5, 5)}</b>, введите его сюда:</p>
|
<p>{_we_sended_first} <b>{substr_replace($change->number, "*****", 5, 5)}</b>, {_we_sended_end}:</p>
|
||||||
|
|
||||||
<form method="POST">
|
<form method="POST">
|
||||||
<input type="text" name="code" placeholder="34156, например" required />
|
<input type="text" name="code" placeholder="34156, например" required />
|
||||||
|
|
|
@ -119,10 +119,10 @@
|
||||||
{_warn_user_action}
|
{_warn_user_action}
|
||||||
</a>
|
</a>
|
||||||
<a href="/admin/user{$user->getId()}/bans" class="profile_link">
|
<a href="/admin/user{$user->getId()}/bans" class="profile_link">
|
||||||
Блокировки
|
{_blocks}
|
||||||
</a>
|
</a>
|
||||||
<a href="/admin/logs?uid={$user->getId()}" class="profile_link" style="width: 194px;">
|
<a href="/admin/logs?uid={$user->getId()}" class="profile_link" style="width: 194px;">
|
||||||
Последние действия
|
{_last_actions}
|
||||||
</a>
|
</a>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
@ -173,20 +173,20 @@
|
||||||
<a class="profile_link" style="display:block;width:96%;" href="javascript:reportUser()">{_report}</a>
|
<a class="profile_link" style="display:block;width:96%;" href="javascript:reportUser()">{_report}</a>
|
||||||
<script>
|
<script>
|
||||||
function reportUser() {
|
function reportUser() {
|
||||||
uReportMsgTxt = "Вы собираетесь пожаловаться на данного пользователя.";
|
uReportMsgTxt = tr("going_to_report_user");
|
||||||
uReportMsgTxt += "<br/>Что именно вам кажется недопустимым в этом материале?";
|
uReportMsgTxt += "<br/>"+tr("report_question_text");
|
||||||
uReportMsgTxt += "<br/><br/><b>Причина жалобы</b>: <input type='text' id='uReportMsgInput' placeholder='Причина' />"
|
uReportMsgTxt += "<br/><br/><b>"+tr("report_reason")+"</b>: <input type='text' id='uReportMsgInput' placeholder='" + tr("reason") + "' />"
|
||||||
|
|
||||||
MessageBox("Пожаловаться?", uReportMsgTxt, ["Подтвердить", "Отмена"], [
|
MessageBox(tr("report_question"), uReportMsgTxt, [tr("confirm_m"), tr("cancel")], [
|
||||||
(function() {
|
(function() {
|
||||||
res = document.querySelector("#uReportMsgInput").value;
|
res = document.querySelector("#uReportMsgInput").value;
|
||||||
xhr = new XMLHttpRequest();
|
xhr = new XMLHttpRequest();
|
||||||
xhr.open("GET", "/report/" + {$user->getId()} + "?reason=" + res + "&type=user", true);
|
xhr.open("GET", "/report/" + {$user->getId()} + "?reason=" + res + "&type=user", true);
|
||||||
xhr.onload = (function() {
|
xhr.onload = (function() {
|
||||||
if(xhr.responseText.indexOf("reason") === -1)
|
if(xhr.responseText.indexOf("reason") === -1)
|
||||||
MessageBox("Ошибка", "Не удалось подать жалобу...", ["OK"], [Function.noop]);
|
MessageBox(tr("error"), tr("error_sending_report"), ["OK"], [Function.noop]);
|
||||||
else
|
else
|
||||||
MessageBox("Операция успешна", "Скоро её рассмотрят модераторы", ["OK"], [Function.noop]);
|
MessageBox(tr("action_successfully"), tr("will_be_watched"), ["OK"], [Function.noop]);
|
||||||
});
|
});
|
||||||
xhr.send(null);
|
xhr.send(null);
|
||||||
}),
|
}),
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
<p>
|
<p>
|
||||||
{tr("user_banned", htmlentities($user->getFirstName()))|noescape}<br/>
|
{tr("user_banned", htmlentities($user->getFirstName()))|noescape}<br/>
|
||||||
{_user_banned_comment} <b>{$user->getBanReason()}</b>.<br/>
|
{_user_banned_comment} <b>{$user->getBanReason()}</b>.<br/>
|
||||||
Пользователь заблокирован
|
{_user_is_blocked}
|
||||||
<span n:if="$user->getUnbanTime() !== NULL">до: <b>{$user->getUnbanTime()}</b></span>
|
<span n:if="$user->getUnbanTime() !== NULL">{_before}: <b>{$user->getUnbanTime()}</b></span>
|
||||||
<span n:if="$user->getUnbanTime() === NULL"><b>навсегда</b></span>
|
<span n:if="$user->getUnbanTime() === NULL"><b>{_forever}</b></span>
|
||||||
</p>
|
</p>
|
||||||
{if isset($thisUser)}
|
{if isset($thisUser)}
|
||||||
<p n:if="$thisUser->getChandlerUser()->can('access')->model('admin')->whichBelongsTo(NULL) || $thisUser->getChandlerUser()->can('write')->model('openvk\Web\Models\Entities\TicketReply')->whichBelongsTo(0)">
|
<p n:if="$thisUser->getChandlerUser()->can('access')->model('admin')->whichBelongsTo(NULL) || $thisUser->getChandlerUser()->can('write')->model('openvk\Web\Models\Entities\TicketReply')->whichBelongsTo(0)">
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{extends "../@layout.xml"}
|
{extends "../@layout.xml"}
|
||||||
{block title}Изменить видеозапись{/block}
|
{block title}{_change_video}{/block}
|
||||||
|
|
||||||
{block header}
|
{block header}
|
||||||
<a href="{$thisUser->getURL()}">{$thisUser->getCanonicalName()}</a>
|
<a href="{$thisUser->getURL()}">{$thisUser->getCanonicalName()}</a>
|
||||||
|
@ -8,12 +8,12 @@
|
||||||
»
|
»
|
||||||
<a href="/video{$video->getPrettyId()}">{_video}</a>
|
<a href="/video{$video->getPrettyId()}">{_video}</a>
|
||||||
»
|
»
|
||||||
Изменить видеозапись
|
{_change_video}
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block content}
|
{block content}
|
||||||
<div class="container_gray">
|
<div class="container_gray">
|
||||||
<h4>Изменить видеозапись</h4>
|
<h4>{_change_video}</h4>
|
||||||
<form method="post" enctype="multipart/form-data">
|
<form method="post" enctype="multipart/form-data">
|
||||||
<table cellspacing="7" cellpadding="0" width="60%" border="0" align="center">
|
<table cellspacing="7" cellpadding="0" width="60%" border="0" align="center">
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
{else}
|
{else}
|
||||||
{var $driver = $video->getVideoDriver()}
|
{var $driver = $video->getVideoDriver()}
|
||||||
{if !$driver}
|
{if !$driver}
|
||||||
Эта видеозапись не поддерживается в вашей версии OpenVK.
|
{_unknown_video}
|
||||||
{else}
|
{else}
|
||||||
{$driver->getEmbed()|noescape}
|
{$driver->getEmbed()|noescape}
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -70,20 +70,20 @@
|
||||||
|
|
||||||
<script n:if="$canReport ?? false">
|
<script n:if="$canReport ?? false">
|
||||||
function reportVideo() {
|
function reportVideo() {
|
||||||
uReportMsgTxt = "Вы собираетесь пожаловаться на данную видеозапись.";
|
uReportMsgTxt = tr("going_to_report_video");
|
||||||
uReportMsgTxt += "<br/>Что именно вам кажется недопустимым в этом материале?";
|
uReportMsgTxt += "<br/>"+tr("report_question_text");
|
||||||
uReportMsgTxt += "<br/><br/><b>Причина жалобы</b>: <input type='text' id='uReportMsgInput' placeholder='Причина' />"
|
uReportMsgTxt += "<br/><br/><b>"+tr("report_reason")+"</b>: <input type='text' id='uReportMsgInput' placeholder='" + tr("reason") + "' />"
|
||||||
|
|
||||||
MessageBox("Пожаловаться?", uReportMsgTxt, ["Подтвердить", "Отмена"], [
|
MessageBox(tr("report_question"), uReportMsgTxt, [tr("confirm_m"), tr("cancel")], [
|
||||||
(function() {
|
(function() {
|
||||||
res = document.querySelector("#uReportMsgInput").value;
|
res = document.querySelector("#uReportMsgInput").value;
|
||||||
xhr = new XMLHttpRequest();
|
xhr = new XMLHttpRequest();
|
||||||
xhr.open("GET", "/report/" + {$video->getId()} + "?reason=" + res + "&type=video", true);
|
xhr.open("GET", "/report/" + {$video->getId()} + "?reason=" + res + "&type=video", true);
|
||||||
xhr.onload = (function() {
|
xhr.onload = (function() {
|
||||||
if(xhr.responseText.indexOf("reason") === -1)
|
if(xhr.responseText.indexOf("reason") === -1)
|
||||||
MessageBox("Ошибка", "Не удалось подать жалобу...", ["OK"], [Function.noop]);
|
MessageBox(tr("error"), tr("error_sending_report"), ["OK"], [Function.noop]);
|
||||||
else
|
else
|
||||||
MessageBox("Операция успешна", "Скоро её рассмотрят модераторы", ["OK"], [Function.noop]);
|
MessageBox(tr("action_successfully"), tr("will_be_watched"), ["OK"], [Function.noop]);
|
||||||
});
|
});
|
||||||
xhr.send(null);
|
xhr.send(null);
|
||||||
}),
|
}),
|
||||||
|
|
|
@ -34,24 +34,32 @@
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<a n:if="$canDelete ?? false" class="profile_link" style="display:block;width:96%;" href="/wall{$post->getPrettyId()}/delete">{_delete}</a>
|
<a n:if="$canDelete ?? false" class="profile_link" style="display:block;width:96%;" href="/wall{$post->getPrettyId()}/delete">{_delete}</a>
|
||||||
|
<a
|
||||||
|
n:if="$thisUser->getChandlerUser()->can('access')->model('admin')->whichBelongsTo(NULL) AND $post->getEditTime()"
|
||||||
|
style="display:block;width:96%;"
|
||||||
|
class="profile_link"
|
||||||
|
href="/admin/logs?type=1&obj_type=Post&obj_id={$post->getId()}"
|
||||||
|
>
|
||||||
|
{_changes_history}
|
||||||
|
</a>
|
||||||
<a n:if="$canReport ?? false" class="profile_link" style="display:block;width:96%;" href="javascript:reportPost()">{_report}</a>
|
<a n:if="$canReport ?? false" class="profile_link" style="display:block;width:96%;" href="javascript:reportPost()">{_report}</a>
|
||||||
</div>
|
</div>
|
||||||
<script n:if="$canReport ?? false">
|
<script n:if="$canReport ?? false">
|
||||||
function reportPost() {
|
function reportPost() {
|
||||||
uReportMsgTxt = "Вы собираетесь пожаловаться на данную запись.";
|
uReportMsgTxt = tr("going_to_report_post");
|
||||||
uReportMsgTxt += "<br/>Что именно вам кажется недопустимым в этом материале?";
|
uReportMsgTxt += "<br/>"+tr("report_question_text");
|
||||||
uReportMsgTxt += "<br/><br/><b>Причина жалобы</b>: <input type='text' id='uReportMsgInput' placeholder='Причина' />"
|
uReportMsgTxt += "<br/><br/><b>"+tr("report_reason")+"</b>: <input type='text' id='uReportMsgInput' placeholder='" + tr("reason") + "' />"
|
||||||
|
|
||||||
MessageBox("Пожаловаться?", uReportMsgTxt, ["Подтвердить", "Отмена"], [
|
MessageBox(tr("report_question"), uReportMsgTxt, [tr("confirm_m"), tr("cancel")], [
|
||||||
(function() {
|
(function() {
|
||||||
res = document.querySelector("#uReportMsgInput").value;
|
res = document.querySelector("#uReportMsgInput").value;
|
||||||
xhr = new XMLHttpRequest();
|
xhr = new XMLHttpRequest();
|
||||||
xhr.open("GET", "/report/" + {$post->getId()} + "?reason=" + res + "&type=post", true);
|
xhr.open("GET", "/report/" + {$post->getId()} + "?reason=" + res + "&type=post", true);
|
||||||
xhr.onload = (function() {
|
xhr.onload = (function() {
|
||||||
if(xhr.responseText.indexOf("reason") === -1)
|
if(xhr.responseText.indexOf("reason") === -1)
|
||||||
MessageBox("Ошибка", "Не удалось подать жалобу...", ["OK"], [Function.noop]);
|
MessageBox(tr("error"), tr("error_sending_report"), ["OK"], [Function.noop]);
|
||||||
else
|
else
|
||||||
MessageBox("Операция успешна", "Скоро её рассмотрят модераторы", ["OK"], [Function.noop]);
|
MessageBox(tr("action_successfully"), tr("will_be_watched"), ["OK"], [Function.noop]);
|
||||||
});
|
});
|
||||||
xhr.send(null);
|
xhr.send(null);
|
||||||
}),
|
}),
|
||||||
|
|
|
@ -8,19 +8,19 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td width="30" valign="top">
|
<td width="30" valign="top">
|
||||||
<a href="{$author->getURL()}">
|
<a href="{$author->getURL()}">
|
||||||
<img src="{$author->getAvatarURL('miniscule')}" width="30" class="cCompactAvatars" />
|
<img src="{$author->getAvatarURL('miniscule')}" width="30" class="cCompactAvatars post-avatar" />
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td width="100%" valign="top">
|
<td width="100%" valign="top">
|
||||||
<div class="post-author">
|
<div class="post-author">
|
||||||
<a href="{$author->getURL()}"><b>
|
<a href="{$author->getURL()}"><b class="post-author-name">
|
||||||
{$author->getCanonicalName()}
|
{$author->getCanonicalName()}
|
||||||
</b></a>
|
</b></a>
|
||||||
<img n:if="$author->isVerified()" class="name-checkmark" src="/assets/packages/static/openvk/img/checkmark.png"><br/>
|
<img n:if="$author->isVerified()" class="name-checkmark" src="/assets/packages/static/openvk/img/checkmark.png"><br/>
|
||||||
</div>
|
</div>
|
||||||
<div class="post-content" id="{$comment->getId()}">
|
<div class="post-content" id="{$comment->getId()}">
|
||||||
<div class="text" id="text{$comment->getId()}">
|
<div class="text" id="text{$comment->getId()}">
|
||||||
{$comment->getText()|noescape}
|
<span data-text="{$comment->getText(false)}" class="really_text">{$comment->getText()|noescape}</span>
|
||||||
|
|
||||||
<div n:ifcontent class="attachments_b">
|
<div n:ifcontent class="attachments_b">
|
||||||
<div class="attachment" n:foreach="$comment->getChildren() as $attachment" data-localized-nsfw-text="{_nsfw_warning}">
|
<div class="attachment" n:foreach="$comment->getChildren() as $attachment" data-localized-nsfw-text="{_nsfw_warning}">
|
||||||
|
@ -29,21 +29,21 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div n:if="isset($thisUser) &&! ($compact ?? false)" class="post-menu">
|
<div n:if="isset($thisUser) &&! ($compact ?? false)" class="post-menu">
|
||||||
<a
|
<a href="#_comment{$comment->getId()}" class="date">{$comment->getPublicationTime()}
|
||||||
href="{=$linkWithPost && get_class($comment->getTarget()) == 'openvk\Web\Models\Entities\Post' ? '/wall' . $comment->getTarget()->getPrettyId() : ''}#_comment{$comment->getId()}"
|
<span n:if="$comment->getEditTime()" class="edited editedMark">({_edited_short})</span>
|
||||||
class="date"
|
|
||||||
>
|
|
||||||
{$comment->getPublicationTime()}
|
|
||||||
</a>
|
</a>
|
||||||
{if !$timeOnly}
|
{if !$timeOnly}
|
||||||
|
|
|
|
||||||
{if $comment->canBeDeletedBy($thisUser)}
|
{if $comment->canBeDeletedBy($thisUser)}
|
||||||
<a href="/comment{$comment->getId()}/delete">{_delete}</a> |
|
<a href="/comment{$comment->getId()}/delete">{_delete}</a> |
|
||||||
{/if}
|
{/if}
|
||||||
|
{if $comment->canBeEditedBy($thisUser)}
|
||||||
|
<a id="editPost" data-id="{$comment->getId()}">{_edit}</a> |
|
||||||
|
{/if}
|
||||||
<a class="comment-reply">{_reply}</a>
|
<a class="comment-reply">{_reply}</a>
|
||||||
{if $thisUser->getId() != $comment->getOwner()->getId()}
|
{if $thisUser->getId() != $comment->getOwner()->getId()}
|
||||||
{var $canReport = true}
|
{var $canReport = true}
|
||||||
| <a href="javascript:reportComment()">Пожаловаться</a>
|
| <a href="javascript:reportComment()">{_report}</a>
|
||||||
{/if}
|
{/if}
|
||||||
<div style="float: right; font-size: .7rem;">
|
<div style="float: right; font-size: .7rem;">
|
||||||
<a class="post-like-button" href="/comment{$comment->getId()}/like?hash={rawurlencode($csrfToken)}">
|
<a class="post-like-button" href="/comment{$comment->getId()}/like?hash={rawurlencode($csrfToken)}">
|
||||||
|
@ -87,20 +87,20 @@
|
||||||
</table>
|
</table>
|
||||||
<script n:if="$canReport ?? false">
|
<script n:if="$canReport ?? false">
|
||||||
function reportComment() {
|
function reportComment() {
|
||||||
uReportMsgTxt = "Вы собираетесь пожаловаться на данный комментарий.";
|
uReportMsgTxt = tr("going_to_report_comment");
|
||||||
uReportMsgTxt += "<br/>Что именно вам кажется недопустимым в этом материале?";
|
uReportMsgTxt += "<br/>"+tr("report_question_text");
|
||||||
uReportMsgTxt += "<br/><br/><b>Причина жалобы</b>: <input type='text' id='uReportMsgInput' placeholder='Причина' />"
|
uReportMsgTxt += "<br/><br/><b>"+tr("report_reason")+"</b>: <input type='text' id='uReportMsgInput' placeholder='" + tr("reason") + "' />"
|
||||||
|
|
||||||
MessageBox("Пожаловаться?", uReportMsgTxt, ["Подтвердить", "Отмена"], [
|
MessageBox(tr("report_question"), uReportMsgTxt, [tr("confirm_m"), tr("cancel")], [
|
||||||
(function() {
|
(function() {
|
||||||
res = document.querySelector("#uReportMsgInput").value;
|
res = document.querySelector("#uReportMsgInput").value;
|
||||||
xhr = new XMLHttpRequest();
|
xhr = new XMLHttpRequest();
|
||||||
xhr.open("GET", "/report/" + {$comment->getId()} + "?reason=" + res + "&type=comment", true);
|
xhr.open("GET", "/report/" + {$comment->getId()} + "?reason=" + res + "&type=comment", true);
|
||||||
xhr.onload = (function() {
|
xhr.onload = (function() {
|
||||||
if(xhr.responseText.indexOf("reason") === -1)
|
if(xhr.responseText.indexOf("reason") === -1)
|
||||||
MessageBox("Ошибка", "Не удалось подать жалобу...", ["OK"], [Function.noop]);
|
MessageBox(tr("error"), tr("error_sending_report"), ["OK"], [Function.noop]);
|
||||||
else
|
else
|
||||||
MessageBox("Операция успешна", "Скоро её рассмотрят модераторы", ["OK"], [Function.noop]);
|
MessageBox(tr("action_successfully"), tr("will_be_watched"), ["OK"], [Function.noop]);
|
||||||
});
|
});
|
||||||
xhr.send(null);
|
xhr.send(null);
|
||||||
}),
|
}),
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{var $gift = $notification->getModel(0)}
|
{var $gift = $notification->getModel(0)}
|
||||||
{var $sender = $notification->getModel(1)}
|
{var $sender = $notification->getModel(1)}
|
||||||
|
|
||||||
<a href="{$sender->getURL()}"><b>{$sender->getCanonicalName()}</b></a> отправил вам подарок.
|
<a href="{$sender->getURL()}"><b>{$sender->getCanonicalName()}</b></a> {_nt_sent_gift}.
|
||||||
<div class="nobold">
|
<div class="nobold">
|
||||||
{$notification->getDateTime()}
|
{$notification->getDateTime()}
|
||||||
</div>
|
</div>
|
|
@ -18,13 +18,13 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td width="54" valign="top">
|
<td width="54" valign="top">
|
||||||
<a href="{$author->getURL()}">
|
<a href="{$author->getURL()}">
|
||||||
<img src="{$author->getAvatarURL('miniscule')}" width="{if $compact}25{else}50{/if}" {if $compact}class="cCompactAvatars"{/if} />
|
<img src="{$author->getAvatarURL('miniscule')}" width="{if $compact}25{else}50{/if}" class="post-avatar {if $compact}cCompactAvatars{/if}" />
|
||||||
<span n:if="!$post->isPostedOnBehalfOfGroup() && !$compact && $author->isOnline()" class="post-online">{_online}</span>
|
<span n:if="!$post->isPostedOnBehalfOfGroup() && !$compact && $author->isOnline()" class="post-online">{_online}</span>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td width="100%" valign="top">
|
<td width="100%" valign="top">
|
||||||
<div class="post-author">
|
<div class="post-author">
|
||||||
<a href="{$author->getURL()}"><b>{$author->getCanonicalName()}</b></a>
|
<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">
|
<img n:if="$author->isVerified()" class="name-checkmark" src="/assets/packages/static/openvk/img/checkmark.png">
|
||||||
{$post->isDeactivationMessage() ? ($author->isFemale() ? tr($deac . "_f") : tr($deac . "_m"))}
|
{$post->isDeactivationMessage() ? ($author->isFemale() ? tr($deac . "_f") : tr($deac . "_m"))}
|
||||||
{$post->isUpdateAvatarMessage() && !$post->isPostedOnBehalfOfGroup() ? ($author->isFemale() ? tr("upd_f") : tr("upd_m"))}
|
{$post->isUpdateAvatarMessage() && !$post->isPostedOnBehalfOfGroup() ? ($author->isFemale() ? tr("upd_f") : tr("upd_m"))}
|
||||||
|
@ -62,10 +62,17 @@
|
||||||
<a class="pin" href="/wall{$post->getPrettyId()}/pin?act=pin&hash={rawurlencode($csrfToken)}"></a>
|
<a class="pin" href="/wall{$post->getPrettyId()}/pin?act=pin&hash={rawurlencode($csrfToken)}"></a>
|
||||||
{/if}
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
{if $post->canBeEditedBy($thisUser) && !($forceNoEditLink ?? false) && $compact == false}
|
||||||
|
<a class="edit" 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}></a>
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
<div class="post-content" id="{$post->getPrettyId()}">
|
<div class="post-content" id="{$post->getPrettyId()}">
|
||||||
<div class="text" id="text{$post->getPrettyId()}">
|
<div class="text">
|
||||||
{$post->getText()|noescape}
|
<span data-text="{$post->getText(false)}" class="really_text">{$post->getText()|noescape}</span>
|
||||||
|
|
||||||
<div n:ifcontent class="attachments_b">
|
<div n:ifcontent class="attachments_b">
|
||||||
<div class="attachment" n:foreach="$post->getChildren() as $attachment" data-localized-nsfw-text="{_nsfw_warning}">
|
<div class="attachment" n:foreach="$post->getChildren() as $attachment" data-localized-nsfw-text="{_nsfw_warning}">
|
||||||
|
@ -75,7 +82,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div n:if="$post->isAd()" style="color:grey;">
|
<div n:if="$post->isAd()" style="color:grey;">
|
||||||
<br/>
|
<br/>
|
||||||
! Этот пост был размещён за взятку.
|
! {_post_is_ad}
|
||||||
</div>
|
</div>
|
||||||
<div n:if="$post->isSigned()" class="post-signature">
|
<div n:if="$post->isSigned()" class="post-signature">
|
||||||
{var $actualAuthor = $post->getOwner(false)}
|
{var $actualAuthor = $post->getOwner(false)}
|
||||||
|
@ -88,7 +95,9 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="post-menu" n:if="$compact == false">
|
<div class="post-menu" n:if="$compact == false">
|
||||||
<a href="/wall{$post->getPrettyId()}" class="date">{$post->getPublicationTime()}</a>
|
<a href="/wall{$post->getPrettyId()}" class="date">{$post->getPublicationTime()}
|
||||||
|
<span n:if="$post->getEditTime()" class="edited editedMark">({_edited_short})</span>
|
||||||
|
</a>
|
||||||
<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']}">
|
<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">
|
<img src="/assets/packages/static/openvk/img/app_icons_mini/{$post->getPlatform(this)}.svg">
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -7,18 +7,20 @@
|
||||||
{var $deac = "post_deact_silent"}
|
{var $deac = "post_deact_silent"}
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<table border="0" style="font-size: 11px;" n:class="post, $post->isExplicit() ? post-nsfw">
|
<table border="0" style="font-size: 11px;" n:class="post, $post->isExplicit() ? post-nsfw">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="54" valign="top">
|
<td width="54" valign="top">
|
||||||
<a href="{$author->getURL()}">
|
<a href="{$author->getURL()}">
|
||||||
<img src="{$author->getAvatarURL('miniscule')}" width="50" />
|
<img src="{$author->getAvatarURL('miniscule')}" class="post-avatar" width="50" />
|
||||||
<span n:if="!$post->isPostedOnBehalfOfGroup() && !($compact ?? false) && $author->isOnline()" class="post-online">{_online}</span>
|
<span n:if="!$post->isPostedOnBehalfOfGroup() && !($compact ?? false) && $author->isOnline()" class="post-online">{_online}</span>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td width="100%" valign="top">
|
<td width="100%" valign="top">
|
||||||
<div class="post-author">
|
<div class="post-author">
|
||||||
<a href="{$author->getURL()}"><b>{$author->getCanonicalName()}</b></a>
|
<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">
|
<img n:if="$author->isVerified()" class="name-checkmark" src="/assets/packages/static/openvk/img/checkmark.png">
|
||||||
{if $post->isDeactivationMessage()}
|
{if $post->isDeactivationMessage()}
|
||||||
{$author->isFemale() ? tr($deac . "_f") : tr($deac . "_m")}
|
{$author->isFemale() ? tr($deac . "_f") : tr($deac . "_m")}
|
||||||
|
@ -51,15 +53,17 @@
|
||||||
{/if}
|
{/if}
|
||||||
<br/>
|
<br/>
|
||||||
<a href="/wall{$post->getPrettyId()}" class="date">
|
<a href="/wall{$post->getPrettyId()}" class="date">
|
||||||
{$post->getPublicationTime()}{if $post->isPinned()}, {_pinned}{/if}
|
{$post->getPublicationTime()} <span n:if="$post->getEditTime()" class="editedMark">({_edited_short})</span>{if $post->isPinned()}, {_pinned}{/if}
|
||||||
<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']}">
|
<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">
|
<img src="/assets/packages/static/openvk/img/app_icons_mini/{$post->getPlatform(this)}.svg">
|
||||||
</a>
|
</a>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="post-content" id="{$post->getPrettyId()}">
|
<div class="post-content" id="{$post->getPrettyId()}">
|
||||||
<div class="text" id="text{$post->getPrettyId()}">
|
<div class="text">
|
||||||
{$post->getText()|noescape}
|
{var $owner = $author->getId()}
|
||||||
|
|
||||||
|
<span data-text="{$post->getText(false)}" class="really_text">{$post->getText()|noescape}</span>
|
||||||
|
|
||||||
<div n:ifcontent class="attachments_b">
|
<div n:ifcontent class="attachments_b">
|
||||||
<div class="attachment" n:foreach="$post->getChildren() as $attachment" data-localized-nsfw-text="{_nsfw_warning}">
|
<div class="attachment" n:foreach="$post->getChildren() as $attachment" data-localized-nsfw-text="{_nsfw_warning}">
|
||||||
|
@ -69,7 +73,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div n:if="$post->isAd()" style="color:grey;">
|
<div n:if="$post->isAd()" style="color:grey;">
|
||||||
<br/>
|
<br/>
|
||||||
! Этот пост был размещён за взятку.
|
! {_post_is_ad}
|
||||||
</div>
|
</div>
|
||||||
<div n:if="$post->isSigned()" class="post-signature">
|
<div n:if="$post->isSigned()" class="post-signature">
|
||||||
{var $actualAuthor = $post->getOwner(false)}
|
{var $actualAuthor = $post->getOwner(false)}
|
||||||
|
@ -87,6 +91,13 @@
|
||||||
{var $forceNoPinLink = true}
|
{var $forceNoPinLink = true}
|
||||||
{/if}
|
{/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> |
|
||||||
|
{/if}
|
||||||
|
|
||||||
{if !($forceNoDeleteLink ?? false) && $post->canBeDeletedBy($thisUser)}
|
{if !($forceNoDeleteLink ?? false) && $post->canBeDeletedBy($thisUser)}
|
||||||
<a href="/wall{$post->getPrettyId()}/delete">{_delete}</a> |
|
<a href="/wall{$post->getPrettyId()}/delete">{_delete}</a> |
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
@ -129,6 +129,8 @@ routes:
|
||||||
handler: "Wall->rss"
|
handler: "Wall->rss"
|
||||||
- url: "/wall{num}/makePost"
|
- url: "/wall{num}/makePost"
|
||||||
handler: "Wall->makePost"
|
handler: "Wall->makePost"
|
||||||
|
- url: "/wall/edit"
|
||||||
|
handler: "Wall->edit"
|
||||||
- url: "/wall{num}_{num}"
|
- url: "/wall{num}_{num}"
|
||||||
handler: "Wall->post"
|
handler: "Wall->post"
|
||||||
- url: "/wall{num}_{num}/like"
|
- url: "/wall{num}_{num}/like"
|
||||||
|
|
|
@ -2735,3 +2735,114 @@ body.article .floating_sidebar, body.article .page_content {
|
||||||
height: 37px;
|
height: 37px;
|
||||||
border-bottom: 1px solid #C7C7C7;
|
border-bottom: 1px solid #C7C7C7;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.edited {
|
||||||
|
color: #9b9b9b;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uploadedImage img {
|
||||||
|
max-height: 76px;
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lagged {
|
||||||
|
filter: opacity(0.5);
|
||||||
|
cursor: progress;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editMenu.loading {
|
||||||
|
filter: opacity(0.5);
|
||||||
|
cursor: progress;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editMenu.loading * {
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lagged * {
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button.dragged {
|
||||||
|
background: #c4c4c4 !important;
|
||||||
|
border-color: #c4c4c4 !important;
|
||||||
|
color: black !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.whiteBox {
|
||||||
|
background: white;
|
||||||
|
width: 421px;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
border: 1px solid #E8E8E8;
|
||||||
|
margin-top: 7%;
|
||||||
|
height: 231px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.boxContent {
|
||||||
|
padding: 24px 38px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.blueList {
|
||||||
|
list-style-type: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.blueList li {
|
||||||
|
color: black;
|
||||||
|
font-size: 11px;
|
||||||
|
padding-top: 7px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.blueList li::before {
|
||||||
|
content: " ";
|
||||||
|
width: 5px;
|
||||||
|
height: 5px;
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: bottom;
|
||||||
|
background-color: #73889C;
|
||||||
|
margin: 3px;
|
||||||
|
margin-left: 2px;
|
||||||
|
margin-right: 7px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.insertedPhoto {
|
||||||
|
background: white;
|
||||||
|
border: 1px solid #E8E7EA;
|
||||||
|
padding: 10px;
|
||||||
|
height: 100px;
|
||||||
|
margin-top: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uploadedImage {
|
||||||
|
float: right;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uploadedImageDescription {
|
||||||
|
width: 449px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uploadedImageDescription textarea {
|
||||||
|
width: 84%;
|
||||||
|
height: 86px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.smallFrame {
|
||||||
|
border: 1px solid #E1E3E5;
|
||||||
|
background: #F0F0F0;
|
||||||
|
height: 33px;
|
||||||
|
text-align: center;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.smallFrame .smallBtn {
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.smallFrame:hover {
|
||||||
|
background: #E9F0F1 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -110,10 +110,24 @@
|
||||||
transition-duration: 0.3s;
|
transition-duration: 0.3s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.post-author .edit {
|
||||||
|
float: right;
|
||||||
|
height: 16px;
|
||||||
|
width: 16px;
|
||||||
|
overflow: auto;
|
||||||
|
background: url("/assets/packages/static/openvk/img/edit.png") no-repeat 0 0;
|
||||||
|
opacity: 0.1;
|
||||||
|
transition-duration: 0.3s;
|
||||||
|
}
|
||||||
|
|
||||||
.post-author .pin:hover {
|
.post-author .pin:hover {
|
||||||
opacity: 0.4;
|
opacity: 0.4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.post-author .edit:hover {
|
||||||
|
opacity: 0.4;
|
||||||
|
}
|
||||||
|
|
||||||
.expand_button {
|
.expand_button {
|
||||||
background-color: #eee;
|
background-color: #eee;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
BIN
Web/static/img/edit.png
Normal file
BIN
Web/static/img/edit.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 571 B |
198
Web/static/js/al_photos.js
Normal file
198
Web/static/js/al_photos.js
Normal file
|
@ -0,0 +1,198 @@
|
||||||
|
$(document).on("change", "#uploadButton", (e) => {
|
||||||
|
let iterator = 0
|
||||||
|
|
||||||
|
if(e.currentTarget.files.length > 10) {
|
||||||
|
MessageBox(tr("error"), tr("too_many_pictures"), [tr("ok")], [() => {Function.noop}])
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for(const file of e.currentTarget.files) {
|
||||||
|
if(!file.type.startsWith('image/')) {
|
||||||
|
MessageBox(tr("error"), tr("only_images_accepted", escapeHtml(file.name)), [tr("ok")], [() => {Function.noop}])
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(file.size > 5 * 1024 * 1024) {
|
||||||
|
MessageBox(tr("error"), tr("max_filesize", 5), [tr("ok")], [() => {Function.noop}])
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(document.querySelector(".whiteBox").style.display == "block") {
|
||||||
|
document.querySelector(".whiteBox").style.display = "none"
|
||||||
|
document.querySelector(".insertThere").append(document.getElementById("fakeButton"));
|
||||||
|
}
|
||||||
|
|
||||||
|
let photos = new FormData()
|
||||||
|
for(file of e.currentTarget.files) {
|
||||||
|
photos.append("photo_"+iterator, file)
|
||||||
|
iterator += 1
|
||||||
|
}
|
||||||
|
|
||||||
|
photos.append("count", e.currentTarget.files.length)
|
||||||
|
photos.append("hash", u("meta[name=csrf]").attr("value"))
|
||||||
|
|
||||||
|
let xhr = new XMLHttpRequest()
|
||||||
|
xhr.open("POST", "/photos/upload?album="+document.getElementById("album").value)
|
||||||
|
|
||||||
|
xhr.onloadstart = () => {
|
||||||
|
document.querySelector(".insertPhotos").insertAdjacentHTML("beforeend", `<img id="loader" src="/assets/packages/static/openvk/img/loading_mini.gif">`)
|
||||||
|
}
|
||||||
|
|
||||||
|
xhr.onload = () => {
|
||||||
|
let result = JSON.parse(xhr.responseText)
|
||||||
|
|
||||||
|
if(result.success) {
|
||||||
|
u("#loader").remove()
|
||||||
|
let photosArr = result.photos
|
||||||
|
|
||||||
|
for(photo of photosArr) {
|
||||||
|
let table = document.querySelector(".insertPhotos")
|
||||||
|
|
||||||
|
table.insertAdjacentHTML("beforeend", `
|
||||||
|
<div id="photo" class="insertedPhoto" data-id="${photo.id}">
|
||||||
|
<div class="uploadedImageDescription" style="float: left;">
|
||||||
|
<span style="color: #464646;position: absolute;">${tr("description")}:</span>
|
||||||
|
<textarea style="margin-left: 62px; resize: none;" maxlength="255"></textarea>
|
||||||
|
</div>
|
||||||
|
<div class="uploadedImage">
|
||||||
|
<a href="${photo.link}" target="_blank"><img width="125" src="${photo.url}"></a>
|
||||||
|
<a class="profile_link" style="width: 125px;" id="deletePhoto" data-id="${photo.vid}" data-owner="${photo.owner}">${tr("delete")}</a>
|
||||||
|
<!--<div class="smallFrame" style="margin-top: 6px;">
|
||||||
|
<div class="smallBtn">${tr("album_poster")}</div>
|
||||||
|
</div>-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
`)
|
||||||
|
}
|
||||||
|
|
||||||
|
document.getElementById("endUploading").style.display = "block"
|
||||||
|
} else {
|
||||||
|
u("#loader").remove()
|
||||||
|
MessageBox(tr("error"), escapeHtml(result.flash.message) ?? tr("error_uploading_photo"), [tr("ok")], [() => {Function.noop}])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
xhr.send(photos)
|
||||||
|
})
|
||||||
|
|
||||||
|
$(document).on("click", "#endUploading", (e) => {
|
||||||
|
let table = document.querySelector("#photos")
|
||||||
|
let data = new FormData()
|
||||||
|
let arr = new Map();
|
||||||
|
for(el of table.querySelectorAll("div#photo")) {
|
||||||
|
arr.set(el.dataset.id, el.querySelector("textarea").value)
|
||||||
|
}
|
||||||
|
|
||||||
|
data.append("photos", JSON.stringify(Object.fromEntries(arr)))
|
||||||
|
data.append("hash", u("meta[name=csrf]").attr("value"))
|
||||||
|
|
||||||
|
let xhr = new XMLHttpRequest()
|
||||||
|
// в самом вк на каждое изменение описания отправляется свой запрос, но тут мы экономим запросы
|
||||||
|
xhr.open("POST", "/photos/upload?act=finish&album="+document.getElementById("album").value)
|
||||||
|
|
||||||
|
xhr.onloadstart = () => {
|
||||||
|
e.currentTarget.setAttribute("disabled", "disabled")
|
||||||
|
}
|
||||||
|
|
||||||
|
xhr.onerror = () => {
|
||||||
|
MessageBox(tr("error"), tr("error_uploading_photo"), [tr("ok")], [() => {Function.noop}])
|
||||||
|
}
|
||||||
|
|
||||||
|
xhr.onload = () => {
|
||||||
|
let result = JSON.parse(xhr.responseText)
|
||||||
|
|
||||||
|
if(!result.success) {
|
||||||
|
MessageBox(tr("error"), escapeHtml(result.flash.message), [tr("ok")], [() => {Function.noop}])
|
||||||
|
} else {
|
||||||
|
document.querySelector(".page_content .insertPhotos").innerHTML = ""
|
||||||
|
document.getElementById("endUploading").style.display = "none"
|
||||||
|
|
||||||
|
NewNotification(tr("photos_successfully_uploaded"), tr("click_to_go_to_album"), null, () => {window.location.assign(`/album${result.owner}_${result.album}`)})
|
||||||
|
|
||||||
|
document.querySelector(".whiteBox").style.display = "block"
|
||||||
|
document.querySelector(".insertAgain").append(document.getElementById("fakeButton"))
|
||||||
|
}
|
||||||
|
|
||||||
|
e.currentTarget.removeAttribute("disabled")
|
||||||
|
}
|
||||||
|
|
||||||
|
xhr.send(data)
|
||||||
|
})
|
||||||
|
|
||||||
|
$(document).on("click", "#deletePhoto", (e) => {
|
||||||
|
let data = new FormData()
|
||||||
|
data.append("hash", u("meta[name=csrf]").attr("value"))
|
||||||
|
|
||||||
|
let xhr = new XMLHttpRequest()
|
||||||
|
xhr.open("POST", `/photo${e.currentTarget.dataset.owner}_${e.currentTarget.dataset.id}/delete`)
|
||||||
|
|
||||||
|
xhr.onloadstart = () => {
|
||||||
|
e.currentTarget.closest("div#photo").classList.add("lagged")
|
||||||
|
}
|
||||||
|
|
||||||
|
xhr.onerror = () => {
|
||||||
|
MessageBox(tr("error"), tr("unknown_error"), [tr("ok")], [() => {Function.noop}])
|
||||||
|
}
|
||||||
|
|
||||||
|
xhr.onload = () => {
|
||||||
|
u(e.currentTarget.closest("div#photo")).remove()
|
||||||
|
|
||||||
|
if(document.querySelectorAll("div#photo").length < 1) {
|
||||||
|
document.getElementById("endUploading").style.display = "none"
|
||||||
|
document.querySelector(".whiteBox").style.display = "block"
|
||||||
|
document.querySelector(".insertAgain").append(document.getElementById("fakeButton"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
xhr.send(data)
|
||||||
|
})
|
||||||
|
|
||||||
|
$(document).on("dragover drop", (e) => {
|
||||||
|
e.preventDefault()
|
||||||
|
|
||||||
|
return false;
|
||||||
|
})
|
||||||
|
|
||||||
|
$(".container_gray").on("dragover", (e) => {
|
||||||
|
e.preventDefault()
|
||||||
|
document.querySelector("#fakeButton").classList.add("dragged")
|
||||||
|
document.querySelector("#fakeButton").value = tr("drag_files_here")
|
||||||
|
})
|
||||||
|
|
||||||
|
$(".container_gray").on("dragleave", (e) => {
|
||||||
|
e.preventDefault()
|
||||||
|
document.querySelector("#fakeButton").classList.remove("dragged")
|
||||||
|
document.querySelector("#fakeButton").value = tr("upload_picts")
|
||||||
|
})
|
||||||
|
|
||||||
|
$(".container_gray").on("drop", (e) => {
|
||||||
|
e.originalEvent.dataTransfer.dropEffect = 'move';
|
||||||
|
e.preventDefault()
|
||||||
|
|
||||||
|
$(".container_gray").trigger("dragleave")
|
||||||
|
|
||||||
|
let files = e.originalEvent.dataTransfer.files
|
||||||
|
|
||||||
|
for(const file of files) {
|
||||||
|
if(!file.type.startsWith('image/')) {
|
||||||
|
MessageBox(tr("error"), tr("only_images_accepted", escapeHtml(file.name)), [tr("ok")], [() => {Function.noop}])
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(file.size > 5 * 1024 * 1024) {
|
||||||
|
MessageBox(tr("error"), tr("max_filesize", 5), [tr("ok")], [() => {Function.noop}])
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
document.getElementById("uploadButton").files = files
|
||||||
|
u("#uploadButton").trigger("change")
|
||||||
|
})
|
||||||
|
|
||||||
|
u(".container_gray").on("paste", (e) => {
|
||||||
|
if(e.clipboardData.files.length > 0 && e.clipboardData.files.length < 10) {
|
||||||
|
document.getElementById("uploadButton").files = e.clipboardData.files;
|
||||||
|
u("#uploadButton").trigger("change")
|
||||||
|
}
|
||||||
|
})
|
|
@ -417,3 +417,111 @@ $(document).on("click", "#videoAttachment", async (e) => {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
$(document).on("click", "#editPost", (e) => {
|
||||||
|
let post = e.currentTarget.closest("table")
|
||||||
|
let content = post.querySelector(".text")
|
||||||
|
let text = content.querySelector(".really_text")
|
||||||
|
|
||||||
|
if(content.querySelector("textarea") == null) {
|
||||||
|
content.insertAdjacentHTML("afterbegin", `
|
||||||
|
<div class="editMenu">
|
||||||
|
<div id="wall-post-input999">
|
||||||
|
<textarea id="new_content">${text.dataset.text}</textarea>
|
||||||
|
<input type="button" class="button" value="${tr("save")}" id="endEditing">
|
||||||
|
<input type="button" class="button" value="${tr("cancel")}" id="cancelEditing">
|
||||||
|
</div>
|
||||||
|
${e.currentTarget.dataset.nsfw != null ? `
|
||||||
|
<div class="postOptions">
|
||||||
|
<label><input type="checkbox" id="nswfw" ${e.currentTarget.dataset.nsfw == 1 ? `checked` : ``}>${tr("contains_nsfw")}</label>
|
||||||
|
</div>
|
||||||
|
` : ``}
|
||||||
|
${e.currentTarget.dataset.fromgroup != null ? `
|
||||||
|
<div class="postOptions">
|
||||||
|
<label><input type="checkbox" id="fromgroup" ${e.currentTarget.dataset.fromgroup == 1 ? `checked` : ``}>${tr("post_as_group")}</label>
|
||||||
|
</div>
|
||||||
|
` : ``}
|
||||||
|
</div>
|
||||||
|
`)
|
||||||
|
|
||||||
|
u(content.querySelector("#cancelEditing")).on("click", () => {post.querySelector("#editPost").click()})
|
||||||
|
u(content.querySelector("#endEditing")).on("click", () => {
|
||||||
|
let nwcntnt = content.querySelector("#new_content").value
|
||||||
|
let type = "post"
|
||||||
|
|
||||||
|
if(post.classList.contains("comment")) {
|
||||||
|
type = "comment"
|
||||||
|
}
|
||||||
|
|
||||||
|
let xhr = new XMLHttpRequest()
|
||||||
|
xhr.open("POST", "/wall/edit")
|
||||||
|
|
||||||
|
xhr.onloadstart = () => {
|
||||||
|
content.querySelector(".editMenu").classList.add("loading")
|
||||||
|
}
|
||||||
|
|
||||||
|
xhr.onerror = () => {
|
||||||
|
MessageBox(tr("error"), "unknown error occured", [tr("ok")], [() => {Function.noop}])
|
||||||
|
}
|
||||||
|
|
||||||
|
xhr.ontimeout = () => {
|
||||||
|
MessageBox(tr("error"), "Try to refresh page", [tr("ok")], [() => {Function.noop}])
|
||||||
|
}
|
||||||
|
|
||||||
|
xhr.onload = () => {
|
||||||
|
let result = JSON.parse(xhr.responseText)
|
||||||
|
|
||||||
|
if(result.error == "no") {
|
||||||
|
post.querySelector("#editPost").click()
|
||||||
|
content.querySelector(".really_text").innerHTML = result.new_content
|
||||||
|
|
||||||
|
if(post.querySelector(".editedMark") == null) {
|
||||||
|
post.querySelector(".date").insertAdjacentHTML("beforeend", `
|
||||||
|
<span class="edited editedMark">(${tr("edited_short")})</span>
|
||||||
|
`)
|
||||||
|
}
|
||||||
|
|
||||||
|
if(e.currentTarget.dataset.nsfw != null) {
|
||||||
|
e.currentTarget.setAttribute("data-nsfw", result.nsfw)
|
||||||
|
|
||||||
|
if(result.nsfw == 0) {
|
||||||
|
post.classList.remove("post-nsfw")
|
||||||
|
} else {
|
||||||
|
post.classList.add("post-nsfw")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(e.currentTarget.dataset.fromgroup != null) {
|
||||||
|
e.currentTarget.setAttribute("data-fromgroup", result.from_group)
|
||||||
|
}
|
||||||
|
|
||||||
|
post.querySelector(".post-avatar").setAttribute("src", result.author.avatar)
|
||||||
|
post.querySelector(".post-author-name").innerHTML = result.author.name
|
||||||
|
post.querySelector(".really_text").setAttribute("data-text", result.new_text)
|
||||||
|
} else {
|
||||||
|
MessageBox(tr("error"), result.error, [tr("ok")], [Function.noop])
|
||||||
|
post.querySelector("#editPost").click()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
|
||||||
|
xhr.send("postid="+e.currentTarget.dataset.id+
|
||||||
|
"&newContent="+nwcntnt+
|
||||||
|
"&hash="+encodeURIComponent(u("meta[name=csrf]").attr("value"))+
|
||||||
|
"&type="+type+
|
||||||
|
"&nsfw="+(content.querySelector("#nswfw") != null ? content.querySelector("#nswfw").checked : 0)+
|
||||||
|
"&fromgroup="+(content.querySelector("#fromgroup") != null ? content.querySelector("#fromgroup").checked : 0))
|
||||||
|
})
|
||||||
|
|
||||||
|
u(".editMenu").on("keydown", (e) => {
|
||||||
|
if(e.ctrlKey && e.keyCode === 13)
|
||||||
|
content.querySelector("#endEditing").click()
|
||||||
|
});
|
||||||
|
|
||||||
|
text.style.display = "none"
|
||||||
|
setupWallPostInputHandlers(999)
|
||||||
|
} else {
|
||||||
|
u(content.querySelector(".editMenu")).remove()
|
||||||
|
text.style.display = "block"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
|
@ -149,6 +149,10 @@
|
||||||
|
|
||||||
"user_banned" = "Unfortunately, we had to block the <b>$1</b> user page.";
|
"user_banned" = "Unfortunately, we had to block the <b>$1</b> user page.";
|
||||||
"user_banned_comment" = "Moderator's comment:";
|
"user_banned_comment" = "Moderator's comment:";
|
||||||
|
"verified_page" = "Verified page";
|
||||||
|
"user_is_blocked" = "User is blocked";
|
||||||
|
"before" = "before";
|
||||||
|
"forever" = "forever";
|
||||||
|
|
||||||
/* Wall */
|
/* Wall */
|
||||||
|
|
||||||
|
@ -214,6 +218,9 @@
|
||||||
"graffiti" = "Graffiti";
|
"graffiti" = "Graffiti";
|
||||||
|
|
||||||
"reply" = "Reply";
|
"reply" = "Reply";
|
||||||
|
"post_is_ad" = "This post is sponsored.";
|
||||||
|
|
||||||
|
"edited_short" = "edited";
|
||||||
|
|
||||||
/* Friends */
|
/* Friends */
|
||||||
|
|
||||||
|
@ -338,9 +345,14 @@
|
||||||
|
|
||||||
"create" = "Create";
|
"create" = "Create";
|
||||||
"albums" = "Albums";
|
"albums" = "Albums";
|
||||||
|
"album" = "Album";
|
||||||
|
"photos" = "photos";
|
||||||
"create_album" = "Create album";
|
"create_album" = "Create album";
|
||||||
"edit_album" = "Edit album";
|
"edit_album" = "Edit album";
|
||||||
|
"edit_photo" = "Edit photo";
|
||||||
"creating_album" = "Creating album";
|
"creating_album" = "Creating album";
|
||||||
|
"delete_photo" = "Delete photo";
|
||||||
|
"sure_deleting_photo" = "Do you really want to delete this picture?";
|
||||||
"upload_photo" = "Upload photo";
|
"upload_photo" = "Upload photo";
|
||||||
"photo" = "Photo";
|
"photo" = "Photo";
|
||||||
"upload_button" = "Upload";
|
"upload_button" = "Upload";
|
||||||
|
@ -382,6 +394,25 @@
|
||||||
"upd_f" = "updated her profile picture";
|
"upd_f" = "updated her profile picture";
|
||||||
"upd_g" = "updated group's picture";
|
"upd_g" = "updated group's picture";
|
||||||
|
|
||||||
|
"add_photos" = "Add photos";
|
||||||
|
"upload_picts" = "Upload photos";
|
||||||
|
"end_uploading" = "Finish uploading";
|
||||||
|
"photos_successfully_uploaded" = "Photos successfully uploaded";
|
||||||
|
"click_to_go_to_album" = "Click here to go to album.";
|
||||||
|
"error_uploading_photo" = "Error when uploading photo";
|
||||||
|
"too_many_pictures" = "No more than 10 pictures";
|
||||||
|
|
||||||
|
"drag_files_here" = "Drag files here";
|
||||||
|
"only_images_accepted" = "File \"$1\" is not an image";
|
||||||
|
"max_filesize" = "Max filesize is $1 MB";
|
||||||
|
|
||||||
|
"uploading_photos_from_computer" = "Uploading photos from Your computer";
|
||||||
|
"supported_formats" = "Supported file formats: JPG, PNG and GIF.";
|
||||||
|
"max_load_photos" = "You can upload up to 10 photos at a time.";
|
||||||
|
"tip" = "Tip";
|
||||||
|
"tip_ctrl" = "to select multiple photos at once, hold down the Ctrl key when selecting files in Windows or the CMD key in Mac OS.";
|
||||||
|
"album_poster" = "Album poster";
|
||||||
|
|
||||||
/* Notes */
|
/* Notes */
|
||||||
|
|
||||||
"notes" = "Notes";
|
"notes" = "Notes";
|
||||||
|
@ -416,6 +447,8 @@
|
||||||
|
|
||||||
"notes_closed" = "You can't attach note to post, because only you can see them.<br> You can change it in <a href=\"/settings?act=privacy\">settings</a>.";
|
"notes_closed" = "You can't attach note to post, because only you can see them.<br> You can change it in <a href=\"/settings?act=privacy\">settings</a>.";
|
||||||
"do_not_attach_note" = "Do not attach note";
|
"do_not_attach_note" = "Do not attach note";
|
||||||
|
"something" = "Something";
|
||||||
|
"supports_xhtml" = "from (X)HTML supported.";
|
||||||
|
|
||||||
/* Notes: Article Viewer */
|
/* Notes: Article Viewer */
|
||||||
"aw_legacy_ui" = "Legacy interface";
|
"aw_legacy_ui" = "Legacy interface";
|
||||||
|
@ -631,6 +664,9 @@
|
||||||
"two_factor_authentication_backup_codes_1" = "Backup codes allow you to validate your login when you don't have access to your phone, for example, while traveling.";
|
"two_factor_authentication_backup_codes_1" = "Backup codes allow you to validate your login when you don't have access to your phone, for example, while traveling.";
|
||||||
"two_factor_authentication_backup_codes_2" = "You have <b>10 more codes</b>, each code can only be used once. Print them out, put them away in a safe place and use them when you need codes to validate your login.";
|
"two_factor_authentication_backup_codes_2" = "You have <b>10 more codes</b>, each code can only be used once. Print them out, put them away in a safe place and use them when you need codes to validate your login.";
|
||||||
"two_factor_authentication_backup_codes_3" = "You can get new codes if they run out. Only the last created backup codes are valid.";
|
"two_factor_authentication_backup_codes_3" = "You can get new codes if they run out. Only the last created backup codes are valid.";
|
||||||
|
"viewing_backup_codes" = "View backup codes";
|
||||||
|
"disable_2fa" = "Disable 2FA";
|
||||||
|
"viewing" = "View";
|
||||||
|
|
||||||
/* Sorting */
|
/* Sorting */
|
||||||
|
|
||||||
|
@ -657,12 +693,16 @@
|
||||||
"videos_other" = "$1 videos";
|
"videos_other" = "$1 videos";
|
||||||
|
|
||||||
"view_video" = "View";
|
"view_video" = "View";
|
||||||
|
|
||||||
"selecting_video" = "Selecting videos";
|
"selecting_video" = "Selecting videos";
|
||||||
"upload_new_video" = "Upload new video";
|
"upload_new_video" = "Upload new video";
|
||||||
"max_attached_videos" = "Max is 10 videos";
|
"max_attached_videos" = "Max is 10 videos";
|
||||||
"no_videos" = "You don't have uploaded videos.";
|
"no_videos" = "You don't have uploaded videos.";
|
||||||
"no_videos_results" = "No results.";
|
"no_videos_results" = "No results.";
|
||||||
|
|
||||||
|
"change_video" = "Change video";
|
||||||
|
"unknown_video" = "This video is not supported in your version of OpenVK.";
|
||||||
|
|
||||||
/* Notifications */
|
/* Notifications */
|
||||||
|
|
||||||
"feedback" = "Feedback";
|
"feedback" = "Feedback";
|
||||||
|
@ -701,6 +741,7 @@
|
||||||
"nt_mention_in_video" = "in discussion of this video";
|
"nt_mention_in_video" = "in discussion of this video";
|
||||||
"nt_mention_in_note" = "in discussion of this note";
|
"nt_mention_in_note" = "in discussion of this note";
|
||||||
"nt_mention_in_topic" = "in the discussion";
|
"nt_mention_in_topic" = "in the discussion";
|
||||||
|
"nt_sent_gift" = "sent you a gift";
|
||||||
|
|
||||||
/* Time */
|
/* Time */
|
||||||
|
|
||||||
|
@ -915,6 +956,20 @@
|
||||||
"text_of_the_post" = "Text of the post";
|
"text_of_the_post" = "Text of the post";
|
||||||
"today" = "today";
|
"today" = "today";
|
||||||
|
|
||||||
|
"will_be_watched" = "It will be reviewed by the moderators soon";
|
||||||
|
|
||||||
|
"report_question" = "Report?";
|
||||||
|
"report_question_text" = "What exactly do you find unacceptable about this material?";
|
||||||
|
"report_reason" = "Report reason";
|
||||||
|
"reason" = "Reason";
|
||||||
|
"going_to_report_app" = "You are about to report this application.";
|
||||||
|
"going_to_report_club" = "You are about to report this club.";
|
||||||
|
"going_to_report_photo" = "You are about to report this photo.";
|
||||||
|
"going_to_report_user" = "You are about to report this user.";
|
||||||
|
"going_to_report_video" = "You are about to report this video.";
|
||||||
|
"going_to_report_post" = "You are about to report this post.";
|
||||||
|
"going_to_report_comment" = "You are about to report this comment.";
|
||||||
|
|
||||||
"comment" = "Comment";
|
"comment" = "Comment";
|
||||||
"sender" = "Sender";
|
"sender" = "Sender";
|
||||||
|
|
||||||
|
@ -1072,6 +1127,7 @@
|
||||||
"error_data_too_big" = "Attribute '$1' must be at most $2 $3 long";
|
"error_data_too_big" = "Attribute '$1' must be at most $2 $3 long";
|
||||||
|
|
||||||
"forbidden" = "Access error";
|
"forbidden" = "Access error";
|
||||||
|
"unknown_error" = "Unknown error";
|
||||||
"forbidden_comment" = "This user's privacy settings do not allow you to look at his page.";
|
"forbidden_comment" = "This user's privacy settings do not allow you to look at his page.";
|
||||||
|
|
||||||
"changes_saved" = "Changes saved";
|
"changes_saved" = "Changes saved";
|
||||||
|
@ -1124,21 +1180,116 @@
|
||||||
"post_is_empty_or_too_big" = "The post is empty or too big.";
|
"post_is_empty_or_too_big" = "The post is empty or too big.";
|
||||||
"post_is_too_big" = "The post is too big.";
|
"post_is_too_big" = "The post is too big.";
|
||||||
|
|
||||||
|
"error_sending_report" = "Failed to make a report...";
|
||||||
|
|
||||||
|
"error_when_saving_gift" = "Error when saving gift";
|
||||||
|
"error_when_saving_gift_bad_image" = "Gift image is crooked.";
|
||||||
|
"error_when_saving_gift_no_image" = "Please, upload gift's image.";
|
||||||
|
"video_uploads_disabled" = "Video uploads are disabled by the system administrator.";
|
||||||
|
|
||||||
|
"error_when_publishing_comment" = "Error when publishing comment";
|
||||||
|
"error_when_publishing_comment_description" = "Image is corrupted, too big or one side is many times larger than the other.";
|
||||||
|
"error_comment_empty" = "Comment is empty or too big.";
|
||||||
|
"error_comment_too_big" = "Comment is too big.";
|
||||||
|
"error_comment_file_too_big" = "Media file is corrupted or too big.";
|
||||||
|
|
||||||
|
"comment_is_added" = "Comment has been added";
|
||||||
|
"comment_is_added_desc" = "Your comment will appear on page.";
|
||||||
|
|
||||||
|
"error_access_denied_short" = "Access denied";
|
||||||
|
"error_access_denied" = "You don't have rights to edit this resource";
|
||||||
|
"success" = "Success";
|
||||||
|
"comment_will_not_appear" = "This comment will no longer appear.";
|
||||||
|
|
||||||
|
"error_when_gifting" = "Failed to gift";
|
||||||
|
"error_user_not_exists" = "User or pack does not exist.";
|
||||||
|
"error_no_rights_gifts" = "Failed to check rights on gift.";
|
||||||
|
"error_no_more_gifts" = "You no longer have such gifts.";
|
||||||
|
"error_no_money" = "Shout out to a beggar.";
|
||||||
|
|
||||||
|
"gift_sent" = "Gift sent";
|
||||||
|
"gift_sent_desc" = "You sent a gift to $1 for $2 votes";
|
||||||
|
|
||||||
|
"error_on_server_side" = "An error occurred on the server side. Contact your system administrator.";
|
||||||
|
"error_no_group_name" = "You did not enter a group name.";
|
||||||
|
|
||||||
|
"success_action" = "Action successful";
|
||||||
|
"connection_error" = "Connection error";
|
||||||
|
"connection_error_desc" = "Failed to connect to telemetry service.";
|
||||||
|
|
||||||
|
"error_when_uploading_photo" = "Failed to save photo";
|
||||||
|
|
||||||
|
"new_changes_desc" = "New data will appear in your group.";
|
||||||
|
"comment_is_changed" = "Admin comment changed";
|
||||||
|
"comment_is_deleted" = "Admin comment deleted";
|
||||||
|
"comment_is_too_long" = "Comment is too long ($1 symbols instead 36)";
|
||||||
|
"x_no_more_admin" = "$1 no longer an administrator.";
|
||||||
|
"x_is_admin" = "$1 appointed as an administrator.";
|
||||||
|
|
||||||
|
"x_is_now_hidden" = "Now $1 will be shown as a normal subscriber to everyone except other admins";
|
||||||
|
"x_is_now_showed" = "Now everyone will know that $1 is an administrator.";
|
||||||
|
|
||||||
|
"note_is_deleted" = "Note was deleted";
|
||||||
|
"note_x_is_now_deleted" = "Note \"$1\" was successfully deleted.";
|
||||||
|
"new_data_accepted" = "New data accepted.";
|
||||||
|
|
||||||
|
"album_is_deleted" = "Album was deleted";
|
||||||
|
"album_x_is_deleted" = "Album $1 was successfully deleted.";
|
||||||
|
|
||||||
|
"error_adding_to_deleted" = "Failed to save photo to <b>DELETED</b>.";
|
||||||
|
"error_adding_to_x" = "Failed to save photo to <b>$1</b>.";
|
||||||
|
"no_photo" = "No photo";
|
||||||
|
|
||||||
|
"select_file" = "Select file";
|
||||||
|
"new_description_will_appear" = "The updated description will appear on the photo page..";
|
||||||
|
"photo_is_deleted" = "Photo was deleted";
|
||||||
|
"photo_is_deleted_desc" = "This photo has been successfully deleted.";
|
||||||
|
|
||||||
|
"no_video" = "No video";
|
||||||
|
"no_video_desc" = "Select a file or provide a link.";
|
||||||
|
"error_occured" = "Error occured";
|
||||||
|
"error_video_damaged_file" = "The file is corrupted or does not contain video.";
|
||||||
|
"error_video_incorrect_link" = "Perhaps the link is incorrect.";
|
||||||
|
"error_video_no_title" = "Video can't be published without title.";
|
||||||
|
|
||||||
|
"new_data_video" = "The updated description will appear on the video page.";
|
||||||
|
"error_deleting_video" = "Failed to delete video";
|
||||||
|
"login_please" = "You are not signed in.";
|
||||||
|
"invalid_code" = "Failed to verify phone number: Invalid code.";
|
||||||
|
|
||||||
|
"error_max_pinned_clubs" = "Maximum count of the pinned groups is 10.";
|
||||||
|
"error_viewing_subs" = "You cannot view the full list of subscriptions $1.";
|
||||||
|
"error_status_too_long" = "Status is too long ($1 instead 255)";
|
||||||
|
"death" = "Death...";
|
||||||
|
"nehay" = "Live long!";
|
||||||
|
"user_successfully_banned" = "User was successfully banned.";
|
||||||
|
|
||||||
|
"content_is_deleted" = "The content has been removed and the user has received a warning.";
|
||||||
|
"report_is_ignored" = "Report was ignored.";
|
||||||
|
"group_owner_is_banned" = "Group's owner was successfully banned";
|
||||||
|
"group_is_banned" = "Group was successfully banned";
|
||||||
|
|
||||||
|
"description_too_long" = "Description is too long.";
|
||||||
|
|
||||||
/* Admin actions */
|
/* Admin actions */
|
||||||
|
|
||||||
"login_as" = "Login as $1";
|
"login_as" = "Login as $1";
|
||||||
"manage_user_action" = "Manage user";
|
"manage_user_action" = "Manage user";
|
||||||
"manage_group_action" = "Manage group";
|
"manage_group_action" = "Manage group";
|
||||||
"ban_user_action" = "Ban user";
|
"ban_user_action" = "Ban user";
|
||||||
|
"blocks" = "Blocks";
|
||||||
|
"last_actions" = "Last actions";
|
||||||
"unban_user_action" = "Unban user";
|
"unban_user_action" = "Unban user";
|
||||||
"warn_user_action" = "Warn user";
|
"warn_user_action" = "Warn user";
|
||||||
"ban_in_support_user_action" = "Ban in support";
|
"ban_in_support_user_action" = "Ban in support";
|
||||||
"unban_in_support_user_action" = "Unban in support";
|
"unban_in_support_user_action" = "Unban in support";
|
||||||
|
"changes_history" = "Editing history";
|
||||||
|
|
||||||
/* Admin panel */
|
/* Admin panel */
|
||||||
|
|
||||||
"admin" = "Admin panel";
|
"admin" = "Admin panel";
|
||||||
|
|
||||||
|
"sandbox_for_developers" = "Sandbox for developers";
|
||||||
"admin_ownerid" = "Owner ID";
|
"admin_ownerid" = "Owner ID";
|
||||||
"admin_author" = "Author";
|
"admin_author" = "Author";
|
||||||
"admin_name" = "Name";
|
"admin_name" = "Name";
|
||||||
|
@ -1224,6 +1375,11 @@
|
||||||
"admin_banned_link_not_specified" = "The link is not specified";
|
"admin_banned_link_not_specified" = "The link is not specified";
|
||||||
"admin_banned_link_not_found" = "Link not found";
|
"admin_banned_link_not_found" = "Link not found";
|
||||||
|
|
||||||
|
"admin_gift_moved_successfully" = "Gift moved successfully";
|
||||||
|
"admin_gift_moved_to_recycle" = "This gift will now be in <b>Recycle Bin</b>.";
|
||||||
|
|
||||||
|
"logs" = "Logs";
|
||||||
|
"logs_anything" = "Anything";
|
||||||
"logs_adding" = "Creation";
|
"logs_adding" = "Creation";
|
||||||
"logs_editing" = "Editing";
|
"logs_editing" = "Editing";
|
||||||
"logs_removing" = "Deletion";
|
"logs_removing" = "Deletion";
|
||||||
|
@ -1232,6 +1388,28 @@
|
||||||
"logs_edited" = "edited";
|
"logs_edited" = "edited";
|
||||||
"logs_removed" = "removed";
|
"logs_removed" = "removed";
|
||||||
"logs_restored" = "restored";
|
"logs_restored" = "restored";
|
||||||
|
"logs_id_post" = "ID записи";
|
||||||
|
"logs_id_object" = "ID объекта";
|
||||||
|
"logs_uuid_user" = "UUID пользователя";
|
||||||
|
"logs_change_type" = "Тип изменения";
|
||||||
|
"logs_change_object" = "Тип объекта";
|
||||||
|
|
||||||
|
"logs_user" = "User";
|
||||||
|
"logs_object" = "Object";
|
||||||
|
"logs_type" = "Type";
|
||||||
|
"logs_changes" = "Changes";
|
||||||
|
"logs_time" = "Time";
|
||||||
|
|
||||||
|
"bans_history" = "Blocks history";
|
||||||
|
"bans_history_blocked" = "Blocked";
|
||||||
|
"bans_history_initiator" = "Initiator";
|
||||||
|
"bans_history_start" = "Start";
|
||||||
|
"bans_history_end" = "End";
|
||||||
|
"bans_history_time" = "Time";
|
||||||
|
"bans_history_reason" = "Reason";
|
||||||
|
"bans_history_start" = "Start";
|
||||||
|
"bans_history_removed" = "Removed";
|
||||||
|
"bans_history_active" = "Active block";
|
||||||
|
|
||||||
/* Paginator (deprecated) */
|
/* Paginator (deprecated) */
|
||||||
|
|
||||||
|
@ -1279,6 +1457,8 @@
|
||||||
|
|
||||||
"warning" = "Warning";
|
"warning" = "Warning";
|
||||||
"question_confirm" = "This action can't be undone. Do you really wanna do it?";
|
"question_confirm" = "This action can't be undone. Do you really wanna do it?";
|
||||||
|
"confirm_m" = "Confirm";
|
||||||
|
"action_successfully" = "Success";
|
||||||
|
|
||||||
/* User alerts */
|
/* User alerts */
|
||||||
|
|
||||||
|
@ -1292,6 +1472,8 @@
|
||||||
|
|
||||||
/* Away */
|
/* Away */
|
||||||
|
|
||||||
|
"transition_is_blocked" = "Transition is blocked";
|
||||||
|
"caution" = "Caution";
|
||||||
"url_is_banned" = "Link is not allowed";
|
"url_is_banned" = "Link is not allowed";
|
||||||
"url_is_banned_comment" = "The <b>$1</b> administration recommends not to follow this link.";
|
"url_is_banned_comment" = "The <b>$1</b> administration recommends not to follow this link.";
|
||||||
"url_is_banned_comment_r" = "The <b>$1</b> administration recommends not to follow this link.<br><br>The reason is: <b>$2</b>";
|
"url_is_banned_comment_r" = "The <b>$1</b> administration recommends not to follow this link.<br><br>The reason is: <b>$2</b>";
|
||||||
|
@ -1556,6 +1738,41 @@
|
||||||
|
|
||||||
"no_results" = "No results";
|
"no_results" = "No results";
|
||||||
|
|
||||||
|
/* BadBrowser */
|
||||||
|
|
||||||
|
"deprecated_browser" = "Deprecated browser";
|
||||||
|
"deprecated_browser_description" = "To view this content, you will need Firefox ESR 52+ or an equivalent World Wide Web navigator. Sorry about that.";
|
||||||
|
|
||||||
|
/* Statistics */
|
||||||
|
|
||||||
|
"coverage" = "Coverage";
|
||||||
|
"coverage_this_week" = "This graph shows the coverage over the last 7 days.";
|
||||||
|
"views" = "Views";
|
||||||
|
"views_this_week" = "This graph shows the views of community posts over the last 7 days.";
|
||||||
|
|
||||||
|
"full_coverage" = "Full coverage";
|
||||||
|
"all_views" = "All views";
|
||||||
|
|
||||||
|
"subs_coverage" = "Subscribers coverage";
|
||||||
|
"subs_views" = "Subscribers views";
|
||||||
|
|
||||||
|
"viral_coverage" = "Viral coverage";
|
||||||
|
"viral_views" = "Viral views";
|
||||||
|
|
||||||
|
/* Sudo */
|
||||||
|
|
||||||
|
"you_entered_as" = "You logged as";
|
||||||
|
"please_rights" = "please respect the right to privacy of other people's correspondence and do not abuse user swapping.";
|
||||||
|
"click_on" = "Click";
|
||||||
|
"there" = "there";
|
||||||
|
"to_leave" = "to logout";
|
||||||
|
|
||||||
|
/* Phone number */
|
||||||
|
|
||||||
|
"verify_phone_number" = "Confirm phone number";
|
||||||
|
"we_sended_first" = "We sended SMS with code on number";
|
||||||
|
"we_sended_end" = "enter it here";
|
||||||
|
|
||||||
/* Mobile */
|
/* Mobile */
|
||||||
"mobile_friends" = "Friends";
|
"mobile_friends" = "Friends";
|
||||||
"mobile_photos" = "Photos";
|
"mobile_photos" = "Photos";
|
||||||
|
@ -1571,3 +1788,40 @@
|
||||||
"mobile_like" = "Like";
|
"mobile_like" = "Like";
|
||||||
"mobile_user_info_hide" = "Hide";
|
"mobile_user_info_hide" = "Hide";
|
||||||
"mobile_user_info_show_details" = "Show details";
|
"mobile_user_info_show_details" = "Show details";
|
||||||
|
|
||||||
|
/* Moderation */
|
||||||
|
|
||||||
|
"section" = "Section";
|
||||||
|
"template_ban" = "Ban by template";
|
||||||
|
"active_templates" = "Active templates";
|
||||||
|
"users_reports" = "Users reports";
|
||||||
|
"substring" = "Substring";
|
||||||
|
"n_user" = "User";
|
||||||
|
"time_before" = "Time earlier than";
|
||||||
|
"time_after" = "Time later than";
|
||||||
|
"where_for_search" = "WHERE for search by section";
|
||||||
|
"block_params" = "Block params";
|
||||||
|
"only_rollback" = "Only rollback";
|
||||||
|
"only_block" = "Only blocking";
|
||||||
|
"rollback_and_block" = "Rollback and blocking";
|
||||||
|
"subm" = "Apply";
|
||||||
|
|
||||||
|
"select_section_for_start" = "Choose a section to get started";
|
||||||
|
"results_will_be_there" = "Search results will be displayed here";
|
||||||
|
"search_results" = "Search results";
|
||||||
|
"cnt" = "pcs";
|
||||||
|
|
||||||
|
"link_to_page" = "Link on page";
|
||||||
|
"or_subnet" = "or subnet";
|
||||||
|
"error_when_searching" = "Error while executing request";
|
||||||
|
"no_found" = "No found";
|
||||||
|
"operation_successfully" = "Operation completed successfully";
|
||||||
|
|
||||||
|
"unknown_error" = "Unknown error";
|
||||||
|
"templates" = "Template";
|
||||||
|
"type" = "Type";
|
||||||
|
"count" = "Count";
|
||||||
|
"time" = "Time";
|
||||||
|
|
||||||
|
"roll_back" = "rollback";
|
||||||
|
"roll_backed" = "rollbacked";
|
||||||
|
|
|
@ -132,6 +132,10 @@
|
||||||
"updated_at" = "Обновлено $1";
|
"updated_at" = "Обновлено $1";
|
||||||
"user_banned" = "К сожалению, нам пришлось заблокировать страницу пользователя <b>$1</b>.";
|
"user_banned" = "К сожалению, нам пришлось заблокировать страницу пользователя <b>$1</b>.";
|
||||||
"user_banned_comment" = "Комментарий модератора:";
|
"user_banned_comment" = "Комментарий модератора:";
|
||||||
|
"verified_page" = "Подтверждённая страница";
|
||||||
|
"user_is_blocked" = "Пользователь заблокирован";
|
||||||
|
"before" = "до";
|
||||||
|
"forever" = "навсегда";
|
||||||
|
|
||||||
/* Wall */
|
/* Wall */
|
||||||
|
|
||||||
|
@ -192,6 +196,8 @@
|
||||||
"version_incompatibility" = "Не удалось отобразить это вложение. Возможно, база данных несовместима с текущей версией OpenVK.";
|
"version_incompatibility" = "Не удалось отобразить это вложение. Возможно, база данных несовместима с текущей версией OpenVK.";
|
||||||
"graffiti" = "Граффити";
|
"graffiti" = "Граффити";
|
||||||
"reply" = "Ответить";
|
"reply" = "Ответить";
|
||||||
|
"post_is_ad" = "Этот пост был размещён за взятку.";
|
||||||
|
"edited_short" = "ред.";
|
||||||
|
|
||||||
/* Friends */
|
/* Friends */
|
||||||
|
|
||||||
|
@ -320,10 +326,15 @@
|
||||||
/* Albums */
|
/* Albums */
|
||||||
|
|
||||||
"create" = "Создать";
|
"create" = "Создать";
|
||||||
|
"album" = "Альбом";
|
||||||
"albums" = "Альбомы";
|
"albums" = "Альбомы";
|
||||||
|
"photos" = "фотографий";
|
||||||
"create_album" = "Создать альбом";
|
"create_album" = "Создать альбом";
|
||||||
"edit_album" = "Редактировать альбом";
|
"edit_album" = "Редактировать альбом";
|
||||||
|
"edit_photo" = "Изменить фотографию";
|
||||||
"creating_album" = "Создание альбома";
|
"creating_album" = "Создание альбома";
|
||||||
|
"delete_photo" = "Удалить фотографию";
|
||||||
|
"sure_deleting_photo" = "Вы уверены, что хотите удалить эту фотографию?";
|
||||||
"upload_photo" = "Загрузить фотографию";
|
"upload_photo" = "Загрузить фотографию";
|
||||||
"photo" = "Фотография";
|
"photo" = "Фотография";
|
||||||
"upload_button" = "Загрузить";
|
"upload_button" = "Загрузить";
|
||||||
|
@ -365,6 +376,25 @@
|
||||||
"upd_f" = "обновила фотографию на своей странице";
|
"upd_f" = "обновила фотографию на своей странице";
|
||||||
"upd_g" = "обновило фотографию группы";
|
"upd_g" = "обновило фотографию группы";
|
||||||
|
|
||||||
|
"add_photos" = "Добавить фотографии";
|
||||||
|
"upload_picts" = "Загрузить фотографии";
|
||||||
|
"end_uploading" = "Завершить загрузку";
|
||||||
|
"photos_successfully_uploaded" = "Фотографии успешно загружены";
|
||||||
|
"click_to_go_to_album" = "Нажмите, чтобы перейти к альбому.";
|
||||||
|
"error_uploading_photo" = "Не удалось загрузить фотографию";
|
||||||
|
"too_many_pictures" = "Не больше 10 фотографий";
|
||||||
|
|
||||||
|
"drag_files_here" = "Перетащите файлы сюда";
|
||||||
|
"only_images_accepted" = "Файл \"$1\" не является изображением";
|
||||||
|
"max_filesize" = "Максимальный размер файла — $1 мегабайт";
|
||||||
|
|
||||||
|
"uploading_photos_from_computer" = "Загрузка фотографий с Вашего компьютера";
|
||||||
|
"supported_formats" = "Поддерживаемые форматы файлов: JPG, PNG и GIF.";
|
||||||
|
"max_load_photos" = "Вы можете загружать до 10 фотографий за один раз.";
|
||||||
|
"tip" = "Подсказка";
|
||||||
|
"tip_ctrl" = "для того, чтобы выбрать сразу несколько фотографий, удерживайте клавишу Ctrl при выборе файлов в ОС Windows или клавишу CMD в Mac OS.";
|
||||||
|
"album_poster" = "Обложка альбома";
|
||||||
|
|
||||||
/* Notes */
|
/* Notes */
|
||||||
|
|
||||||
"notes" = "Заметки";
|
"notes" = "Заметки";
|
||||||
|
@ -400,6 +430,8 @@
|
||||||
|
|
||||||
"notes_closed" = "Вы не можете прикрепить заметку к записи, так как ваши заметки видны только вам.<br><br> Вы можете поменять это в <a href=\"/settings?act=privacy\">настройках</a>.";
|
"notes_closed" = "Вы не можете прикрепить заметку к записи, так как ваши заметки видны только вам.<br><br> Вы можете поменять это в <a href=\"/settings?act=privacy\">настройках</a>.";
|
||||||
"do_not_attach_note" = "Не прикреплять заметку";
|
"do_not_attach_note" = "Не прикреплять заметку";
|
||||||
|
"something" = "Кое-что";
|
||||||
|
"supports_xhtml" = "из (X)HTML поддерживается.";
|
||||||
|
|
||||||
/* Notes: Article Viewer */
|
/* Notes: Article Viewer */
|
||||||
"aw_legacy_ui" = "Старый интерфейс";
|
"aw_legacy_ui" = "Старый интерфейс";
|
||||||
|
@ -590,6 +622,9 @@
|
||||||
"two_factor_authentication_backup_codes_1" = "Резервные коды позволяют подтверждать вход, когда у вас нет доступа к телефону, например, в путешествии.";
|
"two_factor_authentication_backup_codes_1" = "Резервные коды позволяют подтверждать вход, когда у вас нет доступа к телефону, например, в путешествии.";
|
||||||
"two_factor_authentication_backup_codes_2" = "У вас есть ещё <b>10 кодов</b>, каждым кодом можно воспользоваться только один раз. Распечатайте их, уберите в надежное место и используйте, когда потребуются коды для подтверждения входа.";
|
"two_factor_authentication_backup_codes_2" = "У вас есть ещё <b>10 кодов</b>, каждым кодом можно воспользоваться только один раз. Распечатайте их, уберите в надежное место и используйте, когда потребуются коды для подтверждения входа.";
|
||||||
"two_factor_authentication_backup_codes_3" = "Вы можете получить новые коды, если они заканчиваются. Действительны только последние созданные резервные коды.";
|
"two_factor_authentication_backup_codes_3" = "Вы можете получить новые коды, если они заканчиваются. Действительны только последние созданные резервные коды.";
|
||||||
|
"viewing_backup_codes" = "Просмотр резервных кодов";
|
||||||
|
"disable_2fa" = "Отключить 2FA";
|
||||||
|
"viewing" = "Просмотреть";
|
||||||
|
|
||||||
/* Sorting */
|
/* Sorting */
|
||||||
|
|
||||||
|
@ -615,6 +650,8 @@
|
||||||
"videos_many" = "$1 видеозаписей";
|
"videos_many" = "$1 видеозаписей";
|
||||||
"videos_other" = "$1 видеозаписей";
|
"videos_other" = "$1 видеозаписей";
|
||||||
"view_video" = "Просмотр";
|
"view_video" = "Просмотр";
|
||||||
|
"change_video" = "Изменить видеозапись";
|
||||||
|
"unknown_video" = "Эта видеозапись не поддерживается в вашей версии OpenVK.";
|
||||||
|
|
||||||
"selecting_video" = "Выбор видеозаписей";
|
"selecting_video" = "Выбор видеозаписей";
|
||||||
"upload_new_video" = "Загрузить новое видео";
|
"upload_new_video" = "Загрузить новое видео";
|
||||||
|
@ -657,6 +694,7 @@
|
||||||
"nt_mention_in_video" = "в обсуждении видеозаписи";
|
"nt_mention_in_video" = "в обсуждении видеозаписи";
|
||||||
"nt_mention_in_note" = "в обсуждении заметки";
|
"nt_mention_in_note" = "в обсуждении заметки";
|
||||||
"nt_mention_in_topic" = "в обсуждении";
|
"nt_mention_in_topic" = "в обсуждении";
|
||||||
|
"nt_sent_gift" = "отправил вам подарок";
|
||||||
|
|
||||||
/* Time */
|
/* Time */
|
||||||
|
|
||||||
|
@ -850,6 +888,20 @@
|
||||||
"text_of_the_post" = "Текст записи";
|
"text_of_the_post" = "Текст записи";
|
||||||
"today" = "сегодня";
|
"today" = "сегодня";
|
||||||
|
|
||||||
|
"will_be_watched" = "Скоро её рассмотрят модераторы";
|
||||||
|
|
||||||
|
"report_question" = "Пожаловаться?";
|
||||||
|
"report_question_text" = "Что именно вам кажется недопустимым в этом материале?";
|
||||||
|
"report_reason" = "Причина жалобы";
|
||||||
|
"reason" = "Причина";
|
||||||
|
"going_to_report_app" = "Вы собираетесь пожаловаться на данное приложение.";
|
||||||
|
"going_to_report_club" = "Вы собираетесь пожаловаться на данное сообщество.";
|
||||||
|
"going_to_report_photo" = "Вы собираетесь пожаловаться на данную фотографию.";
|
||||||
|
"going_to_report_user" = "Вы собираетесь пожаловаться на данного пользователя.";
|
||||||
|
"going_to_report_video" = "Вы собираетесь пожаловаться на данную видеозапись.";
|
||||||
|
"going_to_report_post" = "Вы собираетесь пожаловаться на данную запись.";
|
||||||
|
"going_to_report_comment" = "Вы собираетесь пожаловаться на данный комментарий.";
|
||||||
|
|
||||||
"comment" = "Комментарий";
|
"comment" = "Комментарий";
|
||||||
"sender" = "Отправитель";
|
"sender" = "Отправитель";
|
||||||
"author" = "Автор";
|
"author" = "Автор";
|
||||||
|
@ -989,6 +1041,7 @@
|
||||||
"error_repost_fail" = "Не удалось поделиться записью";
|
"error_repost_fail" = "Не удалось поделиться записью";
|
||||||
"error_data_too_big" = "Аттрибут '$1' не может быть длиннее $2 $3";
|
"error_data_too_big" = "Аттрибут '$1' не может быть длиннее $2 $3";
|
||||||
"forbidden" = "Ошибка доступа";
|
"forbidden" = "Ошибка доступа";
|
||||||
|
"unknown_error" = "Неизвестная ошибка";
|
||||||
"forbidden_comment" = "Настройки приватности этого пользователя не разрешают вам смотреть на его страницу.";
|
"forbidden_comment" = "Настройки приватности этого пользователя не разрешают вам смотреть на его страницу.";
|
||||||
"changes_saved" = "Изменения сохранены";
|
"changes_saved" = "Изменения сохранены";
|
||||||
"changes_saved_comment" = "Новые данные появятся на вашей странице";
|
"changes_saved_comment" = "Новые данные появятся на вашей странице";
|
||||||
|
@ -1024,6 +1077,94 @@
|
||||||
"media_file_corrupted_or_too_large" = "Файл медиаконтента повреждён или слишком велик.";
|
"media_file_corrupted_or_too_large" = "Файл медиаконтента повреждён или слишком велик.";
|
||||||
"post_is_empty_or_too_big" = "Пост пустой или слишком большой.";
|
"post_is_empty_or_too_big" = "Пост пустой или слишком большой.";
|
||||||
"post_is_too_big" = "Пост слишком большой.";
|
"post_is_too_big" = "Пост слишком большой.";
|
||||||
|
"error_sending_report" = "Не удалось подать жалобу...";
|
||||||
|
"error_when_saving_gift" = "Не удалось сохранить подарок";
|
||||||
|
"error_when_saving_gift_bad_image" = "Изображение подарка кривое.";
|
||||||
|
"error_when_saving_gift_no_image" = "Пожалуйста, загрузите изображение подарка.";
|
||||||
|
"video_uploads_disabled" = "Загрузки видео отключены администратором.";
|
||||||
|
|
||||||
|
"error_when_publishing_comment" = "Не удалось опубликовать комментарий";
|
||||||
|
"error_when_publishing_comment_description" = "Файл изображения повреждён, слишком велик или одна сторона изображения в разы больше другой.";
|
||||||
|
"error_comment_empty" = "Комментарий пустой или слишком большой.";
|
||||||
|
"error_comment_too_big" = "Комментарий слишком большой.";
|
||||||
|
"error_comment_file_too_big" = "Файл медиаконтента повреждён или слишком велик.";
|
||||||
|
|
||||||
|
"comment_is_added" = "Комментарий добавлен";
|
||||||
|
"comment_is_added_desc" = "Ваш комментарий появится на странице.";
|
||||||
|
|
||||||
|
"error_access_denied_short" = "Ошибка доступа";
|
||||||
|
"error_access_denied" = "У вас недостаточно прав, чтобы редактировать этот ресурс";
|
||||||
|
"success" = "Успешно";
|
||||||
|
"comment_will_not_appear" = "Этот комментарий больше не будет показыватся.";
|
||||||
|
|
||||||
|
"error_when_gifting" = "Не удалось подарить";
|
||||||
|
"error_user_not_exists" = "Пользователь или набор не существуют.";
|
||||||
|
"error_no_rights_gifts" = "Не удалось подтвердить права на подарок.";
|
||||||
|
"error_no_more_gifts" = "У вас больше не осталось таких подарков.";
|
||||||
|
"error_no_money" = "Ору нищ не пук.";
|
||||||
|
|
||||||
|
"gift_sent" = "Подарок отправлен";
|
||||||
|
"gift_sent_desc" = "Вы отправили подарок <b>$1</b> за $2 голосов";
|
||||||
|
|
||||||
|
"error_on_server_side" = "Произошла ошибка на стороне сервера. Обратитесь к системному администратору.";
|
||||||
|
"error_no_group_name" = "Вы не ввели название группы.";
|
||||||
|
|
||||||
|
"success_action" = "Операция успешна";
|
||||||
|
"connection_error" = "Ошибка подключения";
|
||||||
|
"connection_error_desc" = "Не удалось подключится к службе телеметрии.";
|
||||||
|
|
||||||
|
"error_when_uploading_photo" = "Не удалось сохранить фотографию.";
|
||||||
|
|
||||||
|
"new_changes_desc" = "Новые данные появятся в вашей группе.";
|
||||||
|
"comment_is_changed" = "Комментарий к администратору изменён";
|
||||||
|
"comment_is_deleted" = "Комментарий к администратору удален";
|
||||||
|
"comment_is_too_long" = "Комментарий слишком длинный ($1 символов вместо 36 символов)";
|
||||||
|
"x_no_more_admin" = "$1 больше не администратор.";
|
||||||
|
"x_is_admin" = "$1 назначен(а) администратором.";
|
||||||
|
|
||||||
|
"x_is_now_hidden" = "Теперь $1 будет показываться как обычный подписчик всем, кроме других администраторов";
|
||||||
|
"x_is_now_showed" = "Теперь все будут знать, что $1 — администратор.";
|
||||||
|
|
||||||
|
"note_is_deleted" = "Заметка удалена";
|
||||||
|
"note_x_is_now_deleted" = "Заметка \"$1\" была успешно удалена.";
|
||||||
|
"new_data_accepted" = "Новые данные приняты.";
|
||||||
|
|
||||||
|
"album_is_deleted" = "Альбом удалён";
|
||||||
|
"album_x_is_deleted" = "Альбом $1 был успешно удалён.";
|
||||||
|
|
||||||
|
"error_adding_to_deleted" = "Не удалось сохранить фотографию в <b>DELETED</b>.";
|
||||||
|
"error_adding_to_x" = "Не удалось сохранить фотографию в <b>$1</b>.";
|
||||||
|
"no_photo" = "Нету фотографии";
|
||||||
|
|
||||||
|
"select_file" = "Выберите файл";
|
||||||
|
"new_description_will_appear" = "Обновлённое описание появится на странице с фоткой.";
|
||||||
|
"photo_is_deleted" = "Фотография удалена";
|
||||||
|
"photo_is_deleted_desc" = "Эта фотография была успешно удалена.";
|
||||||
|
|
||||||
|
"no_video" = "Нет видеозаписи";
|
||||||
|
"no_video_desc" = "Выберите файл или укажите ссылку.";
|
||||||
|
"error_occured" = "Произошла ошибка";
|
||||||
|
"error_video_damaged_file" = "Файл повреждён или не содержит видео.";
|
||||||
|
"error_video_incorrect_link" = "Возможно, ссылка некорректна.";
|
||||||
|
"error_video_no_title" = "Видео не может быть опубликовано без названия.";
|
||||||
|
|
||||||
|
"new_data_video" = "Обновлённое описание появится на странице с видео.";
|
||||||
|
"error_deleting_video" = "Не удалось удалить видео";
|
||||||
|
"login_please" = "Вы не вошли в аккаунт.";
|
||||||
|
"invalid_code" = "Не удалось подтвердить номер телефона: неверный код.";
|
||||||
|
|
||||||
|
"error_max_pinned_clubs" = "Находится в левом меню могут максимум 10 групп";
|
||||||
|
"error_viewing_subs" = "Вы не можете просматривать полный список подписок $1.";
|
||||||
|
"error_status_too_long" = "Статус слишком длинный ($1 символов вместо 255 символов)";
|
||||||
|
"death" = "Смэрть...";
|
||||||
|
"nehay" = "Нехай живе!";
|
||||||
|
"user_successfully_banned" = "Пользователь успешно забанен.";
|
||||||
|
|
||||||
|
"content_is_deleted" = "Контент удалён, а пользователю прилетело предупреждение.";
|
||||||
|
"report_is_ignored" = "Жалоба проигнорирована.";
|
||||||
|
"group_owner_is_banned" = "Создатель сообщества успешно забанен.";
|
||||||
|
"group_is_banned" = "Сообщество успешно забанено";
|
||||||
|
"description_too_long" = "Описание слишком длинное.";
|
||||||
|
|
||||||
/* Admin actions */
|
/* Admin actions */
|
||||||
|
|
||||||
|
@ -1031,14 +1172,18 @@
|
||||||
"manage_user_action" = "Управление пользователем";
|
"manage_user_action" = "Управление пользователем";
|
||||||
"manage_group_action" = "Управление группой";
|
"manage_group_action" = "Управление группой";
|
||||||
"ban_user_action" = "Заблокировать пользователя";
|
"ban_user_action" = "Заблокировать пользователя";
|
||||||
|
"blocks" = "Блокировки";
|
||||||
|
"last_actions" = "Последние действия";
|
||||||
"unban_user_action" = "Разблокировать пользователя";
|
"unban_user_action" = "Разблокировать пользователя";
|
||||||
"warn_user_action" = "Предупредить пользователя";
|
"warn_user_action" = "Предупредить пользователя";
|
||||||
"ban_in_support_user_action" = "Заблокировать в поддержке";
|
"ban_in_support_user_action" = "Заблокировать в поддержке";
|
||||||
"unban_in_support_user_action" = "Разблокировать в поддержке";
|
"unban_in_support_user_action" = "Разблокировать в поддержке";
|
||||||
|
"changes_history" = "История редактирования";
|
||||||
|
|
||||||
/* Admin panel */
|
/* Admin panel */
|
||||||
|
|
||||||
"admin" = "Админ-панель";
|
"admin" = "Админ-панель";
|
||||||
|
"sandbox_for_developers" = "Sandbox для разработчиков";
|
||||||
"admin_ownerid" = "ID владельца";
|
"admin_ownerid" = "ID владельца";
|
||||||
"admin_author" = "Автор";
|
"admin_author" = "Автор";
|
||||||
"admin_name" = "Имя";
|
"admin_name" = "Имя";
|
||||||
|
@ -1113,6 +1258,12 @@
|
||||||
"admin_banned_link_initiator" = "Инициатор";
|
"admin_banned_link_initiator" = "Инициатор";
|
||||||
"admin_banned_link_not_specified" = "Ссылка не указана";
|
"admin_banned_link_not_specified" = "Ссылка не указана";
|
||||||
"admin_banned_link_not_found" = "Ссылка не найдена";
|
"admin_banned_link_not_found" = "Ссылка не найдена";
|
||||||
|
|
||||||
|
"admin_gift_moved_successfully" = "Подарок успешно перемещён";
|
||||||
|
"admin_gift_moved_to_recycle" = "Теперь подарок находится в <b>корзине</b>.";
|
||||||
|
|
||||||
|
"logs" = "Логи";
|
||||||
|
"logs_anything" = "Любое";
|
||||||
"logs_adding" = "Создание";
|
"logs_adding" = "Создание";
|
||||||
"logs_editing" = "Редактирование";
|
"logs_editing" = "Редактирование";
|
||||||
"logs_removing" = "Удаление";
|
"logs_removing" = "Удаление";
|
||||||
|
@ -1121,6 +1272,28 @@
|
||||||
"logs_edited" = "отредактировал";
|
"logs_edited" = "отредактировал";
|
||||||
"logs_removed" = "удалил";
|
"logs_removed" = "удалил";
|
||||||
"logs_restored" = "восстановил";
|
"logs_restored" = "восстановил";
|
||||||
|
"logs_id_post" = "ID записи";
|
||||||
|
"logs_id_object" = "ID объекта";
|
||||||
|
"logs_uuid_user" = "UUID пользователя";
|
||||||
|
"logs_change_type" = "Тип изменения";
|
||||||
|
"logs_change_object" = "Тип объекта";
|
||||||
|
|
||||||
|
"logs_user" = "Пользователь";
|
||||||
|
"logs_object" = "Объект";
|
||||||
|
"logs_type" = "Тип";
|
||||||
|
"logs_changes" = "Изменения";
|
||||||
|
"logs_time" = "Время";
|
||||||
|
|
||||||
|
"bans_history" = "История блокировок";
|
||||||
|
"bans_history_blocked" = "Забаненный";
|
||||||
|
"bans_history_initiator" = "Инициатор";
|
||||||
|
"bans_history_start" = "Начало";
|
||||||
|
"bans_history_end" = "Конец";
|
||||||
|
"bans_history_time" = "Время";
|
||||||
|
"bans_history_reason" = "Причина";
|
||||||
|
"bans_history_start" = "Начало";
|
||||||
|
"bans_history_removed" = "Снята";
|
||||||
|
"bans_history_active" = "Активная блокировка";
|
||||||
|
|
||||||
/* Paginator (deprecated) */
|
/* Paginator (deprecated) */
|
||||||
|
|
||||||
|
@ -1170,6 +1343,8 @@
|
||||||
"close" = "Закрыть";
|
"close" = "Закрыть";
|
||||||
"warning" = "Внимание";
|
"warning" = "Внимание";
|
||||||
"question_confirm" = "Это действие нельзя отменить. Вы действительно уверены в том что хотите сделать?";
|
"question_confirm" = "Это действие нельзя отменить. Вы действительно уверены в том что хотите сделать?";
|
||||||
|
"confirm_m" = "Подтвердить";
|
||||||
|
"action_successfully" = "Операция успешна";
|
||||||
|
|
||||||
/* User alerts */
|
/* User alerts */
|
||||||
|
|
||||||
|
@ -1183,6 +1358,8 @@
|
||||||
|
|
||||||
/* Away */
|
/* Away */
|
||||||
|
|
||||||
|
"transition_is_blocked" = "Переход по ссылке заблокирован";
|
||||||
|
"caution" = "Предупреждение";
|
||||||
"url_is_banned" = "Переход невозможен";
|
"url_is_banned" = "Переход невозможен";
|
||||||
"url_is_banned_comment" = "Администрация <b>$1</b> не рекомендует переходить по этой ссылке.";
|
"url_is_banned_comment" = "Администрация <b>$1</b> не рекомендует переходить по этой ссылке.";
|
||||||
"url_is_banned_comment_r" = "Администрация <b>$1</b> не рекомендует переходить по этой ссылке.<br><br>Причина: <b>$2</b>";
|
"url_is_banned_comment_r" = "Администрация <b>$1</b> не рекомендует переходить по этой ссылке.<br><br>Причина: <b>$2</b>";
|
||||||
|
@ -1449,6 +1626,41 @@
|
||||||
|
|
||||||
"no_results" = "Результатов нет";
|
"no_results" = "Результатов нет";
|
||||||
|
|
||||||
|
/* BadBrowser */
|
||||||
|
|
||||||
|
"deprecated_browser" = "Устаревший браузер";
|
||||||
|
"deprecated_browser_description" = "Для просмотра этого контента вам понадобится Firefox ESR 52+ или эквивалентный по функционалу навигатор по всемирной сети интернет. Сожалеем об этом.";
|
||||||
|
|
||||||
|
/* Statistics */
|
||||||
|
|
||||||
|
"coverage" = "Охват";
|
||||||
|
"coverage_this_week" = "Этот график отображает охват за последние 7 дней.";
|
||||||
|
"views" = "Просмотры";
|
||||||
|
"views_this_week" = "Этот график отображает просмотры постов сообщества за последние 7 дней.";
|
||||||
|
|
||||||
|
"full_coverage" = "Полный охват";
|
||||||
|
"all_views" = "Все просмотры";
|
||||||
|
|
||||||
|
"subs_coverage" = "Охват подписчиков";
|
||||||
|
"subs_views" = "Просмотры подписчиков";
|
||||||
|
|
||||||
|
"viral_coverage" = "Виральный охват";
|
||||||
|
"viral_views" = "Виральные просмотры";
|
||||||
|
|
||||||
|
/* Sudo */
|
||||||
|
|
||||||
|
"you_entered_as" = "Вы вошли как";
|
||||||
|
"please_rights" = "пожалуйста, уважайте право на тайну переписки других людей и не злоупотребляйте подменой пользователя.";
|
||||||
|
"click_on" = "Нажмите";
|
||||||
|
"there" = "здесь";
|
||||||
|
"to_leave" = "чтобы выйти";
|
||||||
|
|
||||||
|
/* Phone number */
|
||||||
|
|
||||||
|
"verify_phone_number" = "Подтвердить номер телефона";
|
||||||
|
"we_sended_first" = "Мы отправили SMS с кодом на номер";
|
||||||
|
"we_sended_end" = "введите его сюда";
|
||||||
|
|
||||||
/* Mobile */
|
/* Mobile */
|
||||||
"mobile_friends" = "Друзья";
|
"mobile_friends" = "Друзья";
|
||||||
"mobile_photos" = "Фотографии";
|
"mobile_photos" = "Фотографии";
|
||||||
|
@ -1464,3 +1676,40 @@
|
||||||
"mobile_like" = "Нравится";
|
"mobile_like" = "Нравится";
|
||||||
"mobile_user_info_hide" = "Скрыть";
|
"mobile_user_info_hide" = "Скрыть";
|
||||||
"mobile_user_info_show_details" = "Показать подробнее";
|
"mobile_user_info_show_details" = "Показать подробнее";
|
||||||
|
|
||||||
|
/* Moderation */
|
||||||
|
|
||||||
|
"section" = "Раздел";
|
||||||
|
"template_ban" = "Бан по шаблону";
|
||||||
|
"active_templates" = "Действующие шаблоны";
|
||||||
|
"users_reports" = "Жалобы пользователей";
|
||||||
|
"substring" = "Подстрока";
|
||||||
|
"n_user" = "Пользователь";
|
||||||
|
"time_before" = "Время раньше, чем";
|
||||||
|
"time_after" = "Время позже, чем";
|
||||||
|
"where_for_search" = "WHERE для поиска по разделу";
|
||||||
|
"block_params" = "Параметры блокировки";
|
||||||
|
"only_rollback" = "Только откат";
|
||||||
|
"only_block" = "Только блокировка";
|
||||||
|
"rollback_and_block" = "Откат и блокировка";
|
||||||
|
"subm" = "Применить";
|
||||||
|
|
||||||
|
"select_section_for_start" = "Выберите раздел для начала работы";
|
||||||
|
"results_will_be_there" = "Здесь будут отображаться результаты поиска";
|
||||||
|
"search_results" = "Результаты поиска";
|
||||||
|
"cnt" = "шт";
|
||||||
|
|
||||||
|
"link_to_page" = "Ссылка на страницу";
|
||||||
|
"or_subnet" = "или подсеть";
|
||||||
|
"error_when_searching" = "Ошибка при выполнении запроса";
|
||||||
|
"no_found" = "Ничего не найдено";
|
||||||
|
"operation_successfully" = "Операция завершена успешно";
|
||||||
|
|
||||||
|
"unknown_error" = "Неизвестная ошибка";
|
||||||
|
"templates" = "Шаблоны";
|
||||||
|
"type" = "Тип";
|
||||||
|
"count" = "Количество";
|
||||||
|
"time" = "Время";
|
||||||
|
|
||||||
|
"roll_back" = "откатить";
|
||||||
|
"roll_backed" = "откачено";
|
||||||
|
|
Loading…
Reference in a new issue