-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Для удаления новостей была использована функция движка - Для удаления комментариев была использована функция движка - Изменил нумерование версий
- Loading branch information
Showing
14 changed files
with
155 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"version": "1.0.1", | ||
"version": "0.1.3", | ||
"name": "DLE API" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
{ | ||
"config": { | ||
"platform": { | ||
"php": "5.6.19" | ||
} | ||
}, | ||
"require": { | ||
"ext-json": "*", | ||
"slim/slim": "*", | ||
"slim/slim": "^3.12", | ||
"monolog/monolog": "*", | ||
"ext-pdo": "*" | ||
}, | ||
"config": { | ||
"platform": { | ||
"php": "5.6" | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,57 @@ | ||
DLE-API | ||
Модификация для админпанели и глобальные функции для моих разработок Совместимость проверенна на DLE-версиях 13.х | ||
|
||
Для установки достаточно скачать релиз. Релизы выше только для версий DLE 13 и выше. | ||
|
||
Хотите что-то увидеть в следующем релизе? Тогда вам сюда: https://feathub.com/Gokujo/dle_api | ||
Документация по API (не полная): https://documenter.getpostman.com/view/7856564/SW7T9BsW | ||
DLE API | ||
Модификация для админпанели и глобальные функции для моих разработок Совместимость проверенна на DLE-версиях 13.х. Для корректной работы требуется минимальная версия MySQL 5.5.6 или MariaDB 10.0, поскольку используются Foreign Key, которые требуют наличие InnoDB. | ||
Для установки достаточно скачать релиз (https://github.com/Gokujo/dle_api/releases/latest). | ||
Документация к API находится на сервере POSTMAN (https://documenter.getpostman.com/view/7856564/SW7T9BsW). | ||
На данный момент она не полная и пополняется медлено, но верно. Релизы выше только для версий DLE 13 и выше. | ||
Для пожеланий можно использовать feathub (https://feathub.com/Gokujo/dle_api)). | ||
|
||
DLE >= 13.x | ||
Скачайте релиз. У вас три варианта для установки: | ||
|
||
При помощи bat-Скрипта. Для пользователей Windows Для этого устанавливаем 7Zip. После установки запускаем скрипт install_archive.bat. После завершения установки - загружаем maharder_assets.zip в менеджер плагинов. | ||
1. При помощи bat-Скрипта. Для пользователей Windows Для этого устанавливаем 7Zip (https://www.7-zip.org/download.html). После установки запускаем скрипт install_archive.bat. После завершения установки - загружаем install.zip в менеджер плагинов. | ||
2. Упаковать самому Любым архиватором запаковать всё содержимое в папке upload, причём так, чтобы в корне архива был файл install.xml и папка engine. Затем устанавливаем архив через менеджер плагинов. | ||
3. Просто залить Залейте папку engine в корень сайта и установите плагин через менеджер плагинов. | ||
|
||
DLE < 13 | ||
В теории, и на движках младше всё должно работать, поскольку в процессе не затрагиваются файлы движка. Но, это не точно, я не пробовал, не эксперементировал. На свой страх и риск. | ||
|
||
Установка | ||
Залить папки api и engine из папки upload в корень сайта. Затем выполнить запрос в базу данных: | ||
|
||
CREATE TABLE {prefix}_api_keys ( | ||
id int auto_increment | ||
primary key, | ||
api varchar(255) not null, | ||
is_admin tinyint(1) default 0 not null, | ||
creator int default 0 null, | ||
created datetime default CURRENT_TIMESTAMP not null, | ||
active tinyint(1) default 0 not null, | ||
user_id int default 0 not null, | ||
constraint {prefix}_api_keys_key_uindex | ||
unique (api) | ||
); | ||
|
||
create table {prefix}_api_scope ( | ||
scope_id int auto_increment | ||
primary key, | ||
`table` varchar(255) null, | ||
`read` tinyint(1) default 0 not null, | ||
`write` tinyint(1) default 0 not null, | ||
`delete` tinyint(1) default 0 not null, | ||
key_id int default 0 not null, | ||
constraint {prefix}_api_scope_{prefix}_api_keys_id_fk | ||
foreign key (key_id) references {prefix}_api_keys (id) | ||
on update cascade on delete cascade | ||
); | ||
|
||
INSERT INTO {prefix}_admin_sections (name, title, descr, icon, allow_groups) VALUES ('dleapi', 'DLE-API', 'Неофициальное API для DLE. Раздел по созданию и управлению над ключами доступа к API.', '/engine/skins/images/icons/dleapi.png', 1); | ||
|
||
|
||
Удаление | ||
Удаляем из корня сайта папку api, a так-же из папки engine/inc файл dleapi.php и из engine/skins/images файл dleapi.png. | ||
|
||
Упаковать самому Любым архиватором запаковать всё содержимое в папке upload, причём так, чтобы в корне архива был файл install.xml и папка engine. Затем устанавливаем архив через менеджер плагинов. | ||
Выполняем запрос в базу данных: | ||
|
||
Просто залить Залейте папку engine в корень сайта и установите плагин через менеджер плагинов. | ||
DELETE FROM {prefix}_admin_sections WHERE `name` = 'dleapi'; | ||
DROP TABLE {prefix}_api_keys cascade, {prefix}_api_scope cascade; | ||
{prefix} заменяем на свой префикс базы данных. |