From 108525534c28013cfe1897c30e4565f9893f3766 Mon Sep 17 00:00:00 2001 From: Minteck Date: Mon, 10 Oct 2022 20:51:39 +0200 Subject: Update --- pages/nicknames.inc | 115 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 pages/nicknames.inc (limited to 'pages/nicknames.inc') diff --git a/pages/nicknames.inc b/pages/nicknames.inc new file mode 100644 index 0000000..434477f --- /dev/null +++ b/pages/nicknames.inc @@ -0,0 +1,115 @@ + $i + ]; + $r["type"] = "marefriends"; + return $r; + }, $member["_metadata"]["marefriends"] ?? []), + ...array_map(function ($i) { + $r = [ + "name" => $i + ]; + $r["type"] = "sisters"; + return $r; + }, $member["_metadata"]["sisters"] ?? []), + ...array_map(function ($i) { + $r = [ + "name" => $i + ]; + $r["type"] = "caretaking"; + return $r; + }, $member["_metadata"]["caretakers"] ?? []) + ] as $rel) { + $id = $rel["name"]; + $otherMember = getSystemMember(explode("/", $id)[0], explode("/", $id)[1]); + + $parts = [ + $member["id"], + $otherMember["id"] + ]; + + asort($parts); + + $relations[implode("-", $parts)] = [ + "id" => implode("", $parts), + "name" => getMiniName($member["display_name"] ?? $member["name"]) . " and " . getMiniName($otherMember["display_name"] ?? $otherMember["name"]), + "type" => $rel["type"], + "images" => [ + getAsset($member['system'], $member["id"], "heads"), + getAsset($otherMember['system'], $otherMember["id"], "heads") + ] + ]; + } +} + +$nicknames = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/nicknames/nicknames.json"), true); + +?> + +
+
+ +
+ + + + -- cgit