Skip to content

Title on homepage of nodebb forum

Solved Customisation
Posts 2 Posters 2 Views 811 Watching 1
  • 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.

  • undefined phenomlab has marked this topic as solved on 10 Oct 2022, 12:08
  • undefined phenomlab forked this topic on 1 Apr 2023, 10:31


1/2

9 Oct 2022, 12:58


Threaded Replies

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 💗

Related Topics
  • Nodebb design

    Solved General nodebb 11 Jul 2023, 10:13
    1 Votes
    2 Posts
    401 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.
  • 4 Votes
    4 Posts
    387 Views
    thank you fixed.
  • 0 Votes
    4 Posts
    755 Views
    @cagatay You’d target the body tag and use the below line of CSS background: url(/assets/customcss/backgrounds/default/default.png) no-repeat center center fixed; Obviously, you need to change the path to suit where your image is being stored. More info around the background property can be found here https://www.w3schools.com/cssref/css3_pr_background.php
  • 2 Votes
    20 Posts
    2k Views
    @phenomlab said in [NODEBB] Stats: @jac or I land up fixing it I wouldn’t put it past you
  • 5 Votes
    8 Posts
    1k Views
    @phenomlab Aha…nice to know. As always thank you for the reply and information.
  • 0 Votes
    7 Posts
    1k Views
    @phenomlab said in Social icon (Nodebb): @jac I just tested my theory around using the OG image, and according to the Twitter card validator, it works fine [image: 1638880098289-73e805e1-997b-41bf-9259-51c5052ca8fc-image.png] fixed
  • 2 Votes
    4 Posts
    1k Views
    @phenomlab said in How to set a signature in NodeBB?: @jac No issues at all with copying. This is set using the signature for the user you are posting as. In the case of Hostrisk, it’s set like the below [image: 1633427929198-7bf04183-f6e8-4d72-b0eb-c9a05c9cd24b-image.png] You can set the signature by using https://domain.com/user/theuser/edit Mamy thanks Mark, I’ll set this up later .
  • WordPress & NodeBB

    Solved WordPress 3 Sept 2021, 13:30
    0 Votes
    6 Posts
    934 Views
    @jac That won’t matter. You just redirect at nginx or apache level and it’ll work. The generally accepted standard though is to use a subdomain.