mirror of
https://github.com/openvk/openvk
synced 2025-07-07 16:29:50 +03:00
Merge branch 'master' into coolSearchNoGovnocode
This commit is contained in:
commit
45d0105b8d
27 changed files with 185 additions and 51 deletions
|
@ -66,6 +66,8 @@ final class Account extends VKAPIRequestHandler
|
||||||
|
|
||||||
function getCounters(string $filter = ""): object
|
function getCounters(string $filter = ""): object
|
||||||
{
|
{
|
||||||
|
$this->requireUser();
|
||||||
|
|
||||||
return (object) [
|
return (object) [
|
||||||
"friends" => $this->getUser()->getFollowersCount(),
|
"friends" => $this->getUser()->getFollowersCount(),
|
||||||
"notifications" => $this->getUser()->getNotificationsCount(),
|
"notifications" => $this->getUser()->getNotificationsCount(),
|
||||||
|
|
|
@ -54,11 +54,7 @@ final class Likes extends VKAPIRequestHandler
|
||||||
case "post":
|
case "post":
|
||||||
$user = (new UsersRepo)->get($user_id);
|
$user = (new UsersRepo)->get($user_id);
|
||||||
if (is_null($user))
|
if (is_null($user))
|
||||||
return (object) [
|
$this->fail(100, "One of the parameters specified was missing or invalid: user not found");
|
||||||
"liked" => 0,
|
|
||||||
"copied" => 0,
|
|
||||||
"sex" => 0
|
|
||||||
];
|
|
||||||
|
|
||||||
$post = (new PostsRepo)->getPostById($owner_id, $item_id);
|
$post = (new PostsRepo)->getPostById($owner_id, $item_id);
|
||||||
if (is_null($post))
|
if (is_null($post))
|
||||||
|
|
|
@ -7,7 +7,7 @@ use openvk\VKAPI\Handlers\Wall;
|
||||||
|
|
||||||
final class Newsfeed extends VKAPIRequestHandler
|
final class Newsfeed extends VKAPIRequestHandler
|
||||||
{
|
{
|
||||||
function get(string $fields = "", int $start_from = 0, int $offset = 0, int $count = 30, int $extended = 0, int $forGodSakePleaseDoNotReportAboutMyOnlineActivity = 0)
|
function get(string $fields = "", int $start_from = 0, int $start_time = 0, int $end_time = 0, int $offset = 0, int $count = 30, int $extended = 0, int $forGodSakePleaseDoNotReportAboutMyOnlineActivity = 0)
|
||||||
{
|
{
|
||||||
$this->requireUser();
|
$this->requireUser();
|
||||||
|
|
||||||
|
@ -33,6 +33,8 @@ final class Newsfeed extends VKAPIRequestHandler
|
||||||
->where("wall IN (?)", $ids)
|
->where("wall IN (?)", $ids)
|
||||||
->where("deleted", 0)
|
->where("deleted", 0)
|
||||||
->where("id < (?)", empty($start_from) ? PHP_INT_MAX : $start_from)
|
->where("id < (?)", empty($start_from) ? PHP_INT_MAX : $start_from)
|
||||||
|
->where("? <= created", empty($start_time) ? 0 : $start_time)
|
||||||
|
->where("? >= created", empty($end_time) ? PHP_INT_MAX : $end_time)
|
||||||
->order("created DESC");
|
->order("created DESC");
|
||||||
|
|
||||||
$rposts = [];
|
$rposts = [];
|
||||||
|
@ -45,7 +47,7 @@ final class Newsfeed extends VKAPIRequestHandler
|
||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getGlobal(string $fields = "", int $start_from = 0, int $offset = 0, int $count = 30, int $extended = 0)
|
function getGlobal(string $fields = "", int $start_from = 0, int $start_time = 0, int $end_time = 0, int $offset = 0, int $count = 30, int $extended = 0)
|
||||||
{
|
{
|
||||||
$this->requireUser();
|
$this->requireUser();
|
||||||
|
|
||||||
|
@ -55,7 +57,9 @@ final class Newsfeed extends VKAPIRequestHandler
|
||||||
$queryBase .= " AND `nsfw` = 0";
|
$queryBase .= " AND `nsfw` = 0";
|
||||||
|
|
||||||
$start_from = empty($start_from) ? PHP_INT_MAX : $start_from;
|
$start_from = empty($start_from) ? PHP_INT_MAX : $start_from;
|
||||||
$posts = DatabaseConnection::i()->getConnection()->query("SELECT `posts`.`id` " . $queryBase . " AND `posts`.`id` < " . $start_from . " ORDER BY `created` DESC LIMIT " . $count . " OFFSET " . $offset);
|
$start_time = empty($start_time) ? 0 : $start_time;
|
||||||
|
$end_time = empty($end_time) ? PHP_INT_MAX : $end_time;
|
||||||
|
$posts = DatabaseConnection::i()->getConnection()->query("SELECT `posts`.`id` " . $queryBase . " AND `posts`.`id` <= " . $start_from . " AND " . $start_time . " <= `posts`.`created` AND `posts`.`created` <= " . $end_time . " ORDER BY `created` DESC LIMIT " . $count . " OFFSET " . $offset);
|
||||||
|
|
||||||
$rposts = [];
|
$rposts = [];
|
||||||
$ids = [];
|
$ids = [];
|
||||||
|
|
|
@ -75,7 +75,7 @@ final class Polls extends VKAPIRequestHandler
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$poll->vote($this->getUser(), explode(",", $answers_ids));
|
$poll->vote($this->getUser(), explode(",", $answers_ids));
|
||||||
return 0;
|
return 1;
|
||||||
} catch(AlreadyVotedException $ex) {
|
} catch(AlreadyVotedException $ex) {
|
||||||
return 0;
|
return 0;
|
||||||
} catch(PollLockedException $ex) {
|
} catch(PollLockedException $ex) {
|
||||||
|
@ -97,7 +97,7 @@ final class Polls extends VKAPIRequestHandler
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$poll->revokeVote($this->getUser());
|
$poll->revokeVote($this->getUser());
|
||||||
return 0;
|
return 1;
|
||||||
} catch(PollLockedException $ex) {
|
} catch(PollLockedException $ex) {
|
||||||
$this->fail(15, "Access denied: Poll is locked or isn't revotable");
|
$this->fail(15, "Access denied: Poll is locked or isn't revotable");
|
||||||
} catch(InvalidOptionException $ex) {
|
} catch(InvalidOptionException $ex) {
|
||||||
|
|
|
@ -197,6 +197,9 @@ class Video extends Media
|
||||||
|
|
||||||
static function fastMake(int $owner, string $name = "Unnamed Video.ogv", string $description = "", array $file, bool $unlisted = true, bool $anon = false): Video
|
static function fastMake(int $owner, string $name = "Unnamed Video.ogv", string $description = "", array $file, bool $unlisted = true, bool $anon = false): Video
|
||||||
{
|
{
|
||||||
|
if(OPENVK_ROOT_CONF['openvk']['preferences']['videos']['disableUploading'])
|
||||||
|
exit(VIDEOS_FRIENDLY_ERROR);
|
||||||
|
|
||||||
$video = new Video;
|
$video = new Video;
|
||||||
$video->setOwner($owner);
|
$video->setOwner($owner);
|
||||||
$video->setName(ovk_proc_strtr($name, 61));
|
$video->setName(ovk_proc_strtr($name, 61));
|
||||||
|
|
|
@ -207,6 +207,9 @@ final class AuthPresenter extends OpenVKPresenter
|
||||||
|
|
||||||
function renderFinishRestoringPassword(): void
|
function renderFinishRestoringPassword(): void
|
||||||
{
|
{
|
||||||
|
if(OPENVK_ROOT_CONF['openvk']['preferences']['security']['disablePasswordRestoring'])
|
||||||
|
$this->notFound();
|
||||||
|
|
||||||
$request = $this->restores->getByToken(str_replace(" ", "+", $this->queryParam("key")));
|
$request = $this->restores->getByToken(str_replace(" ", "+", $this->queryParam("key")));
|
||||||
if(!$request || !$request->isStillValid()) {
|
if(!$request || !$request->isStillValid()) {
|
||||||
$this->flash("err", tr("token_manipulation_error"), tr("token_manipulation_error_comment"));
|
$this->flash("err", tr("token_manipulation_error"), tr("token_manipulation_error_comment"));
|
||||||
|
@ -241,6 +244,9 @@ final class AuthPresenter extends OpenVKPresenter
|
||||||
|
|
||||||
function renderRestore(): void
|
function renderRestore(): void
|
||||||
{
|
{
|
||||||
|
if(OPENVK_ROOT_CONF['openvk']['preferences']['security']['disablePasswordRestoring'])
|
||||||
|
$this->notFound();
|
||||||
|
|
||||||
if(!is_null($this->user))
|
if(!is_null($this->user))
|
||||||
$this->redirect($this->user->identity->getURL());
|
$this->redirect($this->user->identity->getURL());
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,9 @@ final class CommentPresenter extends OpenVKPresenter
|
||||||
else if($entity instanceof Topic)
|
else if($entity instanceof Topic)
|
||||||
$club = $entity->getClub();
|
$club = $entity->getClub();
|
||||||
|
|
||||||
|
if($_FILES["_vid_attachment"] && OPENVK_ROOT_CONF['openvk']['preferences']['videos']['disableUploading'])
|
||||||
|
$this->flashFail("err", tr("error"), "Video uploads are disabled by the system administrator.");
|
||||||
|
|
||||||
$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))
|
||||||
$flags |= 0b10000000;
|
$flags |= 0b10000000;
|
||||||
|
|
|
@ -84,6 +84,9 @@ final class TopicsPresenter extends OpenVKPresenter
|
||||||
if($this->postParam("as_group") === "on" && $club->canBeModifiedBy($this->user->identity))
|
if($this->postParam("as_group") === "on" && $club->canBeModifiedBy($this->user->identity))
|
||||||
$flags |= 0b10000000;
|
$flags |= 0b10000000;
|
||||||
|
|
||||||
|
if($_FILES["_vid_attachment"] && OPENVK_ROOT_CONF['openvk']['preferences']['videos']['disableUploading'])
|
||||||
|
$this->flashFail("err", tr("error"), "Video uploads are disabled by the system administrator.");
|
||||||
|
|
||||||
$topic = new Topic;
|
$topic = new Topic;
|
||||||
$topic->setGroup($club->getId());
|
$topic->setGroup($club->getId());
|
||||||
$topic->setOwner($this->user->id);
|
$topic->setOwner($this->user->id);
|
||||||
|
|
|
@ -57,6 +57,9 @@ final class VideosPresenter extends OpenVKPresenter
|
||||||
$this->assertUserLoggedIn();
|
$this->assertUserLoggedIn();
|
||||||
$this->willExecuteWriteAction();
|
$this->willExecuteWriteAction();
|
||||||
|
|
||||||
|
if(OPENVK_ROOT_CONF['openvk']['preferences']['videos']['disableUploading'])
|
||||||
|
$this->flashFail("err", tr("error"), "Video uploads are disabled by the system administrator.");
|
||||||
|
|
||||||
if($_SERVER["REQUEST_METHOD"] === "POST") {
|
if($_SERVER["REQUEST_METHOD"] === "POST") {
|
||||||
if(!empty($this->postParam("name"))) {
|
if(!empty($this->postParam("name"))) {
|
||||||
$video = new Video;
|
$video = new Video;
|
||||||
|
|
|
@ -229,6 +229,9 @@ final class WallPresenter extends OpenVKPresenter
|
||||||
if(!$canPost)
|
if(!$canPost)
|
||||||
$this->flashFail("err", tr("not_enough_permissions"), tr("not_enough_permissions_comment"));
|
$this->flashFail("err", tr("not_enough_permissions"), tr("not_enough_permissions_comment"));
|
||||||
|
|
||||||
|
if($_FILES["_vid_attachment"] && OPENVK_ROOT_CONF['openvk']['preferences']['videos']['disableUploading'])
|
||||||
|
$this->flashFail("err", tr("error"), "Video uploads are disabled by the system administrator.");
|
||||||
|
|
||||||
$anon = OPENVK_ROOT_CONF["openvk"]["preferences"]["wall"]["anonymousPosting"]["enable"];
|
$anon = OPENVK_ROOT_CONF["openvk"]["preferences"]["wall"]["anonymousPosting"]["enable"];
|
||||||
if($wallOwner instanceof Club && $this->postParam("as_group") === "on" && $this->postParam("force_sign") !== "on" && $anon) {
|
if($wallOwner instanceof Club && $this->postParam("as_group") === "on" && $this->postParam("force_sign") !== "on" && $anon) {
|
||||||
$manager = $wallOwner->getManager($this->user->identity);
|
$manager = $wallOwner->getManager($this->user->identity);
|
||||||
|
|
|
@ -252,7 +252,7 @@
|
||||||
<input type="hidden" name="hash" value="{$csrfToken}" />
|
<input type="hidden" name="hash" value="{$csrfToken}" />
|
||||||
<input type="submit" value="{_log_in}" class="button" style="display: inline-block; font-family: Tahoma" />
|
<input type="submit" value="{_log_in}" class="button" style="display: inline-block; font-family: Tahoma" />
|
||||||
<a href="/reg"><input type="button" value="{_registration}" class="button" style="font-family: Tahoma" /></a><br><br>
|
<a href="/reg"><input type="button" value="{_registration}" class="button" style="font-family: Tahoma" /></a><br><br>
|
||||||
<a href="/restore">{_forgot_password}</a>
|
{if !OPENVK_ROOT_CONF['openvk']['preferences']['security']['disablePasswordRestoring']}<a href="/restore">{_forgot_password}</a>{/if}
|
||||||
</form>
|
</form>
|
||||||
{/ifset}
|
{/ifset}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
{_two_factor_authentication_login}
|
{_two_factor_authentication_login}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
<span class="nobold">{_code}: </span>
|
<span class="nobold">{_code}: </span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="code" autocomplete="off" required />
|
<input type="text" name="code" autocomplete="off" required autofocus />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -101,14 +101,16 @@
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
{if !(strpos(captcha_template(), 'verified'))}
|
||||||
<td class="regform-left">
|
<tr>
|
||||||
<span class="nobold">CAPTCHA: </span>
|
<td class="regform-left">
|
||||||
</td>
|
<span class="nobold">CAPTCHA: </span>
|
||||||
<td class="regform-right">
|
</td>
|
||||||
{captcha_template()|noescape}
|
<td class="regform-right">
|
||||||
</td>
|
{captcha_template()|noescape}
|
||||||
</tr>
|
</td>
|
||||||
|
</tr>
|
||||||
|
{/if}
|
||||||
</table>
|
</table>
|
||||||
<div style="margin-left: 100px; margin-right: 100px; text-align: center;">
|
<div style="margin-left: 100px; margin-right: 100px; text-align: center;">
|
||||||
<input type="hidden" name="hash" value="{$csrfToken}" />
|
<input type="hidden" name="hash" value="{$csrfToken}" />
|
||||||
|
@ -120,21 +122,18 @@
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
{else}
|
{else}
|
||||||
<h4>{_registration_closed}</h4>
|
<h4>{_registration_closed}</h4>
|
||||||
<table cellspacing="10" cellpadding="0" border="0" align="center" style="margin: 9px;">
|
<table cellspacing="10" cellpadding="0" border="0" align="center" style="margin: 9px;">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width: 20%;">
|
<td style="width: 20%;">
|
||||||
<img src="/assets/packages/static/openvk/img/oof.apng" alt="{_registration_closed}" style="width: 100%;"/>
|
<img src="/assets/packages/static/openvk/img/oof.apng" alt="{_registration_closed}" style="width: 100%;"/>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{_registration_disabled_info}
|
{_registration_disabled_info}
|
||||||
{if OPENVK_ROOT_CONF['openvk']['preferences']['registration']['disablingReason']}
|
{if OPENVK_ROOT_CONF['openvk']['preferences']['registration']['disablingReason']}
|
||||||
<br/>
|
<br/><br/>{_admin_banned_link_reason}:<br>
|
||||||
<br/>
|
<b>{php echo OPENVK_ROOT_CONF['openvk']['preferences']['registration']['disablingReason']}</b>
|
||||||
{_admin_banned_link_reason}:
|
|
||||||
<br>
|
|
||||||
<b>{php echo OPENVK_ROOT_CONF['openvk']['preferences']['registration']['disablingReason']}</b>
|
|
||||||
{/if}
|
{/if}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -261,3 +261,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
|
{block bodyScripts}
|
||||||
|
{script "js/al_despacito_wall.js"}
|
||||||
|
{/block}
|
|
@ -37,7 +37,7 @@
|
||||||
{_attachment}: <span>(unknown)</span>
|
{_attachment}: <span>(unknown)</span>
|
||||||
</div>
|
</div>
|
||||||
<input type="file" class="postFileSel" id="postFilePic" name="_pic_attachment" accept="image/*" style="display: none;" />
|
<input type="file" class="postFileSel" id="postFilePic" name="_pic_attachment" accept="image/*" style="display: none;" />
|
||||||
<input type="file" class="postFileSel" id="postFileVid" name="_vid_attachment" accept="video/*" style="display: none;" />
|
<input n:if="!OPENVK_ROOT_CONF['openvk']['preferences']['videos']['disableUploading']" type="file" class="postFileSel" id="postFileVid" name="_vid_attachment" accept="video/*" style="display: none;" />
|
||||||
<br/>
|
<br/>
|
||||||
<div style="float: right; display: flex; flex-direction: column;">
|
<div style="float: right; display: flex; flex-direction: column;">
|
||||||
<a href="javascript:void(u('#post-buttons1 #wallAttachmentMenu').toggleClass('hidden'));">
|
<a href="javascript:void(u('#post-buttons1 #wallAttachmentMenu').toggleClass('hidden'));">
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
<img src="/assets/packages/static/openvk/img/oxygen-icons/16x16/mimetypes/application-x-egon.png" />
|
<img src="/assets/packages/static/openvk/img/oxygen-icons/16x16/mimetypes/application-x-egon.png" />
|
||||||
{_attach_photo}
|
{_attach_photo}
|
||||||
</a>
|
</a>
|
||||||
<a href="javascript:void(document.querySelector('#post-buttons1 input[name=_vid_attachment]').click());">
|
<a n:if="!OPENVK_ROOT_CONF['openvk']['preferences']['videos']['disableUploading']" href="javascript:void(document.querySelector('#post-buttons1 input[name=_vid_attachment]').click());">
|
||||||
<img src="/assets/packages/static/openvk/img/oxygen-icons/16x16/mimetypes/application-vnd.rn-realmedia.png" />
|
<img src="/assets/packages/static/openvk/img/oxygen-icons/16x16/mimetypes/application-vnd.rn-realmedia.png" />
|
||||||
{_attach_video}
|
{_attach_video}
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -732,4 +732,9 @@
|
||||||
{else} {* isBanned() *}
|
{else} {* isBanned() *}
|
||||||
{include "banned.xml"}
|
{include "banned.xml"}
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
{/block}
|
||||||
|
|
||||||
|
{block bodyScripts}
|
||||||
|
{script "js/al_despacito_wall.js"}
|
||||||
{/block}
|
{/block}
|
|
@ -14,7 +14,7 @@
|
||||||
<div style="padding-bottom: 0px; padding-top: 0;" class="summaryBar">
|
<div style="padding-bottom: 0px; padding-top: 0;" class="summaryBar">
|
||||||
<div class="summary">
|
<div class="summary">
|
||||||
{tr("videos", $count)}
|
{tr("videos", $count)}
|
||||||
<span n:if="isset($thisUser) && $thisUser->getId() == $user->getId()">
|
<span n:if="isset($thisUser) && $thisUser->getId() == $user->getId() && !OPENVK_ROOT_CONF['openvk']['preferences']['videos']['disableUploading']">
|
||||||
|
|
|
|
||||||
<a href="/videos/upload">{_upload_video}</a>
|
<a href="/videos/upload">{_upload_video}</a>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<h4 n:if="$showTitle ?? true">{_comments} ({$count})</h4>
|
<h4 n:if="$showTitle ?? true">{_comments} ({$count})</h4>
|
||||||
|
|
||||||
<div n:ifset="$thisUser">
|
<div n:ifset="$thisUser" id="standaloneCommentBox">
|
||||||
{var $commentsURL = "/al_comments/create/$model/" . $parent->getId()}
|
{var $commentsURL = "/al_comments/create/$model/" . $parent->getId()}
|
||||||
{var $club = $parent instanceof \openvk\Web\Models\Entities\Post && $parent->getTargetWall() < 0 ? (new openvk\Web\Models\Repositories\Clubs)->get(abs($parent->getTargetWall())) : $club}
|
{var $club = $parent instanceof \openvk\Web\Models\Entities\Post && $parent->getTargetWall() < 0 ? (new openvk\Web\Models\Repositories\Clubs)->get(abs($parent->getTargetWall())) : $club}
|
||||||
{if !$readOnly}
|
{if !$readOnly}
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<input type="file" class="postFileSel" id="postFilePic" name="_pic_attachment" accept="image/*" style="display:none;" />
|
<input type="file" class="postFileSel" id="postFilePic" name="_pic_attachment" accept="image/*" style="display:none;" />
|
||||||
<input type="file" class="postFileSel" id="postFileVid" name="_vid_attachment" accept="video/*" style="display:none;" />
|
<input n:if="!OPENVK_ROOT_CONF['openvk']['preferences']['videos']['disableUploading']" type="file" class="postFileSel" id="postFileVid" name="_vid_attachment" accept="video/*" style="display:none;" />
|
||||||
<input type="hidden" name="poll" value="none" />
|
<input type="hidden" name="poll" value="none" />
|
||||||
<input type="hidden" name="type" value="1" />
|
<input type="hidden" name="type" value="1" />
|
||||||
<input type="hidden" name="hash" value="{$csrfToken}" />
|
<input type="hidden" name="hash" value="{$csrfToken}" />
|
||||||
|
@ -71,7 +71,7 @@
|
||||||
<img src="/assets/packages/static/openvk/img/oxygen-icons/16x16/mimetypes/application-x-egon.png" />
|
<img src="/assets/packages/static/openvk/img/oxygen-icons/16x16/mimetypes/application-x-egon.png" />
|
||||||
{_photo}
|
{_photo}
|
||||||
</a>
|
</a>
|
||||||
<a href="javascript:void(document.querySelector('#post-buttons{$textAreaId} input[name=_vid_attachment]').click());">
|
<a n:if="!OPENVK_ROOT_CONF['openvk']['preferences']['videos']['disableUploading']" href="javascript:void(document.querySelector('#post-buttons{$textAreaId} input[name=_vid_attachment]').click());">
|
||||||
<img src="/assets/packages/static/openvk/img/oxygen-icons/16x16/mimetypes/application-vnd.rn-realmedia.png" />
|
<img src="/assets/packages/static/openvk/img/oxygen-icons/16x16/mimetypes/application-vnd.rn-realmedia.png" />
|
||||||
{_video}
|
{_video}
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -2463,3 +2463,20 @@ a.poll-retract-vote {
|
||||||
{
|
{
|
||||||
border-top:1px solid #E5E7E6;
|
border-top:1px solid #E5E7E6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#standaloneCommentBox {
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
background-color: #fff;
|
||||||
|
border-bottom: 1px dotted #8b8b8b;
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page_content.overscrolled div[class$="_small_block"] {
|
||||||
|
position: absolute;
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page_content.overscrolled div[class$="_big_block"] {
|
||||||
|
width: unset;
|
||||||
|
}
|
27
Web/static/js/al_despacito_wall.js
Normal file
27
Web/static/js/al_despacito_wall.js
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
const contentPage = document.querySelector(".page_content");
|
||||||
|
const rootElement = document.documentElement;
|
||||||
|
|
||||||
|
let smallBlockObserver = new IntersectionObserver(entries => {
|
||||||
|
entries.forEach(x => {
|
||||||
|
window.requestAnimationFrame(() => {
|
||||||
|
let pastHeight = contentPage.getBoundingClientRect().height;
|
||||||
|
if(x.isIntersecting)
|
||||||
|
contentPage.classList.remove("overscrolled");
|
||||||
|
else
|
||||||
|
contentPage.classList.add("overscrolled");
|
||||||
|
|
||||||
|
let currentHeight = contentPage.getBoundingClientRect().height;
|
||||||
|
let ratio = currentHeight / pastHeight;
|
||||||
|
|
||||||
|
rootElement.scrollTop *= ratio;
|
||||||
|
}, contentPage);
|
||||||
|
});
|
||||||
|
}, {
|
||||||
|
root: null, // screen
|
||||||
|
rootMargin: "0px",
|
||||||
|
threshold: 0
|
||||||
|
});
|
||||||
|
|
||||||
|
let smol = document.querySelector('div[class$="_small_block"]');
|
||||||
|
if(smol != null)
|
||||||
|
smallBlockObserver.observe(smol);
|
|
@ -181,6 +181,28 @@ function _bsdnEventListenerFactory(el, v) {
|
||||||
click: [ () => el.querySelector(".bsdn_contextMenu").style.display = "none" ]
|
click: [ () => el.querySelector(".bsdn_contextMenu").style.display = "none" ]
|
||||||
},
|
},
|
||||||
|
|
||||||
|
".bsdn_copyVideoUrl": {
|
||||||
|
click: [
|
||||||
|
async () => {
|
||||||
|
let videoUrl = el.querySelector(".bsdn_video > video").src;
|
||||||
|
let fallback = () => {
|
||||||
|
prompt("URL:", videoUrl);
|
||||||
|
};
|
||||||
|
|
||||||
|
if(typeof navigator.clipboard == "undefined") {
|
||||||
|
fallback();
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
await navigator.clipboard.writeText(videoUrl);
|
||||||
|
confirm("👍🏼");
|
||||||
|
} catch(e) {
|
||||||
|
fallback();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
".bsdn_video > video": {
|
".bsdn_video > video": {
|
||||||
play: [
|
play: [
|
||||||
() => {
|
() => {
|
||||||
|
|
|
@ -159,6 +159,9 @@
|
||||||
"pinned" = "прикріплено";
|
"pinned" = "прикріплено";
|
||||||
"comments_tip" = "Будьте першим, хто залишить коментар!";
|
"comments_tip" = "Будьте першим, хто залишить коментар!";
|
||||||
"your_comment" = "Ваш коментар";
|
"your_comment" = "Ваш коментар";
|
||||||
|
"auditory" = "Аудиторія";
|
||||||
|
"in_wall" = "на стіну";
|
||||||
|
"in_group" = "у групу";
|
||||||
"shown" = "Показано";
|
"shown" = "Показано";
|
||||||
"x_out_of" = "$1 з";
|
"x_out_of" = "$1 з";
|
||||||
"wall_zero" = "немає записів";
|
"wall_zero" = "немає записів";
|
||||||
|
@ -173,8 +176,8 @@
|
||||||
"all_news" = "Усі новини";
|
"all_news" = "Усі новини";
|
||||||
"posts_per_page" = "Кількість записів на сторінці";
|
"posts_per_page" = "Кількість записів на сторінці";
|
||||||
"attachment" = "Вкладення";
|
"attachment" = "Вкладення";
|
||||||
"post_as_group" = "Від імені суспільства";
|
"post_as_group" = "Від імені спільноти";
|
||||||
"comment_as_group" = "Від імені суспільства";
|
"comment_as_group" = "Від імені спільноти";
|
||||||
"add_signature" = "Підпис автора";
|
"add_signature" = "Підпис автора";
|
||||||
"contains_nsfw" = "Містить NSFW-контент";
|
"contains_nsfw" = "Містить NSFW-контент";
|
||||||
"nsfw_warning" = "Даний запис може містити контент 18+";
|
"nsfw_warning" = "Даний запис може містити контент 18+";
|
||||||
|
@ -338,6 +341,30 @@
|
||||||
"albums_list_many" = "У Вас $1 альбомів";
|
"albums_list_many" = "У Вас $1 альбомів";
|
||||||
"albums_list_other" = "У Вас $1 альбомів";
|
"albums_list_other" = "У Вас $1 альбомів";
|
||||||
|
|
||||||
|
"add_image" = "Встановити зображення";
|
||||||
|
"add_image_group" = "Завантажити фотографію";
|
||||||
|
"upload_new_picture" = "Завантажити нову фотографію";
|
||||||
|
"uploading_new_image" = "Завантаження нової фотографії";
|
||||||
|
"friends_avatar" = "Друзям буде простіше дізнатися Вас, якщо ви завантажите своє справжнє фото.";
|
||||||
|
"groups_avatar" = "Гарне фото зробить Вашу спільноту більш популярним.";
|
||||||
|
"formats_avatar" = "Ви можете завантажити зображення у форматі JPG, GIF або PNG.";
|
||||||
|
"troubles_avatar" = "Якщо виникають проблеми із завантаженням, спробуйте вибрати фотографію меншого розміру.";
|
||||||
|
"webcam_avatar" = "Якщо ваш комп'ютер оснащений веб-камерою, Ви можете <a href='javascript:'>зробити миттєву фотографію»</a>";
|
||||||
|
|
||||||
|
"update_avatar_notification" = "Фотографію профілю оновлено";
|
||||||
|
"update_avatar_description" = "Натисніть, щоб перейти до перегляду";
|
||||||
|
|
||||||
|
"deleting_avatar" = "Видалення фотографії";
|
||||||
|
"deleting_avatar_sure" = "Ви дійсно хочете видалити аватар?";
|
||||||
|
|
||||||
|
"deleted_avatar_notification" = "Фотографію успішно видалено";
|
||||||
|
|
||||||
|
"save_changes" = "Зберегти зміни";
|
||||||
|
|
||||||
|
"upd_m" = "оновив фотографію на своїй сторінці";
|
||||||
|
"upd_f" = "оновила фотографію на своїй сторінці";
|
||||||
|
"upd_g" = "оновило фотографію групи";
|
||||||
|
|
||||||
/* Notes */
|
/* Notes */
|
||||||
|
|
||||||
"notes" = "Нотатки";
|
"notes" = "Нотатки";
|
||||||
|
@ -915,6 +942,7 @@
|
||||||
"error_upload_failed" = "Не вдалося завантажити фотографію";
|
"error_upload_failed" = "Не вдалося завантажити фотографію";
|
||||||
"error_old_password" = "Старий пароль не збігається";
|
"error_old_password" = "Старий пароль не збігається";
|
||||||
"error_new_password" = "Нові паролі не збігаються";
|
"error_new_password" = "Нові паролі не збігаються";
|
||||||
|
"error_weak_password" = "Ненадійний пароль. Пароль має містити принаймні 8 символів: цифри, великі та малі літери";
|
||||||
"error_shorturl_incorrect" = "Коротка адреса має неправильний формат.";
|
"error_shorturl_incorrect" = "Коротка адреса має неправильний формат.";
|
||||||
"error_repost_fail" = "Не вдалося поділитися записом";
|
"error_repost_fail" = "Не вдалося поділитися записом";
|
||||||
"error_data_too_big" = "Атрибут '$1' не може бути довше $2 $3";
|
"error_data_too_big" = "Атрибут '$1' не може бути довше $2 $3";
|
||||||
|
@ -1079,7 +1107,7 @@
|
||||||
"about_wall_posts_few" = "<b>$1</b> записи на стінах";
|
"about_wall_posts_few" = "<b>$1</b> записи на стінах";
|
||||||
"about_wall_posts_many" = "<b>$1</b> записів на стінах";
|
"about_wall_posts_many" = "<b>$1</b> записів на стінах";
|
||||||
"about_wall_posts_other" = "<b>$1</b> записів на стінах";
|
"about_wall_posts_other" = "<b>$1</b> записів на стінах";
|
||||||
"about_watch_rules" = "Дивіться <a href='$1'>тут</a>.";
|
"about_watch_rules" = "Перегляньте <a href='$1'>тут</a>.";
|
||||||
|
|
||||||
/* Dialogs */
|
/* Dialogs */
|
||||||
|
|
||||||
|
@ -1096,6 +1124,7 @@
|
||||||
/* User alerts */
|
/* User alerts */
|
||||||
|
|
||||||
"user_alert_scam" = "На цей акаунт багато скаржилися у зв'язку з шахрайством. Будь ласка, будьте обережні, особливо якщо у вас попросять грошей.";
|
"user_alert_scam" = "На цей акаунт багато скаржилися у зв'язку з шахрайством. Будь ласка, будьте обережні, особливо якщо у вас попросять грошей.";
|
||||||
|
"user_may_not_reply" = "Цей користувач, ймовірно, не зможе відповісти Вам через Ваші налаштування приватності. <a href='/settings?act=privacy'>Відкрити налаштування приватності</a>";
|
||||||
|
|
||||||
/* Cookies pop-up */
|
/* Cookies pop-up */
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,8 @@ openvk:
|
||||||
photos:
|
photos:
|
||||||
upgradeStructure: false
|
upgradeStructure: false
|
||||||
photoSaving: "quick"
|
photoSaving: "quick"
|
||||||
|
videos:
|
||||||
|
disableUploading: false
|
||||||
apps:
|
apps:
|
||||||
withdrawTax: 8
|
withdrawTax: 8
|
||||||
security:
|
security:
|
||||||
|
@ -28,6 +30,7 @@ openvk:
|
||||||
forcePhoneVerification: false
|
forcePhoneVerification: false
|
||||||
forceEmailVerification: false
|
forceEmailVerification: false
|
||||||
forceStrongPassword: false
|
forceStrongPassword: false
|
||||||
|
disablePasswordRestoring: true # turn this off if you have configured e-mail sending correctly
|
||||||
enableSu: true
|
enableSu: true
|
||||||
rateLimits:
|
rateLimits:
|
||||||
actions: 5
|
actions: 5
|
||||||
|
|
BIN
themepacks/midnight/res/backdrop-editor.gif
Normal file
BIN
themepacks/midnight/res/backdrop-editor.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 18 KiB |
|
@ -6,7 +6,7 @@ html {
|
||||||
color-scheme: dark !important;
|
color-scheme: dark !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
body, #backdropDripper {
|
body, #backdropDripper, #standaloneCommentBox {
|
||||||
background-color: #0e0b1a;
|
background-color: #0e0b1a;
|
||||||
color: #c6d2e8;
|
color: #c6d2e8;
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,7 @@ span, .post-author .date, .crp-entry--message---text, .messenger-app--messages--
|
||||||
border-color: #1c202f;
|
border-color: #1c202f;
|
||||||
}
|
}
|
||||||
|
|
||||||
.accountInfo, .left_small_block, #profile_link, .profile_link, .navigation .link, .navigation .link:hover, .navigation_footer .link, .navigation_footer .link:hover, .completeness-gauge, input[type="text"], input[type="password"], input[type~="text"], input[type~="password"], input[type="email"], input[type="phone"], input[type~="email"], input[type~="phone"], input[type="search"], input[type~="search"], input[type~="date"], select, .content_title_expanded, .content_title_unexpanded, .content_subtitle, textarea, .post-content, .post-author, hr, h4, .postFeedWrapper, .tabs, #wallAttachmentMenu, .ovk-diag, .ovk-diag-head, #ovkDraw, #ovkDraw .literally .lc-picker, .literally .lc-options.horz-toolbar, .page_wrap, .container_gray .content, .summaryBar, .groups_options, form[action="/search"] > input, .header_search_input, .header_search_inputbt, .accent-box, .page_status_popup, .messenger-app--input, .messenger-app, .crp-entry:first-of-type, .crp-list, .crp-entry, .note_footer, .page_content > div, #editor, .note_header, center[style="background: white;border: #DEDEDE solid 1px;"], .album-photo img, .mb_tabs, .mb_tab#active div, .navigation-lang .link_new, #faqhead, #faqcontent, .post-divider, .comment, .commentsTextFieldWrap, tr, td, th, #votesBalance, .paginator a.active, .paginator a:hover, .topic-list-item, #userContent blockquote, .tippy-box[data-theme~="vk"], .poll {
|
.accountInfo, .left_small_block, #profile_link, .profile_link, .navigation .link, .navigation .link:hover, .navigation_footer .link, .navigation_footer .link:hover, .completeness-gauge, input[type="text"], input[type="password"], input[type~="text"], input[type~="password"], input[type="email"], input[type="phone"], input[type~="email"], input[type~="phone"], input[type="search"], input[type~="search"], input[type~="date"], select, .content_title_expanded, .content_title_unexpanded, .content_subtitle, textarea, .post-content, .post-author, hr, h4, .postFeedWrapper, .tabs, #wallAttachmentMenu, .ovk-diag, .ovk-diag-head, #ovkDraw, #ovkDraw .literally .lc-picker, .literally .lc-options.horz-toolbar, .page_wrap, .container_gray .content, .summaryBar, .groups_options, form[action="/search"] > input, .header_search_input, .header_search_inputbt, .accent-box, .page_status_popup, .messenger-app--input, .messenger-app, .crp-entry:first-of-type, .crp-list, .crp-entry, .note_footer, .page_content > div, #editor, .note_header, center[style="background: white;border: #DEDEDE solid 1px;"], .album-photo img, .mb_tabs, .mb_tab#active div, .navigation-lang .link_new, #faqhead, #faqcontent, .post-divider, .comment, .commentsTextFieldWrap, tr, td, th, #votesBalance, .paginator a.active, .paginator a:hover, .topic-list-item, #userContent blockquote, .tippy-box[data-theme~="vk"], .poll, #standaloneCommentBox {
|
||||||
border-color: #2c2640 !important;
|
border-color: #2c2640 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -137,11 +137,11 @@ h4, .content_title_expanded, .summaryBar .summary, .content_title_unexpanded {
|
||||||
}
|
}
|
||||||
|
|
||||||
.content_title_expanded {
|
.content_title_expanded {
|
||||||
background-image: url("/themepack/midnight/0.0.2.5/resource/flex_arrow_open.png") !important;
|
background-image: url("/themepack/midnight/0.0.2.7/resource/flex_arrow_open.png") !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content_title_unexpanded {
|
.content_title_unexpanded {
|
||||||
background-image: url("/themepack/midnight/0.0.2.5/resource/flex_arrow_shut.gif") !important;
|
background-image: url("/themepack/midnight/0.0.2.7/resource/flex_arrow_shut.gif") !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ovk-video > .preview, .video-preview {
|
.ovk-video > .preview, .video-preview {
|
||||||
|
@ -163,17 +163,17 @@ h4, .content_title_expanded, .summaryBar .summary, .content_title_unexpanded {
|
||||||
|
|
||||||
.page_yellowheader {
|
.page_yellowheader {
|
||||||
color: #c6d2e8;
|
color: #c6d2e8;
|
||||||
background-image: url("/themepack/midnight/0.0.2.5/resource/header_purple.png") !important;
|
background-image: url("/themepack/midnight/0.0.2.7/resource/header_purple.png") !important;
|
||||||
background-color: #231f34;
|
background-color: #231f34;
|
||||||
border-color: #231f34;
|
border-color: #231f34;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page_header {
|
.page_header {
|
||||||
background-image: url("/themepack/midnight/0.0.2.5/resource/header.png") !important;
|
background-image: url("/themepack/midnight/0.0.2.7/resource/header.png") !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page_custom_header {
|
.page_custom_header {
|
||||||
background-image: url("/themepack/midnight/0.0.2.5/resource/header_custom.png") !important;
|
background-image: url("/themepack/midnight/0.0.2.7/resource/header_custom.png") !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page_yellowheader span, .page_yellowheader a {
|
.page_yellowheader span, .page_yellowheader a {
|
||||||
|
@ -193,11 +193,11 @@ form[action="/search"] > input, .header_search_input, textarea, input[type="text
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type="checkbox"] {
|
input[type="checkbox"] {
|
||||||
background-image: url("/themepack/midnight/0.0.2.5/resource/checkbox.png") !important;
|
background-image: url("/themepack/midnight/0.0.2.7/resource/checkbox.png") !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type="radio"] {
|
input[type="radio"] {
|
||||||
background-image: url("/themepack/midnight/0.0.2.5/resource/radio.png") !important;
|
background-image: url("/themepack/midnight/0.0.2.7/resource/radio.png") !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header_navigation .link {
|
.header_navigation .link {
|
||||||
|
@ -205,19 +205,19 @@ input[type="radio"] {
|
||||||
}
|
}
|
||||||
|
|
||||||
.heart {
|
.heart {
|
||||||
background-image: url("/themepack/midnight/0.0.2.5/resource/like.gif") !important;
|
background-image: url("/themepack/midnight/0.0.2.7/resource/like.gif") !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pinned-mark, .post-author .pin {
|
.pinned-mark, .post-author .pin {
|
||||||
background-image: url("/themepack/midnight/0.0.2.5/resource/pin.png") !important;
|
background-image: url("/themepack/midnight/0.0.2.7/resource/pin.png") !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.repost-icon {
|
.repost-icon {
|
||||||
background-image: url("/themepack/midnight/0.0.2.5/resource/published.gif") !important;
|
background-image: url("/themepack/midnight/0.0.2.7/resource/published.gif") !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-author .delete {
|
.post-author .delete {
|
||||||
background-image: url("/themepack/midnight/0.0.2.5/resource/input_clear.gif") !important;
|
background-image: url("/themepack/midnight/0.0.2.7/resource/input_clear.gif") !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-alert {
|
.user-alert {
|
||||||
|
@ -329,3 +329,8 @@ input[type="radio"] {
|
||||||
{
|
{
|
||||||
border-top:1px solid #2f2f2f;
|
border-top:1px solid #2f2f2f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#backdropEditor {
|
||||||
|
background-image: url("/themepack/midnight/0.0.2.7/resource/backdrop-editor.gif") !important;
|
||||||
|
border-color: #473e66 !important;
|
||||||
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
id: midnight
|
id: midnight
|
||||||
version: "0.0.2.5"
|
version: "0.0.2.7"
|
||||||
openvk_version: 0
|
openvk_version: 0
|
||||||
enabled: 1
|
enabled: 1
|
||||||
metadata:
|
metadata:
|
||||||
|
|
Loading…
Reference in a new issue