feat: add admin telegram contact config (#3134)

This commit is contained in:
Dag 2022-11-07 18:36:52 +01:00 committed by GitHub
parent 2ef98b299f
commit 86c3a969b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 4 deletions

View File

@ -25,6 +25,7 @@ final class FrontpageAction implements ActionInterface
return render(__DIR__ . '/../templates/frontpage.html.php', [ return render(__DIR__ . '/../templates/frontpage.html.php', [
'admin_email' => Configuration::getConfig('admin', 'email'), 'admin_email' => Configuration::getConfig('admin', 'email'),
'admin_telegram' => Configuration::getConfig('admin', 'telegram'),
'bridges' => $body, 'bridges' => $body,
'active_bridges' => $activeBridges, 'active_bridges' => $activeBridges,
'total_bridges' => count($bridgeClassNames), 'total_bridges' => count($bridgeClassNames),

View File

@ -33,6 +33,9 @@ custom_timeout = false
; "" = Disabled (default) ; "" = Disabled (default)
email = "" email = ""
; Advertise a contact Telegram url e.g. "https://t.me/elegantobjects"
telegram = ""
; Show Donation information for bridges if available. ; Show Donation information for bridges if available.
; This will display a 'Donate' link on the bridge view ; This will display a 'Donate' link on the bridge view
; and a "Donate" button in the HTML view of the bridges feed. ; and a "Donate" button in the HTML view of the bridges feed.

View File

@ -53,10 +53,18 @@
<?php endif; ?> <?php endif; ?>
<?php endif; ?> <?php endif; ?>
<br>
<?php if ($admin_email): ?> <?php if ($admin_email): ?>
<span> <div>
You may email the administrator of this RSS-Bridge instance at Email: <a href="mailto:<?= e($admin_email) ?>"><?= e($admin_email) ?></a>
<a href="mailto:<?= e($admin_email) ?>"><?= e($admin_email) ?></a> </div>
</span>
<?php endif; ?> <?php endif; ?>
<?php if ($admin_telegram): ?>
<div>
Telegram: <a href="<?= e($admin_telegram) ?>"><?= e($admin_telegram) ?></a>
</div>
<?php endif; ?>
</section> </section>