diff --git a/framework/core/js/admin/src/components/EditCustomFooterModal.js b/framework/core/js/admin/src/components/EditCustomFooterModal.js
new file mode 100644
index 000000000..1cd02a012
--- /dev/null
+++ b/framework/core/js/admin/src/components/EditCustomFooterModal.js
@@ -0,0 +1,24 @@
+import SettingsModal from 'flarum/components/SettingsModal';
+
+export default class EditCustomFooterModal extends SettingsModal {
+ className() {
+ return 'EditCustomFooterModal Modal--large';
+ }
+
+ title() {
+ return app.translator.trans('core.admin.edit_footer.title');
+ }
+
+ form() {
+ return [
+
{app.translator.trans('core.admin.edit_footer.customize_text')}
,
+
+
+ ];
+ }
+
+ onsaved() {
+ window.location.reload();
+ }
+}
diff --git a/framework/core/src/Api/Serializer/ForumSerializer.php b/framework/core/src/Api/Serializer/ForumSerializer.php
index 02dcdd6d6..47e89fecb 100644
--- a/framework/core/src/Api/Serializer/ForumSerializer.php
+++ b/framework/core/src/Api/Serializer/ForumSerializer.php
@@ -77,6 +77,7 @@ class ForumSerializer extends AbstractSerializer
'logoUrl' => $this->getLogoUrl(),
'faviconUrl' => $this->getFaviconUrl(),
'headerHtml' => $this->settings->get('custom_header'),
+ 'footerHtml' => $this->settings->get('custom_footer'),
'allowSignUp' => (bool) $this->settings->get('allow_sign_up'),
'defaultRoute' => $this->settings->get('default_route'),
'canViewDiscussions' => $this->actor->can('viewDiscussions'),
diff --git a/framework/core/src/Frontend/FrontendView.php b/framework/core/src/Frontend/FrontendView.php
index 587850f8e..0e8a0e00e 100644
--- a/framework/core/src/Frontend/FrontendView.php
+++ b/framework/core/src/Frontend/FrontendView.php
@@ -304,7 +304,7 @@ class FrontendView
$view->jsUrls = $this->buildJsUrls($baseUrl);
$view->head = $this->buildHeadContent();
- $view->foot = implode("\n", $this->foot);
+ $view->foot = $this->buildFootContent(array_get($forum, 'data.attributes.footerHtml'));
return $view->render();
}
@@ -380,6 +380,15 @@ class FrontendView
return $html;
}
+ protected function buildFootContent($customFooterHtml)
+ {
+ $html = implode("\n", $this->foot);
+
+ $html .= $customFooterHtml;
+
+ return $html;
+ }
+
/**
* @return CompilerInterface
*/