summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2023-02-06 22:53:06 +0100
committerMinteck <contact@minteck.org>2023-02-06 22:53:06 +0100
commita0b85ee44c07ac7ffd3f69227069e8835f0f2730 (patch)
tree4edc61c5a642915b55b8f9a12b4213dd5fca4339 /includes
parentabd342282b48d742cca1740f76d220037fd13800 (diff)
downloadpluralconnect-a0b85ee44c07ac7ffd3f69227069e8835f0f2730.tar.gz
pluralconnect-a0b85ee44c07ac7ffd3f69227069e8835f0f2730.tar.bz2
pluralconnect-a0b85ee44c07ac7ffd3f69227069e8835f0f2730.zip
Updated 9 files and added assets/uploads/pt-pinkiepie.png (automated)
Diffstat (limited to 'includes')
-rw-r--r--includes/fullbanner.inc1
-rw-r--r--includes/member.inc154
-rw-r--r--includes/navigation.inc8
-rw-r--r--includes/search.inc2
4 files changed, 86 insertions, 79 deletions
diff --git a/includes/fullbanner.inc b/includes/fullbanner.inc
index 30bdf3e..b5a05b1 100644
--- a/includes/fullbanner.inc
+++ b/includes/fullbanner.inc
@@ -12,7 +12,6 @@
<?php endif; ?>
<script src="/assets/logo/banner.js"></script><script>refreshBanner(false, <?= $lang["_french"] ? "true" : "false" ?>)</script>
-<br>
<?php global $isLoggedIn; if ($isLoggedIn && $memberData["name"] !== "unknown" && $memberData["name"] !== "fusion"): ?>
<?php if (!isset($metadata["bitset"])): ?>
diff --git a/includes/member.inc b/includes/member.inc
index e984861..488ff7f 100644
--- a/includes/member.inc
+++ b/includes/member.inc
@@ -39,23 +39,24 @@ if ($memberData["name"] === "fusion") {
?>
-<div id="member-banner-container" style="width: calc(100% - 300px);height: 65vh;position: fixed;background-image: url('<?= getAsset($systemID, $memberID, "banners") ?>');background-size: cover;background-position: center; top: 0;">
- <div id="member-banner-inner" style="height: 100%;width: 100%;background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.25) 50%, rgba(0,0,0,1) 100%);"></div>
+<div id="member-banner-container" style="width: calc(100% - 300px);height: <?= !isset($memberData["banner"]) ? "33vh" : "65vh" ?>;position: fixed;background-image: url('<?= getAsset($systemID, $memberID, !isset($memberData["banner"]) ? "avatars" : "banners") ?>');background-size: cover;background-position: center; top: 0;">
+ <div id="member-banner-inner" style="height: 100%;width: 100%;background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.25) 50%, rgba(0,0,0,1) 100%);<?= !isset($memberData["banner"]) ? "backdrop-filter:blur(100px);" : "" ?>"></div>
</div>
<script>
window.onscroll = () => {
- document.getElementById("member-banner-container").style.height = (65 - ((window.scrollY / window.screen.availHeight) * 100)) + "vh";
+ document.getElementById("member-banner-container").style.height = (<?= !isset($memberData["banner"]) ? "33" : "65" ?> - ((window.scrollY / window.screen.availHeight) * 100)) + "vh";
}
</script>
<br>
<div class="container">
- <div id="member-page" style="background-color: rgba(26,26,26,0.8);border-radius: 10px;padding:20px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);margin-top:30vh;">
+ <div id="member-page" style="background-color: rgba(26,26,26,0.8);border-radius: 10px;padding:20px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);margin-top:<?= !isset($memberData["banner"]) ? "15vh" : "30vh" ?>;<?php if (!file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/content/$memberID.html") && !($isLoggedIn && file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/content/$memberID-private.html"))): ?> padding-bottom: 0 !important;<?php endif; ?>">
<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/fullbanner.inc"; ?>
<div id="page-content">
<?php if ($memberData["name"] === "unknown"): ?>
+ <br>
<div class="alert alert-secondary">
<p><?= $lang["member"]["unknown"][0] ?></p>
<p><?= $lang["member"]["unknown"][1] ?></p>
@@ -63,6 +64,7 @@ if ($memberData["name"] === "fusion") {
<span><?= $lang["member"]["unknown"][3] ?></span>
</div>
<?php elseif ($memberData["name"] === "fusion"): ?>
+ <br>
<div class="alert alert-secondary">
<p><?= $lang["member"]["fusion"][0] ?></p>
<p><?= $lang["member"]["fusion"][1] ?></p>
@@ -77,80 +79,14 @@ if ($memberData["name"] === "fusion") {
<?php endif; ?>
</div>
<?php else: ?>
- <?php global $isLoggedIn; if ($isLoggedIn): ?>
- <details>
- <summary style="list-style: none;">
- <small style="opacity:.5;display:block;">(edit: <a href="/-/metadata/<?= $system ?>/<?= $memberData['name'] ?>">metadata</a>, <a href="/-/edit/<?= $system ?>/<?= $memberData['name'] ?>">public</a>, <a href="/-/edit-private/<?= $system ?>/<?= $memberData['name'] ?>">private</a>)</small>
- </summary>
- <div class="alert alert-dark">
- <ul style="margin-bottom:0;">
- <li><b>ID:</b> <code><?= $memberID ?></code> (<code><?= $systemID . "/" . $memberID ?></code>, <?= $memberData["name"] ?>)</li>
- <li><b>Files:</b>
- <ul>
- <li><code><?= $_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/$memberID.json" ?></code> (<?= file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/$memberID.json") ? filesize($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/$memberID.json") . " bytes" : "not found" ?>)</li>
- <li><code><?= $_SERVER['DOCUMENT_ROOT'] . "/includes/data/content/$memberID.html" ?></code> (<?= file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/content/$memberID.html") ? filesize($_SERVER['DOCUMENT_ROOT'] . "/includes/data/content/$memberID.html") . " bytes" : "not found" ?>)</li>
- <li><code><?= $_SERVER['DOCUMENT_ROOT'] . "/includes/data/content/$memberID-private.html" ?></code> (<?= file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/content/$memberID-private.html") ? filesize($_SERVER['DOCUMENT_ROOT'] . "/includes/data/content/$memberID-private.html") . " bytes" : "not found" ?>)</li>
- </ul>
- </li>
- <li><b>Date added:</b> <?= date('l j F Y', strtotime($memberData["created"])) ?> (<?= timeAgo($memberData["created"]) ?>, <code><?= $memberData["created"] ?></code>)</li>
- <li><b>Pronouns:</b> <?= implode(", ", getPronounsFromMark($memberData['pronouns'])) ?></li>
- <li><b>Pronouns usage:</b> <ul><?php
-
- foreach (getMemberPronouns($memberData['pronouns']) as $type => $usage) {
- if (is_string($usage) && $type !== "color") {
- echo("<li><b>" . $type . ":</b> " . $usage . "</li>");
- }
- }
-
- ?></ul></li>
- <li><b>Color:</b> <span style="border:1px solid rgba(255, 255, 255, .5);background-color:#<?= $memberData["color"] ?? "ffffff" ?>;display:inline-block;width:16px;height:16px;border-radius:5px;vertical-align: middle;filter: invert(1) hue-rotate(180deg);"></span> <span style="vertical-align: middle;"><code>#<?= $memberData["color"] ?? "ffffff" ?></code></span>
- <li><b>Bitset:</b><?php if (isset($metadata["bitset"])): ?> <code><?= str_repeat("0", 48 - strlen(decbin($metadata["bitset"]))) . decbin($metadata["bitset"]) ?></code> (0x<?= str_repeat("0", 12 - strlen(dechex($metadata["bitset"]))) . dechex($metadata["bitset"]) ?>, <?= $metadata["bitset"] ?>)</li><?php else: ?> <span class="text-warning" style="filter:invert(1) hue-rotate(180deg);">Not using bitset; please update.</span><?php endif; ?>
- <li><b>Reduced name:</b> <?= getMiniName($memberData["display_name"] ?? $member["name"]) ?></li>
- <li><b>Shared memory access:</b> <code><?= $metadata["shared_memory"] ?></code> (<?= $metadata["shared_memory"] === 2 ? "Full direct access" : ($metadata["shared_memory"] === 0 ? "No direct access" : "Partial direct access") ?>)</li>
- <li><b>Protector:</b> <code><?= $metadata["protector"] ? "1" : "0" ?></code> (<?= $metadata["protector"] ? "Yes" : "No" ?>)</li>
- <li><b>Little:</b> <code><?= $metadata["little"] ?></code> (<?= $metadata["little"] === 2 ? "Is a little" : ($metadata["little"] === 1 ? "Is an age regressor" : ($metadata["little"] === 3 ? "Not a little, but younger" : "No")) ?>)</li>
- <li><b>Relations count:</b> <code><?= count($metadata["marefriends"]) + count($metadata["sisters"]) ?></code></li>
- <?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><?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>");
- }
- }
-
- ?></ul></li>
- </ul>
- </div>
- </details>
- <?php endif; ?>
-
<?php if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/content/$memberID-private.html") && $isLoggedIn): ?>
+ <br>
<?= file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/content/$memberID-private.html") ?>
- <hr>
+ <?php if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/content/$memberID.html")): ?><hr><?php endif; ?>
<?php endif; ?>
<?php if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/content/$memberID.html")): ?>
+ <?php if (!$isLoggedIn || !file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/content/$memberID-private.html")) echo("<br>"); ?>
<?= file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/content/$memberID.html") ?>
<?php endif; ?>
<?php endif; ?>
@@ -158,4 +94,76 @@ if ($memberData["name"] === "fusion") {
</div>
</div>
+<div class="container">
+ <?php global $isLoggedIn; if ($isLoggedIn): ?>
+ <hr>
+
+ <details>
+ <summary style="list-style: none;">
+ <small style="opacity:.5;display:block;">(edit: <a href="/-/metadata/<?= $system ?>/<?= $memberData['name'] ?>">metadata</a>, <a href="/-/edit/<?= $system ?>/<?= $memberData['name'] ?>">public</a>, <a href="/-/edit-private/<?= $system ?>/<?= $memberData['name'] ?>">private</a>)</small>
+ </summary>
+ <div class="alert alert-dark">
+ <ul style="margin-bottom:0;">
+ <li><b>ID:</b> <code><?= $memberID ?></code> (<code><?= $systemID . "/" . $memberID ?></code>, <?= $memberData["name"] ?>)</li>
+ <li><b>Files:</b>
+ <ul>
+ <li><code><?= $_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/$memberID.json" ?></code> (<?= file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/$memberID.json") ? filesize($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/$memberID.json") . " bytes" : "not found" ?>)</li>
+ <li><code><?= $_SERVER['DOCUMENT_ROOT'] . "/includes/data/content/$memberID.html" ?></code> (<?= file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/content/$memberID.html") ? filesize($_SERVER['DOCUMENT_ROOT'] . "/includes/data/content/$memberID.html") . " bytes" : "not found" ?>)</li>
+ <li><code><?= $_SERVER['DOCUMENT_ROOT'] . "/includes/data/content/$memberID-private.html" ?></code> (<?= file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/content/$memberID-private.html") ? filesize($_SERVER['DOCUMENT_ROOT'] . "/includes/data/content/$memberID-private.html") . " bytes" : "not found" ?>)</li>
+ </ul>
+ </li>
+ <li><b>Date added:</b> <?= date('l j F Y', strtotime($memberData["created"])) ?> (<?= timeAgo($memberData["created"]) ?>, <code><?= $memberData["created"] ?></code>)</li>
+ <li><b>Pronouns:</b> <?= implode(", ", getPronounsFromMark($memberData['pronouns'])) ?></li>
+ <li><b>Pronouns usage:</b> <ul><?php
+
+ foreach (getMemberPronouns($memberData['pronouns']) as $type => $usage) {
+ if (is_string($usage) && $type !== "color") {
+ echo("<li><b>" . $type . ":</b> " . $usage . "</li>");
+ }
+ }
+
+ ?></ul></li>
+ <li><b>Color:</b> <span style="border:1px solid rgba(255, 255, 255, .5);background-color:#<?= $memberData["color"] ?? "ffffff" ?>;display:inline-block;width:16px;height:16px;border-radius:5px;vertical-align: middle;filter: invert(1) hue-rotate(180deg);"></span> <span style="vertical-align: middle;"><code>#<?= $memberData["color"] ?? "ffffff" ?></code></span>
+ <li><b>Bitset:</b><?php if (isset($metadata["bitset"])): ?> <code><?= str_repeat("0", 48 - strlen(decbin($metadata["bitset"]))) . decbin($metadata["bitset"]) ?></code> (0x<?= str_repeat("0", 12 - strlen(dechex($metadata["bitset"]))) . dechex($metadata["bitset"]) ?>, <?= $metadata["bitset"] ?>)</li><?php else: ?> <span class="text-warning" style="filter:invert(1) hue-rotate(180deg);">Not using bitset; please update.</span><?php endif; ?>
+ <li><b>Reduced name:</b> <?= getMiniName($memberData["display_name"] ?? $member["name"]) ?></li>
+ <li><b>Shared memory access:</b> <code><?= $metadata["shared_memory"] ?></code> (<?= $metadata["shared_memory"] === 2 ? "Full direct access" : ($metadata["shared_memory"] === 0 ? "No direct access" : "Partial direct access") ?>)</li>
+ <li><b>Protector:</b> <code><?= $metadata["protector"] ? "1" : "0" ?></code> (<?= $metadata["protector"] ? "Yes" : "No" ?>)</li>
+ <li><b>Little:</b> <code><?= $metadata["little"] ?></code> (<?= $metadata["little"] === 2 ? "Is a little" : ($metadata["little"] === 1 ? "Is an age regressor" : ($metadata["little"] === 3 ? "Not a little, but younger" : "No")) ?>)</li>
+ <li><b>Relations count:</b> <code><?= count($metadata["marefriends"]) + count($metadata["sisters"]) ?></code></li>
+ <?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><?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>");
+ }
+ }
+
+ ?></ul></li>
+ </ul>
+ </div>
+ </details>
+ <?php endif; ?>
+</div>
+
<?php require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/footer.inc'; ?> \ No newline at end of file
diff --git a/includes/navigation.inc b/includes/navigation.inc
index 3db5d21..b61c069 100644
--- a/includes/navigation.inc
+++ b/includes/navigation.inc
@@ -270,7 +270,7 @@ $navigation_cloudburst = [
]
]
],
- "subsystems" => [
+ /*"subsystems" => [
"name" => $lang["navigation"]["subsystems"],
"minimal" => false,
"items" => array_map(function ($subsystem) {
@@ -284,7 +284,7 @@ $navigation_cloudburst = [
"stepped" => null
];
}, $cloudburst_subsystemsNotMember)
- ],
+ ],*/
"members" => [
"name" => $lang["navigation"]["members"],
"minimal" => false,
@@ -342,7 +342,7 @@ $navigation_raindrops = [
]
]
],
- "subsystems" => [
+ /*"subsystems" => [
"name" => $lang["navigation"]["subsystems"],
"minimal" => false,
"items" => array_map(function ($subsystem) {
@@ -356,7 +356,7 @@ $navigation_raindrops = [
"stepped" => null
];
}, $raindrops_subsystemsNotMember)
- ],
+ ],*/
"members" => [
"name" => $lang["navigation"]["members"],
"minimal" => false,
diff --git a/includes/search.inc b/includes/search.inc
index c125556..0f0a868 100644
--- a/includes/search.inc
+++ b/includes/search.inc
@@ -8,7 +8,7 @@
<div id="global-search-results" style="border-bottom-left-radius: 15px; border-bottom-right-radius: 15px; border-top-style: none; border-right: 1px solid rgba(100, 100, 100, .5); border-bottom: 1px solid rgba(100, 100, 100, .5); border-left: 1px solid rgba(100, 100, 100, .5); width: 768px; max-width: 90vw; height: 400px; max-height: calc(90vh - 60px);">
<div id="global-search-intro" style="display: flex; align-items: center; justify-content: center; height: 100%; text-align: center;">
<div style="opacity: .5;">
- <img src="/assets/logo/logo.png" style="width: 64px; height: 64px; margin-bottom: 10px;">
+ <img src="/assets/logo/newlogo.png" style="width: 64px; height: 64px; margin-bottom: 10px;">
<p><?= $lang["search"]["placeholder"] ?></p>
</div>
</div>