Has anyone added a custom footer to Discourse?

Hi everyone,

Props to whomever can help. Does anyone customized the footer of Discourse to include copyright text, links, etc.?

I am looking to do this for my site but honestly cannot figure out how to properly code the footer to where it looks and works good.

All help is appreciated, right now it feels like my Discourse site is “pantless”. :frowning:

Ours is just basic centered text so not much to help you with there. Do you have any kind of graphic mockup of what you’d like to achieve?

Just go to Admin, Customize, CSS/HTML, Bottom, and put your links in there :slight_smile:

Perhaps some fancy social media icons with text would work fine… I am checking http://codecanyon.net also in hopes of finding something potential to work with the site…

Thanks for your reply!

Cool. Once you figure out the HTML you need, adding it shouldn’t be too difficult using the steps @riking mentioned above.

Hi. I recently found the footers over at BootSnipp http://bootsnipp.com/tags/footer?page=1 and wanted to use one of these in my own Discourse forum. Bootsnipp separates HTML, CSS, Javascript - so it is easy to cut’n paste that code into the Customize sections of my Discourse.

I tried several but each one does not center on my Discourse. I thought there might be a conflict among generic tag names (like “row” or “container” - so I tried adding “footer-” to the front, but that did not help.)

There seem to be at least 2 issues:

  1. the centering doesn’t seem to work
  2. the CSS columns effect also does not work.

Is there a setting I can change in my Discourse Settings area to allow these effects to happen in the footer? Should I be using certain tag names?

I hope to add links to websites related to my forum down there. I may also try adding a banner zone like I used to have in our pre-Discourse days.

Here are a few examples

If you want to center your footer, either use flex to do it yourself, or use the “container” class.

2020 年の手順更新

  1. ハンバーガーメニュー > 設定 > カスタマイズ > [テーマを選択] > 「CSS/HTML を編集」ボタン > フッター
  2. 入力欄にカスタム HTML を入力し、「保存」をクリックします。
  3. ユーザーが選択可能なすべてのテーマに対してこの手順を繰り返してください。

適切な基本的な著作権セクション

私は以下の HTML を著作権フッターとして使用し始めました。これはデフォルトのライトテーマとダークテーマの両方で問題なく動作すると考えています:

<div style="text-align: center; color: #999; font-size: 90%; padding: 2em 0;">
Copyright &copy; 2020 会社名をここに記載してください。All rights reserved.
</div>

年の自動更新

もちろん、毎年 12 ヶ月ごとにフッターの年号を手動で変更したくないため、フッターに以下の HTML を使用するようにアップグレードしました:

<div style="text-align: center; color: #999; font-size: 90%; padding: 2em 0;">
Copyright &copy; <span id="footer-copyright-current-year"></span> 会社名をここに記載してください。All rights reserved.
</div>

そして、</body> セクションには以下のコードを追加しました(理想的なコードではないかもしれませんが、Discourse のハッキングにまだ慣れていません):

<script>
    function setCopyrightYear() {
        var el = document.getElementById("footer-copyright-current-year");
        if (el) {
            el.innerHTML = new Date().getFullYear();
        } else {
            setTimeout(setCopyrightYear, 100);
        }
    }
    document.addEventListener("DOMContentLoaded", setCopyrightYear);
</script>

再度、表示させたいすべてのテーマにコピー&ペーストする必要があります。

誰かが、自分の Discourse インスタンスでは以下の通りだと教えてくれました:
ハンバーガーメニュー > 管理 > 設定 > …

当社のインスタンス(Discourse によってホストされているもの)では、まず「管理」に進む必要はありません。

おぉ、SmartThings の素敵なテーマですね。どのテーマを使っているんですか?カスタムヘッダーに見えますが…

Open Energy Modelling Initiative は、当フォーラム に、利用規約と他のサービスへのクリック可能なリンクを含む独自のカスタムフッターを採用しています:

openmod-forum-footer-tight.screenshot-20210224t074253z

これは非常に役立ち、法的な文脈でも有用であると考えています。

もちろん、登録時にこれらの利用規約に対して同意を求めています