diff options
author | Minteck <contact@minteck.org> | 2022-12-10 22:27:08 +0100 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2022-12-10 22:27:08 +0100 |
commit | 30303a3ad0d0f31d93c25f42bfd10d70e8277b72 (patch) | |
tree | 622964e7895c759232aff28230394aa5cc747be9 /includes/fullbanner.inc | |
parent | f850a8a53efd719fef6c8784c5af7b89dd9a6a2f (diff) | |
download | pluralconnect-30303a3ad0d0f31d93c25f42bfd10d70e8277b72.tar.gz pluralconnect-30303a3ad0d0f31d93c25f42bfd10d70e8277b72.tar.bz2 pluralconnect-30303a3ad0d0f31d93c25f42bfd10d70e8277b72.zip |
Update
Diffstat (limited to 'includes/fullbanner.inc')
-rw-r--r-- | includes/fullbanner.inc | 55 |
1 files changed, 24 insertions, 31 deletions
diff --git a/includes/fullbanner.inc b/includes/fullbanner.inc index 1c449d3..24e0295 100644 --- a/includes/fullbanner.inc +++ b/includes/fullbanner.inc @@ -1,4 +1,4 @@ -<?php global $memberData; global $memberID; global $systemID; global $metadata; global $travelling; global $systemCommonName; global $member; ?> +<?php global $memberData; global $memberID; global $systemID; global $metadata; global $travelling; global $systemCommonName; global $member; global $lang; global $pages; ?> <script> window.currentMemberData = JSON.parse(atob(`<?= base64_encode(json_encode(getMemberBannerData($memberID, $systemID, false))) ?>`)); </script> @@ -11,7 +11,7 @@ <div id="member-banner"></div> <?php endif; ?> -<script src="/app/banner.js"></script><script>refreshBanner(false)</script> +<script src="/app/banner.js"></script><script>refreshBanner(false, <?= $lang["_french"] ? "true" : "false" ?>)</script> <br> <?php global $isLoggedIn; if ($isLoggedIn && $memberData["name"] !== "unknown" && $memberData["name"] !== "fusion"): ?> @@ -53,24 +53,27 @@ <?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/score.inc"; $score = calculateScore($metadata, $memberData["display_name"] ?? $memberData["name"]); ?> <li> <b>Score breakdown:</b> <code><?= $score["total"] ?></code> - <ul> - <li><b>Most common fronter score:</b> <code><?= $score["host"] ?></code></li> - <li><b>Relationships score:</b> <code><?= $score["relations"] ?></code></li> - <li><b>Fictive score:</b> <code><?= $score["fictive"] ?></code></li> - <li><b>Median score:</b> <code><?= $score["median"] ?></code></li> - <li><b>Species score:</b> <code><?= $score["species"] ?></code></li> - <li><b>Little score:</b> <code><?= $score["little"] ?></code></li> - <li><b>Not talking score:</b> <code><?= $score["not_talking"] ?></code></li> - <li><b>Protector score:</b> <code><?= $score["protector"] ?></code></li> - <li><b>Name score:</b> <code><?= $score["name"] ?></code></li> - <li><b>Shared memory score:</b> <code><?= $score["shared_memory"] ?></code></li> - </ul> - </li> - <li><b>Full metadata:</b> <ul><?php + <ul><?php foreach ($metadata as $type => $usage) { if (is_string($usage)) { echo("<li><b>" . $type . ":</b> " . $usage . "</li>"); + } else if (is_array($usage)) { + if (count($usage) === 0) { + echo("<li><b>" . $type . ":</b> []</li>"); + } else { + echo("<li><b>" . $type . ":</b><ul>"); + + foreach ($usage as $key => $item) { + if (is_string($item)) { + echo("<li><b>" . $key . ":</b> " . $item . "</li>"); + } else { + echo("<li><b>" . $key . ":</b> " . json_encode($item, JSON_UNESCAPED_SLASHES) . "</li>"); + } + } + + echo("</ul></li>"); + } } else { echo("<li><b>" . $type . ":</b> " . json_encode($usage, JSON_UNESCAPED_SLASHES) . "</li>"); } @@ -78,25 +81,15 @@ ?></ul></li> </ul> - - <br> - <div style="filter:invert(0);" class="alert alert-warning"> - <b>AI-generated page:</b> - <?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/ai.inc"; ?> - </div> </details> </div> <?php endif; ?> -<?php if ($travelling[$memberID]['travelling']): ?> +<?php if ($travelling[$memberID]['travelling'] && !$travelling[$memberID]['equestria']): ?> <div class="alert alert-primary"> - <?= getMiniName($memberData["display_name"] ?? $memberData["name"]) ?> is visiting the <?= $systemID === "ynmuc" ? "Raindrops System" : "Cloudburst System" ?>, therefore <?= getMemberPronouns($memberData["pronouns"])["subjective"] ?> <?= getMemberPronouns($memberData["pronouns"])["third"] ? "is" : "are" ?> currently not in the <?= $systemCommonName ?>. + <?= getMiniName($memberData["display_name"] ?? $memberData["name"]) ?> <?= $lang["fullbanner"]["visit"][0] ?> <?= $systemID === "ynmuc" ? "Raindrops System" : "Cloudburst System" ?><?= str_replace("%1", getMemberPronouns($memberData["pronouns"])["subjective"], str_replace("%2", getMemberPronouns($memberData["pronouns"])["third"] ? "is" : "are", $lang["fullbanner"]["visit"][1])) ?><?= $systemCommonName ?>. </div> -<?php endif; ?> -<?php if ($memberData["name"] === "new"): ?> - <div class="alert alert-secondary"> - <p>Hello there!</p> - <p>I'm currently a new headmate slowly figuring myself out.</p> - <p>Give me some time to figure myself out and see this page change as I find new stuff about my identity. Don't be too worried if I accidentally get pushed to front, it's something that can happen sometimes.</p> - <span>Thanks!</span> +<?php elseif ($travelling[$memberID]['travelling'] && $travelling[$memberID]['equestria']): ?> + <div class="alert alert-primary"> + <?= getMiniName($memberData["display_name"] ?? $memberData["name"]) ?> is on a trip to Equestria. <?= str_replace("%1", getMemberPronouns($memberData["pronouns"])["subjective"], str_replace("%2", getMemberPronouns($memberData["pronouns"])["third"] ? "is" : "are", "Therefore %1 %2 currently not in the ")) ?><?= $systemCommonName ?>. </div> <?php endif; ?>
\ No newline at end of file |