summaryrefslogtreecommitdiff
path: root/pages/relations.inc
diff options
context:
space:
mode:
Diffstat (limited to 'pages/relations.inc')
-rw-r--r--pages/relations.inc24
1 files changed, 15 insertions, 9 deletions
diff --git a/pages/relations.inc b/pages/relations.inc
index 80520da..ce0d65c 100644
--- a/pages/relations.inc
+++ b/pages/relations.inc
@@ -1,6 +1,6 @@
<?php
-require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/init.inc"; global $title; global $isLoggedIn;
+require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/init.inc"; global $title; global $isLoggedIn; global $lang; global $pages;
require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.inc';
?>
@@ -8,8 +8,14 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.inc';
<br>
<div class="container">
<div id="page-content">
- <h2>Relations</h2>
- <?php foreach (withCaretakersDown(scoreOrderGlobal()) as $member): if (count($member["_metadata"]["marefriends"]) > 0 || count($member["_metadata"]["sisters"]) > 0): ?>
+ <h2><?= $pages["relations"]["name"][$lang["_name"]] ?></h2>
+ <?php foreach (withCaretakersDown(array_filter(scoreOrderGlobal(), function ($i) {
+ if ($_SERVER['HTTP_HOST'] === "fr.equestria.horse" && $i["_system"] !== "gdapd") {
+ return false;
+ } else {
+ return true;
+ }
+ })) as $member): if (count($member["_metadata"]["marefriends"]) > 0 || count($member["_metadata"]["sisters"]) > 0 || count($member["_metadata"]["caretakers"]) > 0): ?>
<div class="relation" style="background-color:rgba(255, 255, 255, .1);margin-bottom:10px;padding:10px;border-radius:10px;display:grid;grid-template-columns: 1.5fr <?= $member["_metadata"]["little"] === 2 ? "2fr 2fr 2fr" : "3fr 3fr" ?>;">
<a class="relation-intro" style="background-color:rgba(255, 255, 255, .05);border-right:1px solid rgba(255, 255, 255, .1);margin:-10px;padding:10px;border-top-left-radius:10px;border-bottom-left-radius:10px;color: white;text-decoration: none;" href="/<?= $member["name"] ?>">
<img src="<?= getAsset($member["system"], $member["id"], "heads") ?>" style="width:24px;"> <?= $member["display_name"] ?? $member["name"] ?>
@@ -18,11 +24,11 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.inc';
<table class="relation-item relation-item-marefriends" style="margin-left:10px;padding:0 20px;">
<tbody><tr>
<td style="width: 50%;text-align:right;">
- <b style="padding-right:5px;">Marefriends:</b><span class="list-separator-mobile"><br></span>
+ <b style="padding-right:5px;"><?= $lang["relations"]["marefriends"] ?></b><span class="list-separator-mobile"><br></span>
</td>
<td style="width: 50%;text-align:left;">
<?php if (count($member["_metadata"]["marefriends"]) === 0): ?>
- <span class="text-muted">None</span>
+ <span class="text-muted"><?= $lang["relations"]["no"] ?></span>
<?php else: ?>
<?php foreach ($member["_metadata"]["marefriends"] as $id): $mfSystem = explode("/", $id)[0]; $marefriend = getSystemMember(explode("/", $id)[0], explode("/", $id)[1]); ?>
<a title="<?= getMiniName($marefriend["display_name"] ?? $marefriend["name"]) ?>" data-bs-toggle="tooltip" class="member-link tooltip-nohelp" href="/<?= $marefriend["name"] ?>"><img src="<?= getAsset($mfSystem, $marefriend["id"], "heads") ?>" style="width:24px;"></a>
@@ -35,11 +41,11 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.inc';
<table class="relation-item relation-item-sisters" style="padding:0 20px;">
<tbody><tr>
<td style="width: 50%;text-align:right;">
- <b style="padding-right:5px;">Sisters:</b><span class="list-separator-mobile"><br></span>
+ <b style="padding-right:5px;"><?= $lang["relations"]["sisters"] ?></b><span class="list-separator-mobile"><br></span>
</td>
<td style="width: 50%;text-align:left;">
<?php if (count($member["_metadata"]["sisters"]) === 0): ?>
- <span class="text-muted">None</span>
+ <span class="text-muted"><?= $lang["relations"]["no"] ?></span>
<?php else: ?>
<?php foreach ($member["_metadata"]["sisters"] as $id): $mfSystem = explode("/", $id)[0]; $marefriend = getSystemMember(explode("/", $id)[0], explode("/", $id)[1]); ?>
<a title="<?= getMiniName($marefriend["display_name"] ?? $marefriend["name"]) ?>" data-bs-toggle="tooltip" class="member-link tooltip-nohelp" href="/<?= $marefriend["name"] ?>"><img src="<?= getAsset($mfSystem, $marefriend["id"], "heads") ?>" style="width:24px;"></a>
@@ -53,11 +59,11 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.inc';
<table class="relation-item relation-item-sisters" style="padding:0 20px;">
<tbody><tr>
<td style="width: 50%;text-align:right;">
- <b style="padding-right:5px;">Caretakers:</b><span class="list-separator-mobile"><br></span>
+ <b style="padding-right:5px;"><?= $lang["relations"]["caretakers"] ?></b><span class="list-separator-mobile"><br></span>
</td>
<td style="width: 50%;text-align:left;">
<?php if (count($member["_metadata"]["caretakers"]) === 0): ?>
- <span class="text-muted">None</span>
+ <span class="text-muted"><?= $lang["relations"]["no"] ?></span>
<?php else: ?>
<?php foreach ($member["_metadata"]["caretakers"] as $id): $mfSystem = explode("/", $id)[0]; $marefriend = getSystemMember(explode("/", $id)[0], explode("/", $id)[1]); ?>
<a title="<?= getMiniName($marefriend["display_name"] ?? $marefriend["name"]) ?>" data-bs-toggle="tooltip" class="member-link tooltip-nohelp" href="/<?= $marefriend["name"] ?>"><img src="<?= getAsset($mfSystem, $marefriend["id"], "heads") ?>" style="width:24px;"></a>