Skip to content

[NODEBB] Welcome Message

Solved Customisation
20 4 3.3k 1
  • @jac said in [NODEBB] Welcome Message:

    very clever indeed! does it show on mobile?

    Yes, natively, but I use CSS to hide it.

    @jac said in [NODEBB] Welcome Message:

    The idea is fantastic Mark, is there a point where you think yes my ideas are used by others but having the same features across a few forums, does that bother you or would you say this is why you created Sudonix?

    Absolutely not. I know that my ideas have been accepted and used by @JAC @DownPW @kurulumuNet and I’m happy that others find them useful. There’s no copyright here - anything you want to take and use is, like the platform itself, free.

    @phenomlab said in [NODEBB] Welcome Message:

    Absolutely not. I know that my ideas have been accepted and used by @JAC @DownPW @kurulumuNet and I’m happy that others find them useful. There’s no copyright here - anything you want to take and use is, like the platform itself, free.

    TWO WORDS: RESPECT, THANKS 🙂

  • DownPWundefined DownPW has marked this topic as solved on
  • @jac said in [NODEBB] Welcome Message:

    very clever indeed! does it show on mobile?

    Yes, natively, but I use CSS to hide it.

    @jac said in [NODEBB] Welcome Message:

    The idea is fantastic Mark, is there a point where you think yes my ideas are used by others but having the same features across a few forums, does that bother you or would you say this is why you created Sudonix?

    Absolutely not. I know that my ideas have been accepted and used by @JAC @DownPW @kurulumuNet and I’m happy that others find them useful. There’s no copyright here - anything you want to take and use is, like the platform itself, free.

    @phenomlab said in [NODEBB] Welcome Message:

    Yes, natively, but I use CSS to hide it.

    Can you give me your CSS code for hide on mobile ?

  • DownPWundefined DownPW has marked this topic as unsolved on
  • @phenomlab said in [NODEBB] Welcome Message:

    Yes, natively, but I use CSS to hide it.

    Can you give me your CSS code for hide on mobile ?

    @downpw Sure. Very simple - just place this in your mobile CSS block

    .getUsername {
      display: none;
    }
    
  • Great. That’s work !

    Easy as pie.
    Why didn’t I think of it?

    😉

  • DownPWundefined DownPW has marked this topic as solved on
  • What is your CSS for this @phenomlab ?
    I have small bug on Unread categorie for example with this code I wrote:

    .getUsername {
        float: right;
        font-family: 'Poppins';
        font-size: 1.6rem;
        line-height: 1.8;
        color: #898989;
        font-weight: 400;
    }
    

    2040e9b0-d14f-48a8-a681-782667985337-image.png

  • What is your CSS for this @phenomlab ?
    I have small bug on Unread categorie for example with this code I wrote:

    .getUsername {
        float: right;
        font-family: 'Poppins';
        font-size: 1.6rem;
        line-height: 1.8;
        color: #898989;
        font-weight: 400;
    }
    

    2040e9b0-d14f-48a8-a681-782667985337-image.png

    @downpw I use the below - essentially, using padding to overcome this

    .getUsername {
        padding-top: 20px;
        text-align: right;
    }
    
  • @downpw Sure. Very simple - just place this in your mobile CSS block

    .getUsername {
      display: none;
    }
    

    @phenomlab
    To hide only on mobile / tablet you can use max-width,
    For example:

    @media (max-width: 970px) {
         .getUsername {
       display: none;
    }
    }
    
  • @jac @DownPW here’s the function I put together than will need to be added into your Custom JS

    $(window).on('action:ajaxify.end', function (data) {
        function updateUsername() {
            $('.getUsername .username').text(app.user.username);
        }
        if (document.readyState === 'loading') {
            document.addEventListener('DOMContentLoaded', updateUsername);
        } else {
            updateUsername();
        }
        var thehours = new Date().getHours();
    	var themessage;
    	var morning = ('Good morning');
    	var afternoon = ('Good afternoon');
    	var evening = ('Good evening');
    
    	if (thehours >= 0 && thehours < 12) {
    		themessage = morning; 
    
    	} else if (thehours >= 12 && thehours < 17) {
    		themessage = afternoon;
    
    	} else if (thehours >= 17 && thehours < 24) {
    		themessage = evening;
    	}
    
    	$('.getUsername').prepend(themessage);
    });
    

    Then use a custom HTML widget with the below

    <!-- IF loggedIn -->
    <div class="getUsername">, <a href="/me"><span class="username"></span></a></div>
    <!-- ENDIF loggedIn -->
    

    For anyone reviewing this post, there’s an updated version here that also includes an sunrise / sun / moon icon depending on the time of day

    https://sudonix.com/topic/233/nodebb-welcome-message-with-logo-footer-change/3?_=1645445273209

  • phenomlabundefined phenomlab referenced this topic on
  • Hello,

    I have a question regarding a problem my user is experiencing with this Welcome message.
    This user is not in France.

    It’s 7:40 a.m. for him, so 1:40 a.m. in France, and the banner wishes me a “good afternoon.” I don’t know what time zone it thinks I’m in, but it’s wrong…

    And nodebb displays 11:40 p.m. on the right once posted, so GMT.
    Which isn’t the afternoon either.

    How does this script get the time? It looks like it’s getting the time from the client, meaning the computer or device of the person visiting your site.
    But it seems that in this specific case, the correct time isn’t being retrieved.

    How can I fix this?

  • Hello,

    I have a question regarding a problem my user is experiencing with this Welcome message.
    This user is not in France.

    It’s 7:40 a.m. for him, so 1:40 a.m. in France, and the banner wishes me a “good afternoon.” I don’t know what time zone it thinks I’m in, but it’s wrong…

    And nodebb displays 11:40 p.m. on the right once posted, so GMT.
    Which isn’t the afternoon either.

    How does this script get the time? It looks like it’s getting the time from the client, meaning the computer or device of the person visiting your site.
    But it seems that in this specific case, the correct time isn’t being retrieved.

    How can I fix this?

    @DownPW the ‘js’ code for the banner takes the time from the client, so what it displays really depends on the regional settings for the operating system.

    I’ve not seen this issue myself but would like to see some examples of screenshots if possible.


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
  • 50 Votes
    107 Posts
    10k Views
    @crazycells [image: 1711908210287-7f4c7193-7c28-4e2e-80e8-d439ac7285c6-image.png] [image: 1711908232109-3ab9c33d-04b9-4c15-91e6-891450aebfc2-image.png]
  • NodeBB v3 Chat Very Slow

    Moved Performance nodebb v3 nodebb chat
    47
    11 Votes
    47 Posts
    5k Views
    @DownPW Seems fine.
  • Top Ranked Forums

    Chitchat nodebb top ranked
    9
    1
    3 Votes
    9 Posts
    885 Views
    The real issue here is that most people consider forums to be “dead” in the sense that nobody uses them anymore, and social media groups have taken their place. Their once dominant stance in the 90’s and early 00’s will never be experienced again, but having said that, there are a number of forums that did in fact survive the social media onslaught, and still enjoy a large user base. Forums tend to be niche. One that immediately sticks out is Reddit - despite looking like it was designed in the 80s, it still has an enormous user base. Another is Stack Overflow, which needs no introduction. The key to any forum is the content it offers, and the more people whom contribute in terms of posting , the more popular and widely respected it becomes as a reliable source of information. Forums are still intensely popular with gamers, alongside those that offer tips on hacking etc.
  • NodeBB inline videoplayer

    Solved Customisation nodebb
    12
    3 Votes
    12 Posts
    1k Views
    @phenomlab YAY! It works Thanks so much
  • NodeBB Discord Plugins

    Unsolved Customisation nodebb discord plugin
    7
    0 Votes
    7 Posts
    1k Views
    @RiekMedia hi. Just following up on this thread (I know it’s old) but was curious to understand if it’s still an issue or not ?
  • NodeBB Design help

    Solved Customisation
    8
    3
    2 Votes
    8 Posts
    1k Views
    @riekmedia I’ve applied some new CSS to your site. Can you reload the page and try again ? For the record, this is what I added #footer { background: #2d343e; border-top: 4px solid #2d343e; font-size: 0.9em; margin-top: 70px; padding: 80px 0 0; position: relative; clear: both; bottom: 0; left: 0; right: 0; z-index: 1000; margin-left: -15px; margin-right: -338px; } The /categories page seems a bit messed up, so looking at that currently EDIT - issued some override CSS in the CATEGORIES widget <!--- CSS fix for overspill on /categories page - DO NOT DELETE --> <style> #footer { margin-right: -45px; } </style> That should resolve the /categories issue.
  • Customising NodeBB

    Locked Customisation nodebb
    3
    0 Votes
    3 Posts
    1k Views
    Closing this thread as a duplicate of https://sudonix.com/topic/12/nodebb-customisation
  • NodeBB customisation

    Locked Customisation
    332
    27 Votes
    332 Posts
    86k Views
    @jac Given your departure away from your previous project, I’m going to close this thread…