mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-07-30 23:55:24 +02:00
[core] Support for bridge maintainers' donation URLs (#2102)
This commit is contained in:
parent
5598fef3cf
commit
ecaae735d9
10 changed files with 61 additions and 3 deletions
|
@ -6,6 +6,8 @@ class HtmlFormat extends FormatAbstract {
|
|||
$extraInfos = $this->getExtraInfos();
|
||||
$title = htmlspecialchars($extraInfos['name']);
|
||||
$uri = htmlspecialchars($extraInfos['uri']);
|
||||
$donationUri = htmlspecialchars($extraInfos['donationUri']);
|
||||
$donationsAllowed = Configuration::getConfig('admin', 'donations');
|
||||
|
||||
// Dynamically build buttons for all formats (except HTML)
|
||||
$formatFac = new FormatFactory();
|
||||
|
@ -26,6 +28,17 @@ class HtmlFormat extends FormatAbstract {
|
|||
$links .= $this->buildLink($format, $query, $mime) . PHP_EOL;
|
||||
}
|
||||
|
||||
if($donationUri !== '' && $donationsAllowed) {
|
||||
$buttons .= '<a href="'
|
||||
. $donationUri
|
||||
. '" target="_blank"><button class="highlight">Donate to maintainer</button></a>'
|
||||
. PHP_EOL;
|
||||
$links .= '<link href="'
|
||||
. $donationUri
|
||||
. ' target="_blank"" title="Donate to Maintainer" rel="alternate">'
|
||||
. PHP_EOL;
|
||||
}
|
||||
|
||||
$entries = '';
|
||||
foreach($this->getItems() as $item) {
|
||||
$entryAuthor = $item->getAuthor() ? '<br /><p class="author">by: ' . $item->getAuthor() . '</p>' : '';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue