summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/application/actions/ctheme/get.php4
-rw-r--r--src/application/themes/cyborg/theme.json (renamed from src/themes/cyborg/theme.json)8
-rw-r--r--src/application/themes/default/theme.json14
-rw-r--r--src/application/themes/flat/theme.json13
-rw-r--r--src/application/themes/gloss/theme.json (renamed from src/themes/gloss/theme.json)8
-rw-r--r--src/application/themes/house/theme.json (renamed from src/themes/house/theme.json)10
-rw-r--r--src/application/themes/maverix/theme.json14
-rw-r--r--src/application/themes/paper/theme.json15
-rw-r--r--src/application/themes/simplex/theme.json14
-rw-r--r--src/application/themes/slate/theme.json (renamed from src/themes/slate/theme.json)8
-rw-r--r--src/application/themes/spacelab/theme.json14
-rw-r--r--src/application/themes/yeti/theme.json (renamed from src/themes/yeti/theme.json)10
-rw-r--r--src/index.php2
-rw-r--r--src/themes/.htaccess1
-rw-r--r--src/themes/default/theme.json14
-rw-r--r--src/themes/flat/theme.json13
-rw-r--r--src/themes/maverix/theme.json14
-rw-r--r--src/themes/paper/theme.json15
-rw-r--r--src/themes/simplex/theme.json14
-rw-r--r--src/themes/spacelab/theme.json14
20 files changed, 109 insertions, 110 deletions
diff --git a/src/application/actions/ctheme/get.php b/src/application/actions/ctheme/get.php
index f58b0bf..79f6353 100644
--- a/src/application/actions/ctheme/get.php
+++ b/src/application/actions/ctheme/get.php
@@ -34,8 +34,8 @@ if (!preg_match('/^[a-z0-9_-]+$/i', $themeName)) {
$cssWarning($buffer, "Loading default theme");
$themeName = "default";
}
-$themePath = __ROOT__ . '/themes/' . $themeName . '/theme.json';
-$themeDefaultPath = __ROOT__ . '/themes/default/theme.json';
+$themePath = __ROOT__ . '/application/themes/' . $themeName . '/theme.json';
+$themeDefaultPath = __ROOT__ . '/application/themes/default/theme.json';
if (!is_file($themePath) && is_file($themeDefaultPath)) {
$cssWarning($buffer, "Invalid theme '" . str_replace('*/', '*\\/', $themeName) . "'");
$cssWarning($buffer, "Loading default theme");
diff --git a/src/themes/cyborg/theme.json b/src/application/themes/cyborg/theme.json
index 4b71c4b..cd05471 100644
--- a/src/themes/cyborg/theme.json
+++ b/src/application/themes/cyborg/theme.json
@@ -5,10 +5,10 @@
"name": "Cyborg",
"author": "Jonas Kohl",
"files": [
- "../../ui/icons/css/fork-awesome.min.css",
- "../../ui/cyborg.min.css",
- "../../ui/fonts/mybb-icons/style.css",
- "../../ui/site.css",
+ "../../../ui/icons/css/fork-awesome.min.css",
+ "../../../ui/cyborg.min.css",
+ "../../../ui/fonts/mybb-icons/style.css",
+ "../../../ui/site.css",
[
".form-control {",
" background: #3c3c3c;",
diff --git a/src/application/themes/default/theme.json b/src/application/themes/default/theme.json
new file mode 100644
index 0000000..d1087ea
--- /dev/null
+++ b/src/application/themes/default/theme.json
@@ -0,0 +1,14 @@
+{
+ "$format": 1,
+ "version": "1.0.0",
+ "id": "default",
+ "name": "Mystic Default",
+ "author": "Jonas Kohl",
+ "files": [
+ "../../../ui/icons/css/fork-awesome.min.css",
+ "../../../ui/dist/css/bootstrap.min.css",
+ "../../../ui/dist/css/bootstrap-theme.min.css",
+ "../../../ui/fonts/mybb-icons/style.css",
+ "../../../ui/site.css"
+ ]
+}
diff --git a/src/application/themes/flat/theme.json b/src/application/themes/flat/theme.json
new file mode 100644
index 0000000..b6a0228
--- /dev/null
+++ b/src/application/themes/flat/theme.json
@@ -0,0 +1,13 @@
+{
+ "$format": 1,
+ "version": "1.0.0",
+ "id": "flat",
+ "name": "Mystic Flat",
+ "author": "Jonas Kohl",
+ "files": [
+ "../../../ui/icons/css/fork-awesome.min.css",
+ "../../../ui/dist/css/bootstrap.min.css",
+ "../../../ui/fonts/mybb-icons/style.css",
+ "../../../ui/site.css"
+ ]
+}
diff --git a/src/themes/gloss/theme.json b/src/application/themes/gloss/theme.json
index 475b959..726b872 100644
--- a/src/themes/gloss/theme.json
+++ b/src/application/themes/gloss/theme.json
@@ -5,10 +5,10 @@
"name": "Mystic Gloss",
"author": "Jonas Kohl",
"files": [
- "../../ui/icons/css/fork-awesome.min.css",
- "../../ui/gloss.min.css",
- "../../ui/fonts/mybb-icons/style.css",
- "../../ui/site.css",
+ "../../../ui/icons/css/fork-awesome.min.css",
+ "../../../ui/gloss.min.css",
+ "../../../ui/fonts/mybb-icons/style.css",
+ "../../../ui/site.css",
[
".post-container-controls {",
" background: linear-gradient(transparent, #f3f3f3 56%);",
diff --git a/src/themes/house/theme.json b/src/application/themes/house/theme.json
index f77212d..b260100 100644
--- a/src/themes/house/theme.json
+++ b/src/application/themes/house/theme.json
@@ -5,11 +5,11 @@
"name": "Mystic House Corner",
"author": "Jonas Kohl",
"files": [
- "../../ui/icons/css/fork-awesome.min.css",
- "../../ui/house.min.css",
- "../../ui/house-theme.min.css",
- "../../ui/fonts/mybb-icons/style.css",
- "../../ui/site.css",
+ "../../../ui/icons/css/fork-awesome.min.css",
+ "../../../ui/house.min.css",
+ "../../../ui/house-theme.min.css",
+ "../../../ui/fonts/mybb-icons/style.css",
+ "../../../ui/site.css",
[
".post-container-controls {",
" background: linear-gradient(transparent, #362d25 56%);",
diff --git a/src/application/themes/maverix/theme.json b/src/application/themes/maverix/theme.json
new file mode 100644
index 0000000..0a59c66
--- /dev/null
+++ b/src/application/themes/maverix/theme.json
@@ -0,0 +1,14 @@
+{
+ "$format": 1,
+ "version": "1.0.0",
+ "id": "maverix",
+ "name": "Maverix",
+ "author": "Jonas Kohl",
+ "files": [
+ "../../../ui/icons/css/fork-awesome.min.css",
+ "../../../ui/dist/css/bootstrap.min.css",
+ "../../../ui/fonts/mybb-icons/style.css",
+ "../../../ui/maverix/maverix.css",
+ "../../../ui/site.css"
+ ]
+}
diff --git a/src/application/themes/paper/theme.json b/src/application/themes/paper/theme.json
new file mode 100644
index 0000000..f13d1a6
--- /dev/null
+++ b/src/application/themes/paper/theme.json
@@ -0,0 +1,15 @@
+{
+ "$format": 1,
+ "version": "1.0.0",
+ "id": "paper",
+ "name": "Paper",
+ "author": "Jonas Kohl",
+ "files": [
+ "../../../ui/icons/css/fork-awesome.min.css",
+ "../../../ui/paper.min.css",
+ "../../../ui/fonts/mybb-icons/style.css",
+ "../../../ui/site.css",
+ "../../../ui/fonts/roboto.css"
+ ]
+}
+
diff --git a/src/application/themes/simplex/theme.json b/src/application/themes/simplex/theme.json
new file mode 100644
index 0000000..5157c4d
--- /dev/null
+++ b/src/application/themes/simplex/theme.json
@@ -0,0 +1,14 @@
+{
+ "$format": 1,
+ "version": "1.0.0",
+ "id": "simplex",
+ "name": "Simplex",
+ "author": "Jonas Kohl",
+ "files": [
+ "../../../ui/icons/css/fork-awesome.min.css",
+ "../../../ui/simplex.min.css",
+ "../../../ui/fonts/mybb-icons/style.css",
+ "../../../ui/site.css"
+ ]
+}
+
diff --git a/src/themes/slate/theme.json b/src/application/themes/slate/theme.json
index 1bd048b..ec2101f 100644
--- a/src/themes/slate/theme.json
+++ b/src/application/themes/slate/theme.json
@@ -5,10 +5,10 @@
"name": "Slate",
"author": "Jonas Kohl",
"files": [
- "../../ui/icons/css/fork-awesome.min.css",
- "../../ui/slate.min.css",
- "../../ui/fonts/mybb-icons/style.css",
- "../../ui/site.css",
+ "../../../ui/icons/css/fork-awesome.min.css",
+ "../../../ui/slate.min.css",
+ "../../../ui/fonts/mybb-icons/style.css",
+ "../../../ui/site.css",
[
".post-container-controls {",
" background-image: linear-gradient(transparent, #272b30 56%);",
diff --git a/src/application/themes/spacelab/theme.json b/src/application/themes/spacelab/theme.json
new file mode 100644
index 0000000..c4ad476
--- /dev/null
+++ b/src/application/themes/spacelab/theme.json
@@ -0,0 +1,14 @@
+{
+ "$format": 1,
+ "version": "1.0.0",
+ "id": "spacelab",
+ "name": "Spacelab",
+ "author": "Jonas Kohl",
+ "files": [
+ "../../../ui/icons/css/fork-awesome.min.css",
+ "../../../ui/spacelab.min.css",
+ "../../../ui/fonts/mybb-icons/style.css",
+ "../../../ui/site.css"
+ ]
+}
+
diff --git a/src/themes/yeti/theme.json b/src/application/themes/yeti/theme.json
index 7c40c01..a027a30 100644
--- a/src/themes/yeti/theme.json
+++ b/src/application/themes/yeti/theme.json
@@ -5,11 +5,11 @@
"name": "Yeti",
"author": "Jonas Kohl",
"files": [
- "../../ui/icons/css/fork-awesome.min.css",
- "../../ui/yeti.min.css",
- "../../ui/fonts/mybb-icons/style.css",
- "../../ui/site.css",
- "../../ui/fonts/opensans.css",
+ "../../../ui/icons/css/fork-awesome.min.css",
+ "../../../ui/yeti.min.css",
+ "../../../ui/fonts/mybb-icons/style.css",
+ "../../../ui/site.css",
+ "../../../ui/fonts/opensans.css",
[
".image-attachment-image {",
"box-shadow: 0 0 0 1px #ccc;",
diff --git a/src/index.php b/src/index.php
index 4495cfa..0c5cc3b 100644
--- a/src/index.php
+++ b/src/index.php
@@ -103,7 +103,7 @@ function decodePasswordResetLink(Database &$db, string $token, string $signature
function getThemeAndLangInfo(): array {
$availableThemes = [];
$currentTheme = $_GET["theme"] ?? $_COOKIE["theme"] ?? env("MYSTIC_FORUM_THEME") ?? "default";
- foreach (scandir($dir = __DIR__ . '/themes/') as $ent) {
+ foreach (scandir($dir = __ROOT__ . '/application/themes/') as $ent) {
if ($ent[0] === "." || !is_dir($dir . "/" . $ent) || !is_file($theme_file = $dir . "/" . $ent . "/theme.json"))
continue;
$theme_info = json_decode(file_get_contents($theme_file));
diff --git a/src/themes/.htaccess b/src/themes/.htaccess
deleted file mode 100644
index b66e808..0000000
--- a/src/themes/.htaccess
+++ /dev/null
@@ -1 +0,0 @@
-Require all denied
diff --git a/src/themes/default/theme.json b/src/themes/default/theme.json
deleted file mode 100644
index 20d7b2e..0000000
--- a/src/themes/default/theme.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "$format": 1,
- "version": "1.0.0",
- "id": "default",
- "name": "Mystic Default",
- "author": "Jonas Kohl",
- "files": [
- "../../ui/icons/css/fork-awesome.min.css",
- "../../ui/dist/css/bootstrap.min.css",
- "../../ui/dist/css/bootstrap-theme.min.css",
- "../../ui/fonts/mybb-icons/style.css",
- "../../ui/site.css"
- ]
-}
diff --git a/src/themes/flat/theme.json b/src/themes/flat/theme.json
deleted file mode 100644
index a7fb904..0000000
--- a/src/themes/flat/theme.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "$format": 1,
- "version": "1.0.0",
- "id": "flat",
- "name": "Mystic Flat",
- "author": "Jonas Kohl",
- "files": [
- "../../ui/icons/css/fork-awesome.min.css",
- "../../ui/dist/css/bootstrap.min.css",
- "../../ui/fonts/mybb-icons/style.css",
- "../../ui/site.css"
- ]
-}
diff --git a/src/themes/maverix/theme.json b/src/themes/maverix/theme.json
deleted file mode 100644
index 6039bb9..0000000
--- a/src/themes/maverix/theme.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "$format": 1,
- "version": "1.0.0",
- "id": "maverix",
- "name": "Maverix",
- "author": "Jonas Kohl",
- "files": [
- "../../ui/icons/css/fork-awesome.min.css",
- "../../ui/dist/css/bootstrap.min.css",
- "../../ui/fonts/mybb-icons/style.css",
- "../../ui/maverix/maverix.css",
- "../../ui/site.css"
- ]
-}
diff --git a/src/themes/paper/theme.json b/src/themes/paper/theme.json
deleted file mode 100644
index 14019b1..0000000
--- a/src/themes/paper/theme.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "$format": 1,
- "version": "1.0.0",
- "id": "paper",
- "name": "Paper",
- "author": "Jonas Kohl",
- "files": [
- "../../ui/icons/css/fork-awesome.min.css",
- "../../ui/paper.min.css",
- "../../ui/fonts/mybb-icons/style.css",
- "../../ui/site.css",
- "../../ui/fonts/roboto.css"
- ]
-}
-
diff --git a/src/themes/simplex/theme.json b/src/themes/simplex/theme.json
deleted file mode 100644
index c275ae8..0000000
--- a/src/themes/simplex/theme.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "$format": 1,
- "version": "1.0.0",
- "id": "simplex",
- "name": "Simplex",
- "author": "Jonas Kohl",
- "files": [
- "../../ui/icons/css/fork-awesome.min.css",
- "../../ui/simplex.min.css",
- "../../ui/fonts/mybb-icons/style.css",
- "../../ui/site.css"
- ]
-}
-
diff --git a/src/themes/spacelab/theme.json b/src/themes/spacelab/theme.json
deleted file mode 100644
index 9149824..0000000
--- a/src/themes/spacelab/theme.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "$format": 1,
- "version": "1.0.0",
- "id": "spacelab",
- "name": "Spacelab",
- "author": "Jonas Kohl",
- "files": [
- "../../ui/icons/css/fork-awesome.min.css",
- "../../ui/spacelab.min.css",
- "../../ui/fonts/mybb-icons/style.css",
- "../../ui/site.css"
- ]
-}
-