Qualcuno ha aggiunto un footer personalizzato a 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.

Istruzioni aggiornate per trovarlo nel 2020

  1. Hamburger > Impostazioni > Personalizza > [Seleziona un tema] > Pulsante “Modifica CSS/HTML” > Footer
  2. Inserisci il tuo HTML personalizzato nella casella e clicca su ‘Salva’.
  3. Ripeti per ogni tema selezionabile dagli utenti.

Una sezione di copyright decente e di base

Ho iniziato con il seguente HTML per il mio footer di copyright, che ho ritenuto funzionasse bene sia per il tema chiaro predefinito che per quello scuro:

<div style="text-align: center; color: #999; font-size: 90%; padding: 2em 0;">
Copyright &copy; 2020 INSERISCI QUI LA TUA AZIENDA. Tutti i diritti riservati.
</div>

Aggiornamento automatico dell’anno

Ovviamente, non voglio dover cambiare l’anno nel footer ogni 12 mesi, quindi l’ho aggiornato con questo HTML nel footer:

<div style="text-align: center; color: #999; font-size: 90%; padding: 2em 0;">
Copyright &copy; <span id="footer-copyright-current-year"></span> INSERISCI QUI LA TUA AZIENDA. Tutti i diritti riservati.
</div>

E questo nella sezione <body> (probabilmente non è il codice ideale, ma sono nuovo nell’hacking di 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>

Anche in questo caso, devi copiare/incollare il codice in ogni tema in cui vuoi che appaia.

Qualcuno mi ha appena detto che sulla loro istanza di Discourse è:
Hamburger > Admin > Impostazioni > …

Sulla nostra istanza (ospitata da Discourse) non è necessario andare prima in Admin.

Wow… bel tema di SmartThings.
Quale tema stai usando? Vedo che hai un’intestazione personalizzata…

L’Open Energy Modelling Initiative utilizza un footer personalizzato sul nostro forum con i nostri termini di licenza e link cliccabili ad altri servizi:

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

Ritengo che ciò sia molto utile e anche rilevante in un contesto legale.

Naturalmente, richiediamo il consenso per questi termini di licenza al momento della registrazione: