Skip to content

Title on homepage of nodebb forum

Solved Customisation
  • I have a nodebb forum but theres no place to put subheading info, briefly describing what forum is about.
    You have this on your page saying “Technology Consultancy and Advisory”
    I understand you did this with custom code?
    Please can you share how I can add this similarly
    Thanks

  • @eveh Welcome board 🙂

    The code you are referring to is custom written as no such functionality exists under NodeBB. However, adding the functionality is relatively trivial. Below are the required steps

    • Navigate to /admin/appearance/customise#custom-header
    • Add the below code to your header, and save once completed
    <ol id="mainbanner" class="breadcrumb"><li id="addtext">Your Title Goes Here</li></ol>
    
    • Navigate to /admin/appearance/customise#custom-js and add the below code, then save
    $(document).ready(function() {
        $(window).on('action:ajaxify.end', function(data) {
            // Initialise mainbanner ID, but hide it from view 
            $('#mainbanner').hide();
            var pathname = window.location.pathname;
            if (pathname === "/") {
                $("#addtext").text("Your Title");
                $('#mainbanner').show();
            } else {}
            // If we want to add a title to a sub page, uncomment the below and adjust accordingly
            //if (pathname === "/yourpath") {
            //$("#addtext").text("Your Title");
            //$('#mainbanner').show();
            //}
        });
    });
    
    • Navigate to /admin/appearance/customise#custom-css and add the below CSS block
    .breadcrumb {
        right: 0;
        margin-right: auto;
        text-align: center;
        background: #0086c4;
        color: #ffffff;
        width: 100vw;
        position: relative;
        margin-left: -50vw;
        left: 50%;
        top: 50px;
        position: fixed;
        z-index: 1020;
    }
    

    Note, that you will need to adjust your CSS code to suit your own site / requirements.

  • phenomlabundefined phenomlab has marked this topic as solved on
  • phenomlabundefined phenomlab forked this topic on

Did this solution help you?
Did you find the suggested solution useful? Why not buy me a coffee? It's a nice gesture, and a great way to show your appreciation 💗

  • Nodebb design

    Solved General
    2
    1 Votes
    2 Posts
    145 Views

    @Panda said in Nodebb design:

    One negative is not being so good for SEO as more Server side rendered forums, if web crawlers dont run the JS to read the forum.

    From recollection, Google and Bing have the capability to read and process JS, although it’s not in the same manner as a physical person will consume content on a page. It will be seen as plain text, but will be indexed. However, it’s important to note that Yandex and Baidu will not render JS, although seeing as Google has a 90% share of the content available on the web in terms of indexing, this isn’t something you’ll likely lose sleep over.

    @Panda said in Nodebb design:

    The “write api” is preferred for server-to-server interactions.

    This is mostly based around overall security - you won’t typically want a client machine changing database elements or altering data. This is why you have “client-side” which could be DOM manipulation etc, and “server-side” which performs more complex operations as it can communicate directly with the database whereas the client cannot (and if it can, then you have a serious security flaw). Reading from the API is perfectly acceptable on the client-side, but not being able to write.

    A paradigm here would be something like SNMP. This protocol exists as a UDP (UDP is very efficient, as it is “fire and forget” and does not wait for a response like TCP does) based service which reads performance data from a remote source, thus enabling an application to parse that data for use in a monitoring application. In all cases, SNMP access should be “RO” (Read Only) and not RW (Read Write). It is completely feasible to assume complete control over a firewall for example by having RW access to SNMP and then exposing it to the entire internet with a weak passphrase.

    You wouldn’t do it (at least, I hope you wouldn’t) and the same ethic applies to server-side rendering and the execution of commands.

  • NodeBB: Favicon upload issue

    Solved Configure
    12
    3 Votes
    12 Posts
    355 Views

    @phenomlab I am on a Mac, so I used the “Option + Command + I”, and then performed the steps. It loaded my favicon! I checked on Firefox which I haven’t used before, and it showed my favicon also! That’s fantastic and thank you for the help!

  • 0 Votes
    5 Posts
    192 Views

    @mventures Yes, exactly. The other icon will restart NodeBB whilst the first icon I referenced will rebuild (recompile) it.

    The huge strength of NodeBB over Flarum (for example) is that the code is precompiled, and called once at boot. PHP’s code has to repeatedly reload code from source making it much slower.

  • 13 Votes
    22 Posts
    1k Views

    Been playing with the user profile page this afternoon. Thought I’d post a video as I’m really pleased with how this came out

  • NodeBB inline videoplayer

    Solved Customisation
    12
    3 Votes
    12 Posts
    713 Views

    @phenomlab
    YAY! It works
    Thanks so much

  • 3 Votes
    2 Posts
    554 Views

    @pwsincd welcome to sudonix, and thanks for the comments. What your looking for is here

    https://sudonix.com/topic/195/nodebb-welcome-message/3?_=1648295651358

  • [NODEBB] Stats

    Unsolved Customisation
    20
    2 Votes
    20 Posts
    1k Views

    @phenomlab said in [NODEBB] Stats:

    @jac or I land up fixing it 🙂

    I wouldn’t put it past you 😛

  • NodeBB customisation

    Locked Customisation
    332
    27 Votes
    332 Posts
    71k Views

    @jac Given your departure away from your previous project, I’m going to close this thread… 🙂