From a542c7beec172123100bca3c59a42109ee7e2d08 Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Sat, 27 May 2023 17:43:54 +0200 Subject: Updated 6 files and added assets/logo/celeste.png (automated) --- assets/logo/celeste.png | Bin 0 -> 171762 bytes includes/components/fullbanner.inc | 2 +- includes/flags.json | 3 +- includes/util/banner.inc | 150 +++++-------------------------------- includes/util/homepage.inc | 2 +- includes/util/session.inc | 16 ++-- pages/travelling.inc | 17 ++++- 7 files changed, 47 insertions(+), 143 deletions(-) create mode 100644 assets/logo/celeste.png diff --git a/assets/logo/celeste.png b/assets/logo/celeste.png new file mode 100644 index 0000000..a257553 Binary files /dev/null and b/assets/logo/celeste.png differ diff --git a/includes/components/fullbanner.inc b/includes/components/fullbanner.inc index ddd59df..b8f1f27 100644 --- a/includes/components/fullbanner.inc +++ b/includes/components/fullbanner.inc @@ -22,7 +22,7 @@
- is on a trip to Equestria. . + is on a trip to . .

\ No newline at end of file diff --git a/includes/flags.json b/includes/flags.json index 5fb7a89..9d21e1f 100644 --- a/includes/flags.json +++ b/includes/flags.json @@ -7,7 +7,8 @@ "protector": "!!Protector", "leader": "Leader", - "fictive": "!!Fictive", + "fictive": "!!Fictive (Equestria)", + "fictive2": "Fictive (Celeste)", "sexual_features": "Enable sexual features (for ponies below 16)", "sexually_active": "!!Preemptive sexual consent", "robot": "!!Robot", diff --git a/includes/util/banner.inc b/includes/util/banner.inc index 2a493f8..e30f064 100644 --- a/includes/util/banner.inc +++ b/includes/util/banner.inc @@ -177,7 +177,7 @@ function getMemberBannerData(string $id, string $system, bool $french = false) { if ($travelling[$member['id']]["travelling"] && $travelling[$member['id']]["equestria"]) { $systemData['page'] = null; - $systemData['icon'] = "../logo/equestria.png"; + $systemData['icon'] = "/assets/logo/equestria.png"; $systemData['name'] = "Equestria"; $systemData['full_name'] = "Equestria"; $systemData['temporary'] = true; @@ -288,41 +288,19 @@ function getMemberBannerData(string $id, string $system, bool $french = false) { $badges = []; - if ($metadata["host"] ?? false) { - if (!$travelling[$member['id']]["travelling"]) { - $badges[] = [ - "id" => "mcf", - "color" => "primary", - "html" => ( - $french - ? - 'Fronteuse la plus présente' - : - 'Most common fronter' - ) - ]; - } - } - - /*if (($metadata["age_spells"] ?? false) && !$french) { - $badges[] = [ - "id" => "age_spells", - "color" => "#6f42c1", - "html" => 'Affected by age spells' - ]; - }*/ - if ($metadata["fictive"] ?? false) { $badges[] = [ "id" => "fictive", "color" => "info", - "html" => ( - $french - ? - 'Fictive' - : - 'Fictive' - ) + "html" => ' Fictive' + ]; + } + + if ($metadata["fictive2"] ?? false) { + $badges[] = [ + "id" => "fictive2", + "color" => "d63384", + "html" => ' Fictive' ]; } @@ -330,13 +308,7 @@ function getMemberBannerData(string $id, string $system, bool $french = false) { $badges[] = [ "id" => "persecutor", "color" => "danger", - "html" => ( - $french - ? - 'Persécutrice' - : - 'Persecutor' - ) + "html" => 'Persecutor' ]; } @@ -344,13 +316,7 @@ function getMemberBannerData(string $id, string $system, bool $french = false) { $badges[] = [ "id" => "nonverbal", "color" => "#6610f2", - "html" => ( - $french - ? - 'Fronte moins souvent' - : - 'Fronts less often' - ) + "html" => 'Fronts less often' ]; } @@ -358,21 +324,15 @@ function getMemberBannerData(string $id, string $system, bool $french = false) { $badges[] = [ "id" => "nonverbal", "color" => "#20c997", - "html" => ( - $french - ? - 'Non verbal IRL' - : - 'Non verbal IRL' - ) + "html" => 'Non verbal IRL' ]; } if ($member["name"] === "fusion") { $badges[] = [ "id" => "fusion", - "color" => "d63384", - "html" => 'Fusion' + "color" => "333333", + "html" => 'Fusion' ]; } @@ -380,13 +340,7 @@ function getMemberBannerData(string $id, string $system, bool $french = false) { $badges[] = [ "id" => "leader", "color" => "d6a833", - "html" => ( - $french - ? - 'Dirigeante' - : - 'Leader' - ) + "html" => 'Leader' ]; } @@ -394,13 +348,7 @@ function getMemberBannerData(string $id, string $system, bool $french = false) { $badges[] = [ "id" => "protector", "color" => "black", - "html" => ( - $french - ? - '
' . ucfirst(getMemberPronouns($member['pronouns'])["subjective"]) . ' ' . (getMemberPronouns($member['pronouns'])["third"] ? "is" : "are") . ' a protector in the system and will front when somepony cannot handle it anymore." class="badge rounded-pill bg-black">' . (getMemberPronouns($member['pronouns'])["gender"] === "female" ? "Protectrice" : (getMemberPronouns($member['pronouns'])["gender"] === "male" ? "Protecteur" : "Protectrice")) . '
' - : - 'Protector' - ) + "html" => 'Protector' ]; } @@ -408,13 +356,7 @@ function getMemberBannerData(string $id, string $system, bool $french = false) { $badges[] = [ "id" => "little", "color" => "success", - "html" => ( - $french - ? - '
' . ucfirst(getMemberPronouns($member['pronouns'])["subjective"]) . ' ' . (getMemberPronouns($member['pronouns'])["third"] ? "is" : "are") . ' mentally younger, and therefore behaves and feels younger than the body is." class="badge rounded-pill bg-success">Petit' . (getMemberPronouns($member['pronouns'])["gender"] === "female" ? "e" : (getMemberPronouns($member['pronouns'])["gender"] === "male" ? "" : "·e")) . '
' - : - 'Little' - ) + "html" => 'Little' ]; } @@ -422,67 +364,15 @@ function getMemberBannerData(string $id, string $system, bool $french = false) { $badges[] = [ "id" => "younger", "color" => "dark", - "html" => ( - $french - ? - 'Plus jeune' - : - 'Younger' - ) + "html" => 'Younger' ]; } - if (($metadata["age_regressor"] ?? false)) { - if ($metadata["regression"] !== null && $metadata["regression"] !== false) { - $regression = _header_getMember($metadata["regression"], $system); - $badges[] = [ - "id" => "regressor_median", - "color" => "secondary", - "html" => ( - $french - ? - 'Régresse en âge en '. (getMiniName($regression["display_name"] ?? $regression["name"])) . '' - : - 'Age regresses into '. (getMiniName($regression["display_name"] ?? $regression["name"])) . '' - ) - ]; - } - } - - if ($metadata["median"] !== null && $metadata["median"] !== false) { - $source = _header_getMember($metadata["median"], $system); - if ($metadata["little"] > 0) { - $badges[] = [ - "id" => "regressed", - "color" => "warning", - "html" => ( - $french - ? - 'Régressé en âge de ' . (getMiniName($source["display_name"] ?? $source["name"])) . '' - : - 'Age regressed from ' . (getMiniName($source["display_name"] ?? $source["name"])) . '' - ) - ]; - } else { - $badges[] = [ - "id" => "facet", - "color" => "light", - "html" => ( - $french - ? - 'Facette de ' . getMiniName($source["display_name"] ?? $source["name"]) . '' - : - 'Facet of ' . getMiniName($source["display_name"] ?? $source["name"]) . '' - ) - ]; - } - } - if (($isLoggedIn || $isLowerLoggedIn) && $metadata["alcohol"] !== null && $metadata["alcohol"] !== false) { $badges[] = [ "id" => "alcohol", "color" => "secondary", - "html" => 'Alcohol' + "html" => 'Alcohol' ]; } diff --git a/includes/util/homepage.inc b/includes/util/homepage.inc index ebb99da..3f4520d 100644 --- a/includes/util/homepage.inc +++ b/includes/util/homepage.inc @@ -24,7 +24,7 @@ function newHomepage($id, $page, $title) { - + .png" style="width: 24px; height: 24px; margin-top: 5px;"> " style="width: 24px; height: 24px; margin-top: 5px;"> diff --git a/includes/util/session.inc b/includes/util/session.inc index 63197bb..7554cfa 100644 --- a/includes/util/session.inc +++ b/includes/util/session.inc @@ -40,10 +40,6 @@ if (isset($token)) { if (isset($data["profile"])) { $_PROFILE = $data["profile"]; - $data["last"] = time(); - if (!isset($data["addresses"])) $data["addresses"] = []; - $data["addresses"][$_SERVER["HTTP_X_FORWARDED_FOR"] ?? $_SERVER["REMOTE_ADDR"]] = time(); - file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/tokens/" . str_replace("/", "", $token), json_encode($data)); if (time() - $data["last"] > 86400 * 30) { unlink($_SERVER['DOCUMENT_ROOT'] . "/includes/tokens/" . str_replace("/", "", $token)); @@ -51,6 +47,11 @@ if (isset($token)) { $isLoggedIn = false; $isLowerLoggedIn = false; } + + $data["last"] = time(); + if (!isset($data["addresses"])) $data["addresses"] = []; + $data["addresses"][$_SERVER["HTTP_X_FORWARDED_FOR"] ?? $_SERVER["REMOTE_ADDR"]] = time(); + file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/tokens/" . str_replace("/", "", $token), json_encode($data)); } else { $_PROFILE = $data; } @@ -66,9 +67,6 @@ if (isset($token)) { if (isset($data["profile"])) { $_PROFILE = $data["profile"]; - $data["last"] = time(); - $data["addresses"][$_SERVER["HTTP_X_FORWARDED_FOR"] ?? $_SERVER["REMOTE_ADDR"]] = time(); - file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/tokens/" . str_replace("/", "", $token), json_encode($data)); if (time() - $data["last"] > 86400 * 30) { unlink($_SERVER['DOCUMENT_ROOT'] . "/includes/tokens/" . str_replace("/", "", $token)); @@ -76,6 +74,10 @@ if (isset($token)) { $isLoggedIn = false; $isLowerLoggedIn = false; } + + $data["last"] = time(); + $data["addresses"][$_SERVER["HTTP_X_FORWARDED_FOR"] ?? $_SERVER["REMOTE_ADDR"]] = time(); + file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/tokens/" . str_replace("/", "", $token), json_encode($data)); } else { $_PROFILE = $data; } diff --git a/pages/travelling.inc b/pages/travelling.inc index 9eadaed..ee2e2c3 100644 --- a/pages/travelling.inc +++ b/pages/travelling.inc @@ -129,10 +129,13 @@ global $travelling; ...array_values(array_filter(scoreOrderGlobal(), function ($i) use ($travelling) { return $travelling[$i['id']]["travelling"] && ($i["_system"] === "gdapd" || $i["_system"] === "ynmuc"); })), + "SEPARATOR", ...array_values(array_filter(scoreOrderGlobal(), function ($i) use ($travelling) { return !$travelling[$i['id']]["travelling"] && ($i["_system"] === "gdapd" || $i["_system"] === "ynmuc"); })) - ] as $member): ?> + ] as $member): if (is_string($member)): ?> +
+ - +