summaryrefslogtreecommitdiff
path: root/src/application
diff options
context:
space:
mode:
Diffstat (limited to 'src/application')
-rw-r--r--src/application/i18n.php6
-rw-r--r--src/application/messages/de.msg10
-rw-r--r--src/application/views/template_end.php41
-rw-r--r--src/application/views/view_logintoreply.php7
4 files changed, 62 insertions, 2 deletions
diff --git a/src/application/i18n.php b/src/application/i18n.php
index cdc61e1..a1f2f24 100644
--- a/src/application/i18n.php
+++ b/src/application/i18n.php
@@ -183,6 +183,12 @@ function i18n_get(string $msgid, array $params = [], ?string $context = null): s
);
}
+function i18n_metadata(string $lang): array {
+ global $__i18n_msg_metadata;
+
+ return $__i18n_msg_metadata[$lang] ?? [];
+}
+
function i18n_get_plural(string $msgid_singular, string $msgid_plural, int $count, array $params = [], ?string $context = null): string {
global $__i18n_current_locale, $__i18n_msg_metadata, $__i18n_msg_store_plural;
diff --git a/src/application/messages/de.msg b/src/application/messages/de.msg
index c77a569..ed8178e 100644
--- a/src/application/messages/de.msg
+++ b/src/application/messages/de.msg
@@ -1,4 +1,5 @@
metadata({
+ "langName": "Deutsch",
"plural": {
"indexMapping": "ifelse(n = 0, 2, ifelse(n = 1, 0, 1))"
}
@@ -308,3 +309,12 @@ metadata({
: "Keep post"
= "Beitrag beibehalten"
+
+: "Log in to reply to this topic"
+= "Melden Sie sich an, um auf dieses Thema zu antworten"
+
+: "Theme:"
+= "Aussehen:"
+
+: "Language:"
+= "Sprache:"
diff --git a/src/application/views/template_end.php b/src/application/views/template_end.php
index d12e2ff..f322b36 100644
--- a/src/application/views/template_end.php
+++ b/src/application/views/template_end.php
@@ -3,8 +3,41 @@
<div class="container">
<div class="panel panel-default">
<div class="panel-body">
- &copy; <?= date("Y") ?> <?= htmlentities(env("MYSTIC_FORUM_COPYRIGHT") ?? env("MYSTIC_FORUM_TITLE") ?? "Forum") ?>.
- Powered by <a href="https://git.jkohl.link/mystic-forum.git/">Mystic Forum</a>
+ <table style="border-collapse: collapse; width: 100%; background: none">
+ <tbody>
+ <tr>
+ <td style="padding: 0; vertical-align: middle; text-align: left; width: 100%" class="text-normal">
+ &copy; <?= date("Y") ?> <?= htmlentities(env("MYSTIC_FORUM_COPYRIGHT") ?? env("MYSTIC_FORUM_TITLE") ?? "Forum") ?>.
+ Powered by <a href="https://git.jkohl.link/mystic-forum.git/">mysticBB</a>.
+ </td>
+ <td style="padding: 0; vertical-align: middle; text-align: right; white-space: nowrap" class="text-normal">
+ <form action="?_action=settheme" class="form-inline seamless-inline" method="post">
+ <input type="hidden" name="next" value="<?= htmlentities($_SERVER["REQUEST_URI"]) ?>">
+ <div class="form-group">
+ <label for="theme-select"><?= __("Theme:") ?></label>
+ <select class="form-control input-sm auto-submit" id="theme-select" name="theme">
+ <?php foreach ($availableThemes as $themeKey => $themeInfo): ?>
+ <option value="<?= htmlentities($themeKey) ?>" <?= $themeKey === $currentTheme ? " selected" : "" ?>><?= htmlentities($themeInfo->name) ?></option>
+ <?php endforeach; ?>
+ </select>
+ </div>
+ </form>
+ &nbsp;&nbsp;&nbsp;
+ <form action="?_action=setlang" class="form-inline seamless-inline" method="post">
+ <input type="hidden" name="next" value="<?= htmlentities($_SERVER["REQUEST_URI"]) ?>">
+ <div class="form-group">
+ <label for="lang-select"><?= __("Language:") ?></label>
+ <select class="form-control input-sm auto-submit" id="lang-select" name="lang">
+ <?php foreach ($availableLangs as $langKey => $langName): ?>
+ <option value="<?= htmlentities($langKey) ?>" <?= $langKey === $currentLang ? " selected" : "" ?>><?= htmlentities($langName) ?></option>
+ <?php endforeach; ?>
+ </select>
+ </div>
+ </form>
+ </td>
+ </tr>
+ </tbody>
+ </table>
</div>
</div>
</div>
@@ -24,6 +57,10 @@ $(function() {
],
]) ?>
+ $(".auto-submit").on("change", function() {
+ $(this)[0].form.submit();
+ });
+
$("._time").each(function(i, e) {
var date = new Date($(e).text());
$(e).text(date.toLocaleString());
diff --git a/src/application/views/view_logintoreply.php b/src/application/views/view_logintoreply.php
new file mode 100644
index 0000000..11e0e1e
--- /dev/null
+++ b/src/application/views/view_logintoreply.php
@@ -0,0 +1,7 @@
+<div class="well margin-top-4x text-center">
+ <div class="h3 margin-top-0"><?= __("Log in to reply to this topic") ?></div>
+ <a href="?_action=auth&amp;next=<?= htmlentities(urlencode($_SERVER["REQUEST_URI"])) ?>" class="btn btn-success">
+ <span class="glyphicon glyphicon-user" aria-hidden="true"></span>
+ <?= __("Log in") ?>
+ </a>
+</div> \ No newline at end of file