summaryrefslogtreecommitdiff
path: root/includes/fragments
diff options
context:
space:
mode:
authorRaindropsSys <contact@minteck.org>2023-03-21 16:21:21 +0100
committerRaindropsSys <contact@minteck.org>2023-03-21 16:21:21 +0100
commit475c5731bf3362b6ac8d2dc5d5b43e4b4a6117bd (patch)
tree2cff46debf9c1e13892e7babff9deb6874ecb4b2 /includes/fragments
parent7ccc2de87f9e25c715dc09b9aba4eb5c66f80424 (diff)
downloadpluralconnect-475c5731bf3362b6ac8d2dc5d5b43e4b4a6117bd.tar.gz
pluralconnect-475c5731bf3362b6ac8d2dc5d5b43e4b4a6117bd.tar.bz2
pluralconnect-475c5731bf3362b6ac8d2dc5d5b43e4b4a6117bd.zip
Updated 26 files and added 1074 files (automated)
Diffstat (limited to 'includes/fragments')
-rw-r--r--includes/fragments/member.inc22
-rw-r--r--includes/fragments/metadata.inc14
2 files changed, 28 insertions, 8 deletions
diff --git a/includes/fragments/member.inc b/includes/fragments/member.inc
index bbdfc98..1d9530c 100644
--- a/includes/fragments/member.inc
+++ b/includes/fragments/member.inc
@@ -48,6 +48,11 @@ if ($memberData["name"] === "fusion") {
window.onscroll = () => {
document.getElementById("member-banner-container").style.height = (<?= !isset($memberData["banner"]) ? "33" : "65" ?> - ((window.scrollY / window.screen.availHeight) * 100)) + "vh";
}
+
+ function showPrivate() {
+ document.getElementById("private-page-link").style.display = "none";
+ document.getElementById("private-page-hidden").style.display = "block";
+ }
</script>
<br>
@@ -84,7 +89,22 @@ if ($memberData["name"] === "fusion") {
<?php else: ?>
<?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") ?>
+ <?php
+
+ $text = file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/content/$memberID-private.html");
+ $censor = false;
+
+ if (str_contains(strtolower($text), "sex") || str_contains(strtolower($text), "nsfw") || str_contains(strtolower($text), "pleasure") || str_contains(strtolower($text), "dildo") || str_contains(strtolower($text), "dick") || str_contains(strtolower($text), "penis") || str_contains(strtolower($text), "vagina") || str_contains(strtolower($text), "pussy")) {
+ $censor = true;
+ }
+
+ if ($censor) {
+ echo("<a href='#' id='private-page-link' onclick='showPrivate();'>Show private page (NSFW)</a><div id='private-page-hidden' style='display: none;'>" . $text . "</div>");
+ } else {
+ echo($text);
+ }
+
+ ?>
<?php if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/content/$memberID.html")): ?><hr><?php endif; ?>
<?php endif; ?>
diff --git a/includes/fragments/metadata.inc b/includes/fragments/metadata.inc
index 4d13bb7..7a3779a 100644
--- a/includes/fragments/metadata.inc
+++ b/includes/fragments/metadata.inc
@@ -131,11 +131,11 @@ if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/" . $member
<h3>Age information</h3>
<p>
- <b>Birth date (use January 1<sup>st</sup> for none)</b><br>
+ <b>Birth date (use January 1<sup>st</sup> for none, fixed age takes priority over birth year if applicable)</b><br>
<input name="birth" class="form-control" style="filter: invert(1) hue-rotate(180deg);" type="date" value="<?= $metadata["birth"]["year"] ?? "" ?>-<?= $metadata["birth"]["date"] ?? "" ?>">
</p>
<p>
- <b>Age (for ponies with fixed age)</b><br>
+ <b>Age (for ponies with fixed age, takes priority over birth year)</b><br>
<input name="age" class="form-control" style="filter: invert(1) hue-rotate(180deg);" type="text" pattern="^(-\d{1,2}|\d{1,2}(-\d{1,2}|))$" value="<?= $metadata["birth"]["age"] ?? "" ?>">
</p>
@@ -147,17 +147,17 @@ 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)): if (($systemID === $app["other"]["id"] && str_starts_with($name, "!!")) || $systemID !== $app["other"]["id"]): ?>
+ 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"] && str_starts_with($name, "#")) || ($systemID !== $app["other"]["id"] && !str_starts_with($name, "#"))): ?>
<label style="margin-bottom:5px;">
<input <?= $metadata[$id] ? "checked" : "" ?> class="form-check-input" type="checkbox" name="flags[<?= $id ?>]">
- <?= str_starts_with($name, "!!") ? substr($name, 2) : $name ?>
+ <?= str_replace("%other%", $app["other"]["name"], str_starts_with($name, "!!") ? substr($name, 2) : (str_starts_with($name, "#") ? substr($name, 1) : $name)) ?>
</label><br>
- <?php else: foreach ($name as $id2 => $name2): ?>
+ <?php endif; else: foreach ($name as $id2 => $name2): if (!is_array($name2) && !is_null($name2)): if (($systemID === $app["other"]["id"] && str_starts_with($name2, "!!")) || ($systemID !== $app["other"]["id"] && !str_starts_with($name2, "#"))): ?>
<label style="margin-bottom:5px;">
<input <?= $metadata[$id][$id2] ? "checked" : "" ?> class="form-check-input" type="checkbox" name="flags[<?= $id ?>][<?= $id2 ?>]">
- <?= str_starts_with($name2, "!!") ? substr($name2, 2) : $name2 ?>
+ <?= str_replace("%other%", $app["other"]["name"], str_starts_with($name2, "!!") ? substr($name2, 2) : $name2) ?>
</label><br>
- <?php endforeach; endif; endif; endforeach; ?>
+ <?php endif; endif; endforeach; endif; endforeach; ?>
<hr>