Skip to content

Commit c4b7ae8

Browse files
committed
Initial import
0 parents  commit c4b7ae8

26 files changed

+5180
-0
lines changed

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/.idea/
2+
/vendor/
3+
config.php
4+
.php-cs-fixer.cache

.php-cs-fixer.php

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?php
2+
3+
$finder = PhpCsFixer\Finder::create()
4+
->exclude('var')
5+
->exclude('tools')
6+
->exclude('views')
7+
->notPath('config.php')
8+
->in(__DIR__)
9+
;
10+
11+
$header = <<<'EOT'
12+
BZFlag Asset Manager: Tool to upload and moderate map assets for BZFlag.
13+
Copyright (C) 2023 BZFlag & Associates
14+
15+
This program is free software: you can redistribute it and/or modify
16+
it under the terms of the GNU Affero General Public License as
17+
published by the Free Software Foundation, either version 3 of the
18+
License, or (at your option) any later version.
19+
20+
This program is distributed in the hope that it will be useful,
21+
but WITHOUT ANY WARRANTY; without even the implied warranty of
22+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23+
GNU Affero General Public License for more details.
24+
25+
You should have received a copy of the GNU Affero General Public License
26+
along with this program. If not, see <https://www.gnu.org/licenses/>.
27+
EOT;
28+
29+
$config = new PhpCsFixer\Config();
30+
return $config->setRules([
31+
'@PSR12' => true,
32+
'declare_strict_types' => true,
33+
'strict_param' => true,
34+
'ordered_imports' => true,
35+
'array_syntax' => ['syntax' => 'short'],
36+
'header_comment' => [ 'header' => $header ]
37+
])
38+
->setIndent(" ")
39+
->setFinder($finder)
40+
;

LICENSE.md

+660
Large diffs are not rendered by default.

README.md

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
BZFlag Asset Manager
2+
====================
3+
4+
Asset Manager is a web interface for the submission of game assets and a simple moderation system. This is a replacement for the old BZFlag Image Uploader a.k.a. submitimages.
5+
6+
Feature Progress
7+
----------------
8+
* [X] BZFlag WebLogin integration
9+
* [X] Queue database
10+
* [X] Image thumbnail generator
11+
* [ ] Ability to upload new assets
12+
* [ ] Moderation interface for the asset queue
13+
* [ ] Email notifications
14+
* [ ] Moderation queue reminders
15+
* [ ] Directory index for listing assets
16+
17+
Requirements
18+
------------
19+
* PHP 8.2 or later (ideally the FPM variant), with the following extensions:
20+
* PDO
21+
* cURL
22+
* SQLite3
23+
* GD
24+
* [Composer](https://getcomposer.org/download/)
25+
26+
Installation
27+
------------
28+
This assumes that the website will be stored in ```/var/www/asset-manager```, where ```/var/www/asset-manager/README.md``` would be this file.
29+
```shell
30+
git clone https://github.com/BZFlag-Dev/asset-manager /var/www/asset-manager
31+
cd /var/www/asset-manager
32+
composer install
33+
```
34+
The final location of approved assets would be elsewhere, such as ```/var/www/assets/public```.
35+
36+
A configuration file named ```config.php``` will need to be created and would be placed at ```/var/www/asset-manager/config.php```:
37+
```php
38+
<?php
39+
return [
40+
'site' => [
41+
'takedown_address' => 'dmca@domain.test'
42+
],
43+
'path' => [
44+
'files' => '/var/www/assets/public'
45+
],
46+
'auth' => [
47+
'admin_group' => 'SOME.GROUP',
48+
],
49+
'email' => [
50+
'from_address' => 'noreply@domain.test',
51+
'notify_addresses' => [
52+
'admin1@domain.test',
53+
'admin2@domain.test'
54+
]
55+
]
56+
];
57+
```

composer.json

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"license": "AGPL-3.0-or-later",
3+
"autoload": {
4+
"psr-4": {
5+
"App\\": "src/"
6+
}
7+
},
8+
"repositories": [
9+
{
10+
"type": "vcs",
11+
"url": "https://github.com/blast007/Twig-View"
12+
}
13+
],
14+
"require": {
15+
"php": ">=8.2",
16+
"ext-curl": "*",
17+
"ext-gd": "*",
18+
"ext-pdo": "*",
19+
"slim/slim": "4.*",
20+
"nyholm/psr7": "^1.8",
21+
"nyholm/psr7-server": "^1.0",
22+
"slim/twig-view": "dev-fixbasepath",
23+
"php-di/slim-bridge": "^3.4",
24+
"league/config": "^1.2"
25+
},
26+
"suggest": {
27+
"ext-sqlite3": "*"
28+
}
29+
}

0 commit comments

Comments
 (0)