diff --git a/.gitignore b/.gitignore
index 78f621844..c3b1f12d4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,9 +10,9 @@ tmp/*
!tmp/themepack_artifacts/.gitkeep
themepacks/*
!themepacks/.gitkeep
-!themepacks/openvk_modern
+!themepacks/modern
!themepacks/midnight
storage/*
!storage/.gitkeep
-.idea
\ No newline at end of file
+.idea
diff --git a/README.md b/README.md
index 152e05bff..c068aad43 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,9 @@
-# OpenVK
+#
Astorium
_[Русский](README_RU.md)_
+_**Astorium** - fork based on [OpenVK OSS project](https://github.com/openvk/openvk) and designed for your needs and requirements._
+
**OpenVK** is an attempt to create a simple CMS that ~~cosplays~~ imitates old VKontakte. Code provided here is not stable yet.
VKontakte belongs to Pavel Durov and VK Group.
@@ -16,19 +18,26 @@ We will release OpenVK as soon as it's ready. As for now, you can:
## Instances
-A list of instances can be found in [our wiki of this repository](https://github.com/openvk/openvk/wiki/Instances).
+* **[openvk.su](https://openvk.su/)**
+ * **[openvk.uk](https://openvk.uk)** ([mirror](https://t.me/openvk/1609))
+ * **[openvk.co](http://openvk.co)** (mirror [without TLS](https://t.me/openvk/1654))
+* [social.fetbuk.ru](http://social.fetbuk.ru/)
+* [vepurovk.xyz](http://vepurovk.xyz/)
+ * [vepurovk.fun](http://vepurovk.fun/) (mirror without TLS)
+* [ovk.tinelix.ru](https://ovk.tinelix.ru)
+ * [mirror without TLS](http://ovk.tinelix.ru)
-## Can I create my own OpenVK instance?
+## Can I create my own Tinelix Astorium / OpenVK instance?
Yes! And you are very welcome to.
-However, OVK makes use of Chandler Application Server. This software requires extensions, that may not be provided by your hosting provider (namely, sodium and yaml. these extensions are available on most of ISPManager hostings).
+However, Astorium (like OpenVK) makes use of Chandler Application Server. This software requires extensions, that may not be provided by your hosting provider (namely, sodium and yaml. these extensions are available on most of ISPManager hostings).
If you want, you can add your instance to the list above so that people can register there.
### Installation procedure
-1. Install PHP 7.4, web-server, Composer, Node.js, Yarn and [Chandler](https://github.com/openvk/chandler)
+1. Install PHP 7.4, web-server, Composer, Node.js 10+, Yarn and [Chandler](https://github.com/openvk/chandler)
* PHP 8.1 is supported too, however it was not tested carefully, so be aware.
@@ -41,7 +50,7 @@ If you want, you can add your instance to the list above so that people can regi
3. Install [commitcaptcha](https://github.com/openvk/commitcaptcha) and OpenVK as Chandler extensions like this:
```bash
-git clone https://github.com/openvk/openvk /path/to/chandler/extensions/available/openvk
+git clone https://github.com/tinelix/astorium /path/to/chandler/extensions/available/openvk
git clone https://github.com/openvk/commitcaptcha /path/to/chandler/extensions/available/commitcaptcha
```
@@ -57,21 +66,22 @@ ln -s /path/to/chandler/extensions/available/openvk /path/to/chandler/extensions
7. Copy `openvk-example.yml` to `openvk.yml` and change options to your liking
8. Run `composer install` in OpenVK directory
9. Run `composer install` in commitcaptcha directory
-10. Move to `Web/static/js` and execute `yarn install`
+10. Move to `Web/static/js` and execute `yarn install` or `yarnpkg install`
11. Set `openvk` as your root app in `chandler.yml`
+12. Set permissions for all `сhandler` directories to 0777 (all read, write and execute permissions) if different
Once you are done, you can login as a system administrator on the network itself (no registration required):
* **Login**: `admin@localhost.localdomain6`
* **Password**: `admin`
- * It is recommended to change the password of the built-in account or disable it.
+ * It is highly recommended to change the password of the built-in account or disable it.
💡Confused? Full installation walkthrough is available [here](https://docs.openvk.uk/openvk_engine/centos8_installation/) (CentOS 8 [and](https://almalinux.org/) [family](https://yum.oracle.com/oracle-linux-isos.html)).
### Looking for Docker or Kubernetes deployment?
See `install/automated/docker/README.md` and `install/automated/kubernetes/README.md` for Docker and Kubernetes deployment instructions.
-### If my website uses OpenVK, should I release it's sources?
+### If my website uses Astorium / OpenVK, should I release it's sources?
It depends. You can keep the sources to yourself if you do not plan to distribute your website binaries. If your website software must be distributed, it can stay non-OSS provided the OpenVK is not used as a primary application and is not modified. If you modified OpenVK for your needs or your work is based on it and you are planning to redistribute this, then you should license it under terms of any LGPL-compatible license (like OSL, GPL, LGPL etc).
@@ -88,6 +98,5 @@ You may reach out to us via:
**Attention**: bug tracker, board, Telegram and Matrix chat are public places, ticketing system is being served by volunteers. If you need to report something that should not be immediately disclosed to general public (for instance, a vulnerability), please contact us directly via this email: **openvk [at] tutanota [dot] com**
-
-
-
+## DISCLAIMER
+OpenVK and Astorium is not affiliated with or endorsed by VK PLC.
diff --git a/README_RU.md b/README_RU.md
index cc4f672fa..9451cd469 100644
--- a/README_RU.md
+++ b/README_RU.md
@@ -1,7 +1,9 @@
-#
OpenVK
+#
Astorium
_[English](README.md)_
+_**Astorium** - форк, основанный на [OSS-проекте OpenVK](https://github.com/openvk/openvk) и разработан для своих нужд и потребностей._
+
**OpenVK** — это попытка создать простую CMS, которая ~~косплеит~~ имитирует старый ВКонтакте. На данный момент, представленный здесь исходный код проекта пока не является стабильным.
ВКонтакте принадлежит Павлу Дурову и VK Group.
@@ -16,19 +18,28 @@ _[English](README.md)_
## Инстанции
-Список инстанций находится в [нашей вики этого репозитория](https://github.com/openvk/openvk/wiki/Instances-(RU)).
+* **[openvk.su](https://openvk.su/)**
+ * **[openvk.uk](https://openvk.uk)** ([зеркало](
-
+## ДИСКЛЕЙМЕР
+OpenVK и Astorium никак не связаны с компанией ООО "ВК" или не одобрены ею.
diff --git a/VKAPI/Handlers/Video.php b/VKAPI/Handlers/Video.php
index 740ccd548..7198f7665 100755
--- a/VKAPI/Handlers/Video.php
+++ b/VKAPI/Handlers/Video.php
@@ -11,47 +11,27 @@
final class Video extends VKAPIRequestHandler
{
- function get(int $owner_id, string $videos, int $offset = 0, int $count = 30, int $extended = 0): object
+ function get(string $videos, int $offset = 0, int $count = 30, int $extended = 0): object
{
$this->requireUser();
- if ($videos) {
- $vids = explode(',', $videos);
-
- foreach($vids as $vid)
- {
- $id = explode("_", $vid);
-
- $items = [];
-
- $video = (new VideosRepo)->getByOwnerAndVID(intval($id[0]), intval($id[1]));
- if($video) {
- $items[] = $video->getApiStructure();
- }
- }
-
- return (object) [
- "count" => count($items),
- "items" => $items
- ];
- } else {
- if ($owner_id > 0)
- $user = (new UsersRepo)->get($owner_id);
- else
- $this->fail(1, "Not implemented");
-
- $videos = (new VideosRepo)->getByUser($user, $offset + 1, $count);
- $videosCount = (new VideosRepo)->getUserVideosCount($user);
-
+ $vids = explode(',', $videos);
+
+ foreach($vids as $vid)
+ {
+ $id = explode("_", $vid);
+
$items = [];
- foreach ($videos as $video) {
+
+ $video = (new VideosRepo)->getByOwnerAndVID(intval($id[0]), intval($id[1]));
+ if($video) {
$items[] = $video->getApiStructure();
}
-
- return (object) [
- "count" => $videosCount,
- "items" => $items
- ];
}
+
+ return (object) [
+ "count" => count($items),
+ "items" => $items
+ ];
}
}
diff --git a/Web/Models/Entities/Media.php b/Web/Models/Entities/Media.php
index 648d3564e..2deb5c4d8 100644
--- a/Web/Models/Entities/Media.php
+++ b/Web/Models/Entities/Media.php
@@ -58,7 +58,7 @@ function getURL(): string
default:
case "default":
case "basic":
- return "http://" . $_SERVER['HTTP_HOST'] . "/blob_" . substr($hash, 0, 2) . "/$hash.$this->fileExtension";
+ return $settings->protocol ?? ovk_scheme() . "://" . $_SERVER['HTTP_HOST'] . "/blob_" . substr($hash, 0, 2) . "/$hash.$this->fileExtension";
break;
case "accelerated":
return "http://" . $_SERVER['HTTP_HOST'] . "/openvk-datastore/$hash.$this->fileExtension";
diff --git a/Web/Presenters/WallPresenter.php b/Web/Presenters/WallPresenter.php
index d89b722a4..ff442aadd 100644
--- a/Web/Presenters/WallPresenter.php
+++ b/Web/Presenters/WallPresenter.php
@@ -329,7 +329,7 @@ function renderMakePost(int $wall): void
$this->flashFail("err", tr("failed_to_publish_post"), tr("post_is_too_big"));
}
- foreach($photos as $photo)
+ foreach((array)$photos as $photo)
$post->attach($photo);
if(sizeof($videos) > 0)
diff --git a/Web/Presenters/templates/@CanonicalListView.xml b/Web/Presenters/templates/@CanonicalListView.xml
index a0c8f7d79..60e88d4b6 100644
--- a/Web/Presenters/templates/@CanonicalListView.xml
+++ b/Web/Presenters/templates/@CanonicalListView.xml
@@ -47,4 +47,4 @@
{/ifset}
{/if}
-
\ No newline at end of file
+
diff --git a/Web/Presenters/templates/@layout.xml b/Web/Presenters/templates/@layout.xml
index f8a975e01..a9898a330 100644
--- a/Web/Presenters/templates/@layout.xml
+++ b/Web/Presenters/templates/@layout.xml
@@ -43,8 +43,6 @@
OpenVK {php echo OPENVK_VERSION} | PHP: {phpversion()} | DB: {$dbVersion}
+Astorium {php echo OPENVK_VERSION} | Powered by OpenVK | tinelix.ru | GitHub
{php echo OPENVK_ROOT_CONF["openvk"]["appearance"]["motd"]}
diff --git a/Web/Presenters/templates/About/Invite.xml b/Web/Presenters/templates/About/Invite.xml index f50ed568f..eef01fc48 100644 --- a/Web/Presenters/templates/About/Invite.xml +++ b/Web/Presenters/templates/About/Invite.xml @@ -6,9 +6,12 @@ {/block} {block content} - {_you_can_invite}{_you_can_invite_2}
+ {var $canAccessAdminPanel = $thisUser->getChandlerUser()->can("access")->model("admin")->whichBelongsTo(NULL)} +{_you_can_invite_2}
+
- OpenVK {=OPENVK_VERSION}+ |
+ Astorium {=OPENVK_VERSION}+ Powered by OpenVK + |
+
|
OpenVK | +Astorium | {=OPENVK_VERSION} | ||||||||||||||||||||
Name | -Status | -Version | -Description | -Author | +Status | +Version | +Description | +Author | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
- Fore + Fore Orange | Default @@ -358,10 +366,10 @@ {=OPENVK_VERSION} | - Default OpenVK look and feel. + Default Astorium look and feel. | - Vladimir Barinov, Konstantin Kichulkin and Daniel Myslivets + Vladimir Barinov, Konstantin Kichulkin, Daniel Myslivets, Dmitry Tretyakov | |||||||||||||||||||
Astorium Development Force | +
---|
+ Dmitry Tretyakov (Tinelix) + | +
Language | -+ | Native name | -+ | Author(s) | @@ -457,7 +478,11 @@
Initial hosting | +Astorium initial hosting | +Dmitry Tretyakov | +
OpenVK initial hosting | Lumaeris and Celestora | |
Images | -Vladimir Barinov (veselcraft), Konstantin Kichulkin (kosfurler) and Daniel Myslivets | +Dmitry Tretyakov (Tinelix), Vladimir Barinov (veselcraft), Konstantin Kichulkin (kosfurler) and Daniel Myslivets |
Illustrations | @@ -483,6 +508,19 @@
Astorium QA Team | +
---|
+ Dmitry Tretyakov (Tinelix) and unknown tester, who disappeared shortly after trying to upload post with cat. + | +
{_name_group}: | -{$club->getName()} | +{$club->getName()} |
{_description}: | @@ -45,7 +45,7 @@