From 8cc1f13c17fa2fb5a4410542d39e650e02945634 Mon Sep 17 00:00:00 2001 From: Minteck Date: Thu, 23 Feb 2023 14:20:13 +0100 Subject: Updated 27 files, added assets/uploads/pt-twilightsparkle.png and deleted 3 files (automated) --- api/save.php | 6 +- app.php | 14 ++++- assets/logo/banner.js | 2 +- assets/logo/custom.css | 9 +-- assets/uploads/banner-cloudburst.jpg | Bin 773594 -> 0 bytes assets/uploads/banner-raindrops.jpg | Bin 213492 -> 0 bytes assets/uploads/pt-nightmaremoon.png | Bin 4667 -> 0 bytes assets/uploads/pt-twilightsparkle.png | Bin 0 -> 3997 bytes includes/banner.inc | 11 ++-- includes/details.inc | 22 +++---- includes/flags.json | 6 +- includes/functions.inc | 78 +++++++++++++++++++------ includes/member.inc | 7 ++- includes/metadata.inc | 16 ++--- includes/navigation.inc | 84 ++++++++++++++++++++++++++- includes/pages.json | 6 +- includes/refresh.php | 4 ++ includes/score.inc | 16 +++++ includes/sysbanner.inc | 16 +++-- includes/sysedit.inc | 2 +- includes/system.inc | 18 +++--- includes/system/compare.inc | 8 ++- includes/system/history.inc | 11 +++- includes/titlebar.inc | 106 +++++++++++++++++++++------------- includes/travelling.inc | 8 ++- pages/about.inc | 16 ----- pages/docs.inc | 77 +++++++++++++++--------- pages/edit.inc | 14 +++-- pages/home.inc | 4 +- pages/metadata.inc | 16 +++-- pages/page.inc | 25 +++++--- 31 files changed, 421 insertions(+), 181 deletions(-) delete mode 100644 assets/uploads/banner-cloudburst.jpg delete mode 100644 assets/uploads/banner-raindrops.jpg delete mode 100644 assets/uploads/pt-nightmaremoon.png create mode 100644 assets/uploads/pt-twilightsparkle.png diff --git a/api/save.php b/api/save.php index 52cdebe..864f86e 100644 --- a/api/save.php +++ b/api/save.php @@ -1,7 +1,7 @@ ${french ? "Position :" : "Location:"} - ${data['system']['page'] ? ` ${data['system']['name']}` : ` ${data['system']['name']}`} + ${data['system']['page'] ? ` ${data['system']['name']}` : ` ${data['system']['name']}`} ${data['system']['subsystem'] ? `
${french ? "Sous-système :" : "Subsystem:"} ${data['system']['subsystem']['name']} ` : data['system']['temporary'] ? (french ? '
(temporaire)' : '
(temporary)') : ''} diff --git a/assets/logo/custom.css b/assets/logo/custom.css index 2673b91..dccb432 100644 --- a/assets/logo/custom.css +++ b/assets/logo/custom.css @@ -68,7 +68,7 @@ body { } @media (max-width: 991px) { - #hpd-cloudburst > div, #hpd-raindrops > div, #hpd-legacy > div { + #hpd-cloudburst > div, #hpd-raindrops > div, #hpd-legacy > div, #hpd-other > div { grid-template-columns: repeat(3, 1fr) !important; } @@ -82,13 +82,13 @@ body { } @media (max-width: 768px) { - #hpd-cloudburst > div, #hpd-raindrops > div, #hpd-legacy > div { + #hpd-cloudburst > div, #hpd-raindrops > div, #hpd-legacy > div, #hpd-other > div { grid-template-columns: repeat(2, 1fr) !important; } } @media (max-width: 575px) { - #hpd-cloudburst > div, #hpd-raindrops > div, #hpd-legacy > div { + #hpd-cloudburst > div, #hpd-raindrops > div, #hpd-legacy > div, #hpd-other > div { grid-template-columns: repeat(1, 1fr) !important; } @@ -96,9 +96,10 @@ body { display: inline-block !important; margin-right: 5px !important; height: 32px !important; + width: 32px !important; } - #hpd-cloudburst > div, #hpd-raindrops > div, #hpd-legacy > div { + #hpd-cloudburst > div, #hpd-raindrops > div, #hpd-legacy > div, #hpd-other > div { grid-gap: 5px !important; } diff --git a/assets/uploads/banner-cloudburst.jpg b/assets/uploads/banner-cloudburst.jpg deleted file mode 100644 index 6692739..0000000 Binary files a/assets/uploads/banner-cloudburst.jpg and /dev/null differ diff --git a/assets/uploads/banner-raindrops.jpg b/assets/uploads/banner-raindrops.jpg deleted file mode 100644 index f4edfa2..0000000 Binary files a/assets/uploads/banner-raindrops.jpg and /dev/null differ diff --git a/assets/uploads/pt-nightmaremoon.png b/assets/uploads/pt-nightmaremoon.png deleted file mode 100644 index c6ffb3f..0000000 Binary files a/assets/uploads/pt-nightmaremoon.png and /dev/null differ diff --git a/assets/uploads/pt-twilightsparkle.png b/assets/uploads/pt-twilightsparkle.png new file mode 100644 index 0000000..e996c8d Binary files /dev/null and b/assets/uploads/pt-twilightsparkle.png differ diff --git a/includes/banner.inc b/includes/banner.inc index c96bedd..888cc95 100644 --- a/includes/banner.inc +++ b/includes/banner.inc @@ -181,11 +181,13 @@ function getMemberBannerData(string $id, string $system, bool $french = false) { ]; } + $app = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/app.json"), true); + $systemData = []; - $systemData['page'] = "/" . ($system === "gdapd" ? "raindrops" : "cloudburst"); - $systemData['icon'] = ($system === "gdapd" ? "raindrops" : "cloudburst") . ".png"; - $systemData['name'] = $system === "gdapd" ? "Raindrops" : "Cloudburst"; - $systemData['full_name'] = $system === "gdapd" ? "Raindrops System" : "Cloudburst System"; + $systemData['page'] = "/" . ($system === "gdapd" ? "raindrops" : ($system === $app["other"]["id"] ? $app["other"]["slug"] : "cloudburst")); + $systemData['icon'] = getAsset($system); + $systemData['name'] = $system === "gdapd" ? "Raindrops" : ($system === $app["other"]["id"] ? $app["other"]["short"] : "Cloudburst"); + $systemData['full_name'] = $system === "gdapd" ? "Raindrops System" : ($system === $app["other"]["id"] ? $app["other"]["name"] : "Cloudburst System"); $systemData['subsystem'] = null; $systemData['temporary'] = false; @@ -207,7 +209,6 @@ function getMemberBannerData(string $id, string $system, bool $french = false) { $systemData['temporary'] = true; } - if ($travelling[$member['id']]["travelling"] && $travelling[$member['id']]["equestria"]) { $systemData['page'] = null; $systemData['icon'] = "../logo/equestria.png"; diff --git a/includes/details.inc b/includes/details.inc index 323352d..ce1add6 100644 --- a/includes/details.inc +++ b/includes/details.inc @@ -1,5 +1,5 @@ - -
; margin-left: -20px; margin-right: -20px;"> + +
" style="grid-template-columns: repeat(4, 1fr); background-color: ; margin-left: -20px; margin-right: -20px;">

"" . $lang["details"]["memory_states"][2] . "", } ?>
+
Age:
@@ -69,11 +70,16 @@ -
+ +
+ +
; margin-left: -20px; margin-right: -20px;grid-template-columns: repeat(3, 1fr);"> + = 16 && $metadata["little"] === 0) || (!isset($age) && $metadata["little"] === 0)) || $metadata["sexual_features"]): ?> - +
Sexual consent:
@@ -138,6 +144,7 @@ break; } ?> (poly)
+
Birthday:
@@ -146,13 +153,6 @@ -
- +
diff --git a/includes/flags.json b/includes/flags.json index 5bb9a91..d05292c 100644 --- a/includes/flags.json +++ b/includes/flags.json @@ -6,15 +6,15 @@ "median": null, "protector": "!!Protector", - "leader": "!!Leader", + "leader": "Leader", "fictive": "!!Fictive", "sexual_features": "Enable sexual features (for ponies below 16)", "sexually_active": "Preemptive sexual consent", "robot": "!!Robot", "plush": "!!Plush", "polyamorous": { - "romantic": "Polyamorous (romantic)", - "sexual": "Polyamorous (sexual)" + "romantic": "!!Polyamorous (romantic)", + "sexual": "!!Polyamorous (sexual)" }, "non_verbal": "!!Non verbal in real life", "less_frequent": "!!Fronts less frequently", diff --git a/includes/functions.inc b/includes/functions.inc index 9bc9ba6..d0f8568 100644 --- a/includes/functions.inc +++ b/includes/functions.inc @@ -181,7 +181,7 @@ if (!function_exists("getMiniName")) { function getMiniName(string $name) { $parts = explode(" ", $name); - if (strlen($parts[0]) > 3 && !str_ends_with($parts[0], "e") && $parts[0] !== "Filly" && $parts[0] !== "Windy" && (isset($parts[1]) && $parts[1] !== "Brightdawn" && $parts[1] !== "Fizz")) { + if (strlen($parts[0]) > 3 && $parts[0] !== "Sweetie" && $parts[0] !== "Filly" && $parts[0] !== "Windy" && (isset($parts[1]) && $parts[1] !== "Brightdawn" && $parts[1] !== "Fizz")) { if ($parts[0] === "Princess") { array_shift($parts); } @@ -205,9 +205,10 @@ if (!function_exists("withCaretakersDown")) { if (!function_exists("getSystemMember")) { function getSystemMember(string $system, string $id) { + $app = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/app.json"), true); $systemID = $system; - $members = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$systemID/members.json"), true); + $members = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . ($systemID === $app["other"]["id"] ? "other" : $systemID) . "/members.json"), true); $member = null; foreach ($members as $m) { @@ -222,6 +223,7 @@ if (!function_exists("getSystemMember")) { if (!function_exists("getMemberWithoutSystem")) { function getMemberWithoutSystem(string $id) { + global $isLowerLoggedIn; global $isLoggedIn; $member = null; $members1 = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/ynmuc/members.json"), true); @@ -238,6 +240,17 @@ if (!function_exists("getMemberWithoutSystem")) { if ($m["id"] === $id) $member = $m; } + if ($isLowerLoggedIn || $isLoggedIn) { + $app = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/app.json"), true); + $members3 = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/other/members.json"), true); + + foreach ($members3 as $m) { + $m["_system"] = $app["other"]["id"]; + $m["system"] = $app["other"]["id"]; + if ($m["id"] === $id) $member = $m; + } + } + return $member; } } @@ -247,7 +260,7 @@ if (!function_exists("showMembersFromList")) { foreach ($list as $member) { if ($member['name'] !== "unknown" && $member['name'] !== "fusion") { echo('
- +
' . ($member['display_name'] ?? $member['name']) . '
' . (isset($member['travelling']) && $member['travelling'] ? "+" . ($member['proxy_tags'][0]['prefix'] ?? " ") : ($member['proxy_tags'][0]['prefix'] ?? " ")) . '
'); @@ -273,6 +286,24 @@ if (!function_exists("showSubsystem")) { } } +if (!function_exists("prettySize")) { + function prettySize($bytes) { + if ($bytes > 1024) { + if ($bytes > 1024**2) { + if ($bytes > 1024**3) { + return round($bytes / 1024**3, 1) . " GB"; + } else { + return round($bytes / 1024**2, 1) . " MB"; + } + } else { + return round($bytes / 1024, 1) . " KB"; + } + } else { + return $bytes . " B"; + } + } +} + if (!function_exists("showSystem")) { function showSystem(string $id, string $name, string $color, bool $hideTitle) { $app = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/app.json"), true); @@ -288,7 +319,7 @@ if (!function_exists("showSystem")) {
'); } if (!$hideTitle) echo(' - +

' . $name . '
'); @@ -298,20 +329,29 @@ if (!function_exists("showSystem")) { echo('
'); } - showMembersFromList(scoreOrder([...array_map(function ($i) use ($id, $travelling) { - $i["travelling"] = false; - $i["system"] = $id; - $i["equestria"] = $travelling[$i['id']]['travelling'] && $travelling[$i['id']]['equestria']; - return $i; - }, array_filter(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . (isset($app["other"]) && $id === $app["other"]["id"] ? "other" : $id) . "/members.json"), true), function ($i) use ($travelling) { - return !(isset($travelling[$i['id']]) && $travelling[$i['id']]['travelling'] && (!isset($travelling[$i['id']]['equestria']) || !$travelling[$i['id']]['equestria'])); - })), ...array_map(function ($i) use ($id) { - $i["travelling"] = true; - $i["system"] = ($id === "gdapd" ? "ynmuc" : "gdapd"); - return $i; - }, array_filter(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . ($id === "gdapd" ? "ynmuc" : "gdapd") . "/members.json"), true), function ($i) use ($travelling) { - return isset($travelling[$i['id']]) && $travelling[$i['id']]['travelling'] && (!isset($travelling[$i['id']]['equestria']) || !$travelling[$i['id']]['equestria']); - }))], $id)); + if ($id === $app["other"]["id"]) { + showMembersFromList(scoreOrder([...array_map(function ($i) use ($id, $travelling) { + $i["travelling"] = false; + $i["system"] = $id; + $i["equestria"] = false; + return $i; + }, json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . (isset($app["other"]) && $id === $app["other"]["id"] ? "other" : $id) . "/members.json"), true))], $id)); + } else { + showMembersFromList(scoreOrder([...array_map(function ($i) use ($id, $travelling) { + $i["travelling"] = false; + $i["system"] = $id; + $i["equestria"] = $travelling[$i['id']]['travelling'] && $travelling[$i['id']]['equestria']; + return $i; + }, array_filter(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . (isset($app["other"]) && $id === $app["other"]["id"] ? "other" : $id) . "/members.json"), true), function ($i) use ($travelling) { + return !(isset($travelling[$i['id']]) && $travelling[$i['id']]['travelling'] && (!isset($travelling[$i['id']]['equestria']) || !$travelling[$i['id']]['equestria'])); + })), ...array_map(function ($i) use ($id) { + $i["travelling"] = true; + $i["system"] = ($id === "gdapd" ? "ynmuc" : "gdapd"); + return $i; + }, array_filter(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . ($id === "gdapd" ? "ynmuc" : "gdapd") . "/members.json"), true), function ($i) use ($travelling) { + return isset($travelling[$i['id']]) && $travelling[$i['id']]['travelling'] && (!isset($travelling[$i['id']]['equestria']) || !$travelling[$i['id']]['equestria']); + }))], $id)); + } echo('
@@ -504,7 +544,7 @@ if (!function_exists("getMemberSystem")) { if (!function_exists("getMemberFromName")) { function getMemberFromName(string $name) { - $list = [...json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/gdapd/members.json"), true), ...json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/ynmuc/members.json"), true)]; + $list = [...json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/gdapd/members.json"), true), ...json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/ynmuc/members.json"), true), ...json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/other/members.json"), true)]; foreach ($list as $item) { if ($item["name"] === $name) return getMemberWithoutSystem($item["id"]); diff --git a/includes/member.inc b/includes/member.inc index 488ff7f..66d0798 100644 --- a/includes/member.inc +++ b/includes/member.inc @@ -1,4 +1,4 @@ - + + (edit: metadata, page) + (edit: metadata, public, private) +
    diff --git a/includes/metadata.inc b/includes/metadata.inc index 2e009cd..10a87ab 100644 --- a/includes/metadata.inc +++ b/includes/metadata.inc @@ -1,4 +1,4 @@ -Relationships +

    Sexfriends (full IDs, comma-separated)
    ">

    +

    Marefriends (full IDs, comma-separated)
    "> @@ -102,11 +104,8 @@ if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/" . $member Caretakers (full IDs, comma-separated)
    ">

    -

    - Age regressed version (local ID)
    - "> -

    +

    Technical details

    @@ -132,6 +131,7 @@ if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/" . $member Age (for ponies with fixed age)
    ">

    +
    @@ -141,7 +141,7 @@ if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/" . $member $flags = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/flags.json"), true); - foreach ($flags as $id => $name): if (!is_array($name) && !is_null($name)): ?> + foreach ($flags as $id => $name): if (!is_array($name) && !is_null($name)): if (($systemID === $app["other"]["id"] && str_starts_with($name, "!!")) || $systemID !== $app["other"]["id"]): ?>
    - +
    - +
    diff --git a/includes/navigation.inc b/includes/navigation.inc index ac40ae6..b888fed 100644 --- a/includes/navigation.inc +++ b/includes/navigation.inc @@ -319,6 +319,75 @@ $navigation_cloudburst = [ ] ] ]; +$navigation_other = [ + "admin" => true, + "name" => $app["other"]["name"], + "icon" => getAsset($app["other"]["id"]), + "invert" => false, + "items" => [ + "header" => [ + "name" => null, + "minimal" => false, + "items" => [ + [ + "name" => $lang["navigation"]["about"], + "icon" => "/assets/icons/about.svg", + "invert" => true, + "link" => "/" . $app["other"]["slug"], + "stepped" => null, + "private" => false + ], + [ + "name" => $pages["s:history"]["name"][$lang["_name"]], + "icon" => "/assets/icons/history.svg", + "invert" => true, + "link" => "/" . $app["other"]["slug"] . "/-/history", + "stepped" => null, + "private" => false + ], + [ + "name" => $pages["s:compare"]["name"][$lang["_name"]], + "icon" => "/assets/icons/compare.svg", + "invert" => true, + "link" => "/" . $app["other"]["slug"] . "/-/compare", + "stepped" => null, + "private" => false + ] + ] + ], + /*"subsystems" => [ + "name" => $lang["navigation"]["subsystems"], + "minimal" => false, + "items" => array_map(function ($subsystem) { + $ssData = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/subsystems/ynmuc-" . $subsystem['source'] . ".json"), true); + + return [ + "name" => $ssData['name'] ?? $subsystem['source'], + "icon" => "/assets/uploads/ss-$subsystem[source].png", + "invert" => false, + "link" => "/cloudburst/-/subsystem/$subsystem[source]", + "stepped" => null + ]; + }, $cloudburst_subsystemsNotMember) + ],*/ + "members" => [ + "name" => $lang["navigation"]["members"], + "minimal" => false, + "items" => array_map(function ($member) { + return [ + "name" => $member['display_name'] ?? $member['name'], + "icon" => getAsset($member["system"], $member["id"], "heads"), + "invert" => false, + "link" => "/$member[name]", + "stepped" => null, + "private" => false + ]; + }, array_filter(scoreOrder(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/other/members.json"), true), $app["other"]["id"]), function ($member) { + return $member['name'] !== "unknown" && $member['name'] !== "fusion" && $member['name'] !== "new"; + })) + ] + ] +]; $navigation_raindrops = [ "admin" => false, "name" => "Raindrops System", @@ -391,10 +460,19 @@ $navigation_raindrops = [ global $parts; -if (isset($parts) && isset($parts[0]) && $parts[0] === "cloudburst") { +if (isset($parts) && isset($parts[0]) && $parts[0] === $app["other"]["slug"]) { + $navigation = [ + "other" => $navigation_other, + "cloudburst" => $navigation_cloudburst, + "raindrops" => $navigation_raindrops, + "admin" => $navigation_admin, + "global" => $navigation_global + ]; +} elseif (isset($parts) && isset($parts[0]) && $parts[0] === "cloudburst") { $navigation = [ "cloudburst" => $navigation_cloudburst, "raindrops" => $navigation_raindrops, + "other" => $navigation_other, "admin" => $navigation_admin, "global" => $navigation_global ]; @@ -402,6 +480,7 @@ if (isset($parts) && isset($parts[0]) && $parts[0] === "cloudburst") { $navigation = [ "raindrops" => $navigation_raindrops, "cloudburst" => $navigation_cloudburst, + "other" => $navigation_other, "admin" => $navigation_admin, "global" => $navigation_global ]; @@ -410,6 +489,7 @@ if (isset($parts) && isset($parts[0]) && $parts[0] === "cloudburst") { "admin" => $navigation_admin, "global" => $navigation_global, "cloudburst" => $navigation_cloudburst, - "raindrops" => $navigation_raindrops + "raindrops" => $navigation_raindrops, + "other" => $navigation_other, ]; } \ No newline at end of file diff --git a/includes/pages.json b/includes/pages.json index eca0fe4..f2326c0 100644 --- a/includes/pages.json +++ b/includes/pages.json @@ -85,8 +85,8 @@ "fr": "Débogage des mises à jour" }, "short": null, - "admin": false, - "limited": false, + "admin": true, + "limited": true, "rail": true }, "docs": { @@ -116,7 +116,7 @@ }, "short": null, "admin": true, - "limited": false, + "limited": true, "rail": false }, "edit-private": { diff --git a/includes/refresh.php b/includes/refresh.php index c4eac83..922e708 100644 --- a/includes/refresh.php +++ b/includes/refresh.php @@ -243,6 +243,10 @@ if (isset($app["other"]) && isset($app["other"]["id"]) && isset($app["other"]["t getSystem($app["other"]["id"], "other", $app["other"]["token"]); } +if (!is_link($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . $app["other"]["id"])) { + link($_SERVER['DOCUMENT_ROOT'] . "/includes/data/other", $_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . $app["other"]["id"]); +} + echo("Calendar\n"); $currentOpStart = microtime(true); file_put_contents("./data/calendar/calendar.ics", file_get_contents($app["calendar"])); diff --git a/includes/score.inc b/includes/score.inc index 96925bf..991c132 100644 --- a/includes/score.inc +++ b/includes/score.inc @@ -60,6 +60,9 @@ function scoreOrder($members, $system) { } function scoreOrderGlobal() { + global $isLowerLoggedIn; + global $isLoggedIn; + $ordered = []; foreach (json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/gdapd/members.json"), true) as $member) { if ($member["name"] !== "unknown" && $member["name"] !== "fusion" && $member["name"] !== "new" && !str_starts_with($member["name"], "smol") && !str_ends_with($member["name"], "-travelling") && file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/$member[id].json")) { @@ -81,6 +84,19 @@ function scoreOrderGlobal() { } } + if ($isLowerLoggedIn || $isLoggedIn) { + $app = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/app.json"), true); + foreach (json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/other/members.json"), true) as $member) { + if ($member["name"] !== "unknown" && $member["name"] !== "fusion" && $member["name"] !== "new" && !str_starts_with($member["name"], "smol") && !str_ends_with($member["name"], "-travelling") && file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/$member[id].json")) { + $member["_system"] = $app["other"]["id"]; + $member["system"] = $app["other"]["id"]; + $member["_metadata"] = parseMetadata(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/$member[id].json"), true)); + $member["_score"] = calculateScore(parseMetadata(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/$member[id].json"), true)), $member["display_name"] ?? $member["name"]); + $ordered[] = $member; + } + } + } + uasort($ordered, function($a, $b) { return $b["_score"]["total"] - $a["_score"]["total"]; }); diff --git a/includes/sysbanner.inc b/includes/sysbanner.inc index d240869..2ca3ee8 100644 --- a/includes/sysbanner.inc +++ b/includes/sysbanner.inc @@ -6,7 +6,7 @@ global $memberID; global $systemCommonName; global $systemID; global $system; -global $lang; global $pages; +global $lang; global $pages; global $app; $travelling = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/travelling/travelling.json"), true); $pages = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/pages.json"), true); @@ -14,7 +14,9 @@ $pages = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/pa ?>
    - +
    + +

    @@ -81,9 +83,13 @@ $pages = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/pa -
    +
    ');background-size: cover;background-position: center; top: 0;">
    diff --git a/includes/system.inc b/includes/system.inc index 85b8a9c..ae624f9 100644 --- a/includes/system.inc +++ b/includes/system.inc @@ -1,8 +1,8 @@ - -
    +
    ');background-size: cover;background-position: center; top: 0;">
    @@ -20,17 +20,21 @@
    - - (edit) -
    - +
    +
    +
    + + (edit: ) + +
    +