This repository has been archived by the owner on Sep 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Info.php
39 lines (36 loc) · 1.58 KB
/
Info.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
/**
* BatFlat - EmbededVideoPlayer Module by pplaczek.
* Allows you to upload a video clip and play it using the html5 player.
*
* @author Piotr Płaczek <piotr@pplaczek.pl>
* @copyright 2018 Piotr Płaczek <p.dev>
* @license MIT https://github.com/piotr-placzek/BatFlat-EmbededVideoPlayer/blob/master/LICENSE.md
* @link https://github.com/piotr-placzek/BatFlat-EmbededVideoPlayer
*/
return [
'name' => $core->lang['embededvideoplayer']['module_name'],
'description' => $core->lang['embededvideoplayer']['module_desc'],
'author' => 'p.dev',
'version' => '1.0.1',
'compatibility' => '1.3.*', // Compatibility with Batflat version
'icon' => 'film', // Icon from http://fontawesome.io/icons/
'install' => function () use ($core) {
$core->db()->pdo()->exec("CREATE TABLE IF NOT EXISTS `pdev_evp` (
`id` integer NOT NULL PRIMARY KEY AUTOINCREMENT,
`name` text NOT NULL,
`slug` text NOT NULL,
`file` text NOT NULL,
`path` text NOT NULL
)");
if (!file_exists(UPLOADS.'/pdev_evp')) {
mkdir(UPLOADS.'/pdev_evp', 0755, true);
}
},
'uninstall' => function () use ($core) {
// If you uncomment line bellow then you lost all data but not files
$core->db()->pdo()->exec("DROP TABLE `pdev_evp`");
// If you uncomment block bellow then you lost all files but not data
deleteDir(UPLOADS.'/pdev_evp');
}
];