summaryrefslogtreecommitdiff
path: root/includes/fragments/metadata.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/fragments/metadata.inc')
-rw-r--r--includes/fragments/metadata.inc14
1 files changed, 7 insertions, 7 deletions
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>