summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--assets/logo/banner.js2
-rw-r--r--includes/details.inc6
-rw-r--r--includes/fullbanner.inc10
-rw-r--r--includes/functions.inc21
-rw-r--r--includes/member.inc14
-rw-r--r--includes/metadata.inc2
-rw-r--r--pages/api/raindrops-img-round.php76
-rw-r--r--pages/api/raindrops-img2-round.php76
-rw-r--r--pages/home.inc2
-rw-r--r--pages/page.inc2
10 files changed, 31 insertions, 180 deletions
diff --git a/assets/logo/banner.js b/assets/logo/banner.js
index 215bcc7..38a88aa 100644
--- a/assets/logo/banner.js
+++ b/assets/logo/banner.js
@@ -86,7 +86,7 @@ async function refreshBanner(_, french) {
<img id="member-icon-mobile" src="${offline ? JSON.parse(await localforage.getItem("images")).profile[data['icon']['offline'].split(".")[0].split("-")[1]][data['icon']['offline'].split(".")[0].split("-")[2]] : (data['icon']['online'] ?? (data['id'] === "fusion" ? '/assets/logo/logo.png' : data['system']['icon']))}" alt="" style="background-color:rgba(255, 255, 255, .125);width:36px;height:36px;border-radius:999px;display:none;margin-right:5px;">
<span style="vertical-align: middle;">
${data['id'] === "unknown" ? `
- <span class="text-muted">${french ? "Membre inconnu" : "Unknown member"} (${data['system']['name']} System)</span>
+ <span class="text-muted">${french ? "Membre inconnu" : "Unknown member"} (${data['system']['name']})</span>
` : data['id'] === "fusion" ? (data['name'] === "fusion" ? `
<span class="text-muted">${french ? "Plusieurs membres fusionnés" : "Multiple merged members"}</span>
` : data['name']) : data['name']}
diff --git a/includes/details.inc b/includes/details.inc
index ce1add6..415e313 100644
--- a/includes/details.inc
+++ b/includes/details.inc
@@ -112,6 +112,9 @@
case "pan":
echo "Pansexual";
break;
+ case "poly":
+ echo "Polysexual";
+ break;
} ?><?php if ($metadata["polyamorous"]["sexual"]): ?> (poly)<?php endif; ?>
</div>
<?php else: ?>
@@ -142,6 +145,9 @@
case "pan":
echo "Panromantic";
break;
+ case "poly":
+ echo "Polyromantic";
+ break;
} ?><?php if ($metadata["polyamorous"]["romantic"]): ?> (poly)<?php endif; ?>
</div>
<?php if ($systemID !== $app["other"]["id"]): ?>
diff --git a/includes/fullbanner.inc b/includes/fullbanner.inc
index f6741c9..4f78101 100644
--- a/includes/fullbanner.inc
+++ b/includes/fullbanner.inc
@@ -1,6 +1,6 @@
<?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))) ?>`));
+ window.currentMemberData = JSON.parse(atob(`<?= base64_encode(json_encode(getMemberBannerData($memberID, $systemID))) ?>`));
</script>
<?php if ($memberData["name"] !== "unknown" && $memberData["name"] !== "fusion"): ?>
<div id="member-banner-container">
@@ -14,11 +14,15 @@
<script src="/assets/logo/banner.js"></script><script>refreshBanner(false, <?= $lang["_french"] ? "true" : "false" ?>)</script>
<?php if ($travelling[$memberID]['travelling'] && !$travelling[$memberID]['equestria']): ?>
- <div class="alert alert-primary">
+ <br>
+ <div class="alert alert-primary" style="margin-bottom: 0 !important;">
<?= 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>
+ <br>
<?php elseif ($travelling[$memberID]['travelling'] && $travelling[$memberID]['equestria']): ?>
- <div class="alert alert-primary">
+ <br>
+ <div class="alert alert-primary" style="margin-bottom: 0 !important;">
<?= 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>
+ <br>
<?php endif; ?> \ No newline at end of file
diff --git a/includes/functions.inc b/includes/functions.inc
index 5effe5b..7a6ad5d 100644
--- a/includes/functions.inc
+++ b/includes/functions.inc
@@ -388,25 +388,19 @@ if (!function_exists("timeAgo")) {
$time = strtotime($time);
}
- $periods = ["sec.", "mn.", "hr.", "d.", "wk.", "mo.", "y.", "ages"];
- $periods_fr = ["sec.", "mn.", "hr.", "j.", "sem.", "m.", "a.", "des années"];
+ $periods = ["sec", "min", "hr", "d", "wk", "mo", "y", "ages"];
+ $periods_fr = $periods;
$lengths = array("60", "60", "24", "7", "4.35", "12", "100");
$now = time();
$difference = $now - $time;
if ($difference <= 10 && $difference >= 0) {
- if ($french) {
- return $tense_fr = "à l'instant";
- } else {
- return $tense = "now";
- }
+ return $tense = "now";
} elseif ($difference > 0) {
$tense = "ago";
- $tense_fr = "il y a";
} else {
$tense = "later";
- $tense_fr = "dans";
}
for ($j = 0; $difference >= $lengths[$j] && $j < count($lengths)-1; $j++) {
@@ -415,13 +409,8 @@ if (!function_exists("timeAgo")) {
$difference = round($difference);
- if ($french) {
- $period = $periods_fr[$j];
- return "{$tense_fr} {$difference} {$period}";
- } else {
- $period = $periods[$j];
- return "{$difference} {$period} {$tense}";
- }
+ $period = $periods[$j];
+ return "{$difference} {$period} {$tense}";
}
}
diff --git a/includes/member.inc b/includes/member.inc
index 66d0798..5292dc1 100644
--- a/includes/member.inc
+++ b/includes/member.inc
@@ -58,15 +58,16 @@ if ($memberData["name"] === "fusion") {
<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>
- <p><?= $lang["member"]["unknown"][2] ?></p>
- <span><?= $lang["member"]["unknown"][3] ?></span>
+ <div class="alert alert-secondary" style="margin-bottom: 0 !important;">
+ <p>Hello there!</p>
+ <p>I'm currently not totally sure who I am (it's a thing that can happen with plurality), but I am using this pony as a temporary identity to stay calm and not panic while I figure out what is going on and who I am.</p>
+ <p>I can either be an existing headmate who cannot work out they are fronting (this can sometimes happen when one of us gets pushed out of front), multiple headmates blurring who cannot work out who we are, a new pony trying to figure out their identity (this can sometimes take a while), or some other plurality shenanigans.</p>
+ <span>In all cases, feel free to ask!</span>
</div>
+ <br>
<?php elseif ($memberData["name"] === "fusion"): ?>
<br>
- <div class="alert alert-secondary">
+ <div class="alert alert-secondary" style="margin-bottom: 0 !important;">
<p><?= $lang["member"]["fusion"][0] ?></p>
<p><?= $lang["member"]["fusion"][1] ?></p>
<p><?= $lang["member"]["fusion"][2] ?></p>
@@ -79,6 +80,7 @@ if ($memberData["name"] === "fusion") {
<i><?= $lang["member"]["no_fusion"] ?></i>
<?php endif; ?>
</div>
+ <br>
<?php else: ?>
<?php if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/content/$memberID-private.html") && $isLoggedIn): ?>
<br>
diff --git a/includes/metadata.inc b/includes/metadata.inc
index 10a87ab..d903010 100644
--- a/includes/metadata.inc
+++ b/includes/metadata.inc
@@ -71,6 +71,7 @@ if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/" . $member
<option <?= $metadata["alignment"]["sexual"] === "homo" ? "selected" : "" ?> value="homo">Homosexual</option>
<option <?= $metadata["alignment"]["sexual"] === "bi" ? "selected" : "" ?> value="bi">Bisexual</option>
<option <?= $metadata["alignment"]["sexual"] === "pan" ? "selected" : "" ?> value="pan">Pansexual</option>
+ <option <?= $metadata["alignment"]["sexual"] === "poly" ? "selected" : "" ?> value="poly">Polysexual</option>
</select>
<select class="tooltip-nohelp form-select" style='display:inline-block;filter:invert(1) hue-rotate(180deg);background-image:url("data:image/svg+xml,%3csvg xmlns=&apos;http://www.w3.org/2000/svg&apos; viewBox=&apos;0 0 16 16&apos;%3e%3cpath fill=&apos;none&apos; stroke=&apos;%23000000&apos; stroke-linecap=&apos;round&apos; stroke-linejoin=&apos;round&apos; stroke-width=&apos;2&apos; d=&apos;M2 5l6 6 6-6&apos;/%3e%3c/svg%3e");' name="alignment[romantic]">
<option <?= $metadata["alignment"]["romantic"] === "aroace" ? "selected" : "" ?> value="aroace">Aromantic</option>
@@ -78,6 +79,7 @@ if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/" . $member
<option <?= $metadata["alignment"]["romantic"] === "homo" ? "selected" : "" ?> value="homo">Homoromantic</option>
<option <?= $metadata["alignment"]["romantic"] === "bi" ? "selected" : "" ?> value="bi">Biromantic</option>
<option <?= $metadata["alignment"]["romantic"] === "pan" ? "selected" : "" ?> value="pan">Panromantic</option>
+ <option <?= $metadata["alignment"]["romantic"] === "poly" ? "selected" : "" ?> value="poly">Polyromantic</option>
</select>
</div>
</div>
diff --git a/pages/api/raindrops-img-round.php b/pages/api/raindrops-img-round.php
index f733cc8..5e80bd0 100644
--- a/pages/api/raindrops-img-round.php
+++ b/pages/api/raindrops-img-round.php
@@ -5,82 +5,6 @@ $fronters = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes
$url = isset($fronters['members'][0]) ? ($fronters['members'][0]["avatar_url"] ?? "/assets/uploads/raindrops.png") : "/assets/uploads/raindrops.png";
file_put_contents("/tmp/temp", file_get_contents($url));
-function imageCreateCorners($sourceImageFile, $radius) {
- # test source image
- if (file_exists($sourceImageFile)) {
- $res = is_array($info = getimagesize($sourceImageFile));
- }
- else $res = false;
-
- # open image
- if ($res) {
- $w = $info[0];
- $h = $info[1];
- switch ($info['mime']) {
- case 'image/jpeg': $src = imagecreatefromjpeg($sourceImageFile);
- break;
- case 'image/gif': $src = imagecreatefromgif($sourceImageFile);
- break;
- case 'image/png': $src = imagecreatefrompng($sourceImageFile);
- break;
- default:
- $res = false;
- }
- }
-
- # create corners
- if ($res) {
-
- $q = 10; # change this if you want
- $radius *= $q;
-
- # find unique color
- do {
- $r = rand(0, 255);
- $g = rand(0, 255);
- $b = rand(0, 255);
- }
- while (imagecolorexact($src, $r, $g, $b) < 0);
-
- $nw = $w*$q;
- $nh = $h*$q;
-
- $img = imagecreatetruecolor($nw, $nh);
- $alphacolor = imagecolorallocatealpha($img, $r, $g, $b, 127);
- imagealphablending($img, false);
- imagesavealpha($img, true);
- imagefilledrectangle($img, 0, 0, $nw, $nh, $alphacolor);
-
- imagefill($img, 0, 0, $alphacolor);
- imagecopyresampled($img, $src, 0, 0, 0, 0, $nw, $nh, $w, $h);
-
- imagearc($img, $radius-1, $radius-1, $radius*2, $radius*2, 180, 270, $alphacolor);
- imagefilltoborder($img, 0, 0, $alphacolor, $alphacolor);
- imagearc($img, $nw-$radius, $radius-1, $radius*2, $radius*2, 270, 0, $alphacolor);
- imagefilltoborder($img, $nw-1, 0, $alphacolor, $alphacolor);
- imagearc($img, $radius-1, $nh-$radius, $radius*2, $radius*2, 90, 180, $alphacolor);
- imagefilltoborder($img, 0, $nh-1, $alphacolor, $alphacolor);
- imagearc($img, $nw-$radius, $nh-$radius, $radius*2, $radius*2, 0, 90, $alphacolor);
- imagefilltoborder($img, $nw-1, $nh-1, $alphacolor, $alphacolor);
- imagealphablending($img, true);
- imagecolortransparent($img, $alphacolor);
-
- # resize image down
- $dest = imagecreatetruecolor($w, $h);
- imagealphablending($dest, false);
- imagesavealpha($dest, true);
- imagefilledrectangle($dest, 0, 0, $w, $h, $alphacolor);
- imagecopyresampled($dest, $img, 0, 0, 0, 0, $w, $h, $nw, $nh);
-
- # output image
- $res = $dest;
- imagedestroy($src);
- imagedestroy($img);
- }
-
- return $res;
-}
-
header("Content-Type: image/png");
$id = bin2hex(random_bytes(8));
diff --git a/pages/api/raindrops-img2-round.php b/pages/api/raindrops-img2-round.php
index 8ca6c81..1b0d320 100644
--- a/pages/api/raindrops-img2-round.php
+++ b/pages/api/raindrops-img2-round.php
@@ -5,82 +5,6 @@ $fronters = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes
$url = isset($fronters['members'][1]) ? ($fronters['members'][1]["avatar_url"] ?? "/assets/uploads/raindrops.png") : "/assets/uploads/raindrops.png";
file_put_contents("/tmp/temp", file_get_contents($url));
-function imageCreateCorners($sourceImageFile, $radius) {
- # test source image
- if (file_exists($sourceImageFile)) {
- $res = is_array($info = getimagesize($sourceImageFile));
- }
- else $res = false;
-
- # open image
- if ($res) {
- $w = $info[0];
- $h = $info[1];
- switch ($info['mime']) {
- case 'image/jpeg': $src = imagecreatefromjpeg($sourceImageFile);
- break;
- case 'image/gif': $src = imagecreatefromgif($sourceImageFile);
- break;
- case 'image/png': $src = imagecreatefrompng($sourceImageFile);
- break;
- default:
- $res = false;
- }
- }
-
- # create corners
- if ($res) {
-
- $q = 10; # change this if you want
- $radius *= $q;
-
- # find unique color
- do {
- $r = rand(0, 255);
- $g = rand(0, 255);
- $b = rand(0, 255);
- }
- while (imagecolorexact($src, $r, $g, $b) < 0);
-
- $nw = $w*$q;
- $nh = $h*$q;
-
- $img = imagecreatetruecolor($nw, $nh);
- $alphacolor = imagecolorallocatealpha($img, $r, $g, $b, 127);
- imagealphablending($img, false);
- imagesavealpha($img, true);
- imagefilledrectangle($img, 0, 0, $nw, $nh, $alphacolor);
-
- imagefill($img, 0, 0, $alphacolor);
- imagecopyresampled($img, $src, 0, 0, 0, 0, $nw, $nh, $w, $h);
-
- imagearc($img, $radius-1, $radius-1, $radius*2, $radius*2, 180, 270, $alphacolor);
- imagefilltoborder($img, 0, 0, $alphacolor, $alphacolor);
- imagearc($img, $nw-$radius, $radius-1, $radius*2, $radius*2, 270, 0, $alphacolor);
- imagefilltoborder($img, $nw-1, 0, $alphacolor, $alphacolor);
- imagearc($img, $radius-1, $nh-$radius, $radius*2, $radius*2, 90, 180, $alphacolor);
- imagefilltoborder($img, 0, $nh-1, $alphacolor, $alphacolor);
- imagearc($img, $nw-$radius, $nh-$radius, $radius*2, $radius*2, 0, 90, $alphacolor);
- imagefilltoborder($img, $nw-1, $nh-1, $alphacolor, $alphacolor);
- imagealphablending($img, true);
- imagecolortransparent($img, $alphacolor);
-
- # resize image down
- $dest = imagecreatetruecolor($w, $h);
- imagealphablending($dest, false);
- imagesavealpha($dest, true);
- imagefilledrectangle($dest, 0, 0, $w, $h, $alphacolor);
- imagecopyresampled($dest, $img, 0, 0, 0, 0, $w, $h, $nw, $nh);
-
- # output image
- $res = $dest;
- imagedestroy($src);
- imagedestroy($img);
- }
-
- return $res;
-}
-
header("Content-Type: image/png");
$id = bin2hex(random_bytes(8));
diff --git a/pages/home.inc b/pages/home.inc
index d206100..4249947 100644
--- a/pages/home.inc
+++ b/pages/home.inc
@@ -32,7 +32,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/init.inc"; require_once $_SE
<span style="display: inline-block;background: transparent;position:absolute;width: 0;height: 0;margin-top: 17px;box-shadow: 0 6px 20px 20px #<?= $member["color"] ?>;z-index: 9;margin-left: 8px;opacity: .75;"></span>
</div><?php endforeach; ?>
</div>
- <div style="padding:5px 10px;background:#3332328a;border-bottom-left-radius: 10px;border-bottom-right-radius: 10px;position:relative;z-index: 99999;backdrop-filter: blur(30px);">
+ <div style="padding:5px 10px;background:#3332328a;border-bottom-left-radius: 10px;border-bottom-right-radius: 10px;position:relative;z-index: 999;backdrop-filter: blur(30px);">
<h2 style="margin-top: 20px;">Cold Haze</h2>
<?php if ($_SERVER['HTTP_HOST'] === "fr.equestria.horse"): ?>
<p><?= count($byColor) ?> poneys dans une tête</p>
diff --git a/pages/page.inc b/pages/page.inc
index 7fe039c..d35dba8 100644
--- a/pages/page.inc
+++ b/pages/page.inc
@@ -36,7 +36,7 @@ if (($parts[0] !== "cloudburst" && $parts[0] !== "raindrops" && $parts[0] !== $a
$parts[0] = $app["other"]["slug"];
}
- if ($parts[1] === "unknown-rd" || $parts[1] === "unknown-cb" || (($isLoggedIn || $isLowerLoggedIn) && $parts[1] === $app["other"]["slug"])) $parts[1] = "unknown";
+ if ($parts[1] === "unknown-rd" || $parts[1] === "unknown-cb" || (($isLoggedIn || $isLowerLoggedIn) && $parts[1] === $app["other"]["unknown"])) $parts[1] = "unknown";
}
$system = $parts[0];