diff options
Diffstat (limited to 'formats')
-rw-r--r-- | formats/HtmlFormat.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/formats/HtmlFormat.php b/formats/HtmlFormat.php index ee60418d..86d0657d 100644 --- a/formats/HtmlFormat.php +++ b/formats/HtmlFormat.php @@ -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>' : ''; |