summaryrefslogtreecommitdiff
path: root/includes/util/banner.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/util/banner.inc')
-rw-r--r--includes/util/banner.inc24
1 files changed, 23 insertions, 1 deletions
diff --git a/includes/util/banner.inc b/includes/util/banner.inc
index 947e5c6..0db683f 100644
--- a/includes/util/banner.inc
+++ b/includes/util/banner.inc
@@ -132,6 +132,7 @@ function getMemberBannerData(string $id, string $system, bool $french = false) {
"batpony" => $metadata["robot"] ? "Robot Poney chauve souris" : (!$metadata["plush"] ? "Poney chauve souris" : "Poney chauve souris en peluche"),
"unicorn" => $metadata["robot"] ? "Robot licorne" : (!$metadata["plush"] ? "Licorne" : "Licorne en peluche"),
"changeling" => "Changelin",
+ "merpony" => "Poney sirène",
default => $species . "_" . $metadata["robot"]
};
} else {
@@ -143,6 +144,7 @@ function getMemberBannerData(string $id, string $system, bool $french = false) {
"batpony" => $metadata["robot"] ? "Robot bat pony" : (!$metadata["plush"] ? "Bat pony" : "Bat pony plush"),
"unicorn" => $metadata["robot"] ? "Robot unicorn" : (!$metadata["plush"] ? "Unicorn" : "Unicorn plush"),
"changeling" => "Changeling",
+ "merpony" => "Merpony",
default => $species . "_" . $metadata["robot"]
};
}
@@ -242,6 +244,25 @@ function getMemberBannerData(string $id, string $system, bool $french = false) {
];
}
+ $friends = [];
+ foreach ($metadata["friends"] ?? [] as $marefriend) {
+ $mfSystem = explode("/", $marefriend)[0];
+ $mfMemberID = explode("/", $marefriend)[1];
+ $mfMember = array_filter(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$mfSystem/members.json"), true), function ($item) use ($mfMemberID) {
+ return $item["id"] === $mfMemberID;
+ });
+ sort($mfMember);
+ $mfMember = $mfMember[0];
+
+ if (!($mfSystem === $app["other"]["id"] && !$isLoggedIn && !$isLowerLoggedIn)) $friends[] = [
+ "id" => $marefriend,
+ "link" => "/" . ($mfMember["name"]),
+ "icon" => getAsset($mfSystem, $mfMemberID, "heads"),
+ "name" => $mfMember["display_name"] ?? $mfMember["name"],
+ "full_name" => $mfMember["display_name"] ?? $mfMember["name"]
+ ];
+ }
+
$caretakers = null;
if ($metadata["little"] >= 2) {
@@ -479,7 +500,8 @@ function getMemberBannerData(string $id, string $system, bool $french = false) {
'marefriends' => $marefriends ?? [],
'sexfriends' => $sexfriends ?? null,
'sisters' => $sisters ?? [],
- 'caretakers' => $caretakers ?? []
+ 'caretakers' => $caretakers ?? [],
+ 'friends' => $friends ?? []
]
];
} \ No newline at end of file