Skip to content

Rendering issues post migration to Sudonix theme/code

Solved Bugs
49 4 20.5k 1
  • you can see the time section on home page,

    image.png

    but we go to the another page, the time section disappears adn only username written.
    how we can fix it?

    image.png

    wrote on last edited by phenomlab
    #14

    @cagatay In ACP->/admin/appearance/customise#custom-js locate the function with the description of

    Footer Greeting
    

    Delete these lines

        if (window.location.href.indexOf("topic") > -1) {
            //console.log("This is a topic, so hide the user welcome message");
           bar.removeClass('show');
        } else {
            $('.getUsername').prepend(themessage);
    
        }
    

    Remove the remark from

        //	$('.getUsername').prepend(themessage);
    

    So you have just

        $('.getUsername').prepend(themessage);
    

    Complete code

    // Footer Greeting
    $(window).on('action:ajaxify.end', function(data) {
        var bar = $('.reading-meter');
        function updateUsername() {
            $('.getUsername .username').text(app.user.username);
            $('.topicUsername').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');
        var matched = false;
        $('#getConsent').attr("href", "/user/" + app.user.username + "/consent");
        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);
    });
    

    That will enable the message again

    24fc2101-e750-463a-b150-e63559bb84f8-image.png

  • @cagatay In ACP->/admin/appearance/customise#custom-js locate the function with the description of

    Footer Greeting
    

    Delete these lines

        if (window.location.href.indexOf("topic") > -1) {
            //console.log("This is a topic, so hide the user welcome message");
           bar.removeClass('show');
        } else {
            $('.getUsername').prepend(themessage);
    
        }
    

    Remove the remark from

        //	$('.getUsername').prepend(themessage);
    

    So you have just

        $('.getUsername').prepend(themessage);
    

    Complete code

    // Footer Greeting
    $(window).on('action:ajaxify.end', function(data) {
        var bar = $('.reading-meter');
        function updateUsername() {
            $('.getUsername .username').text(app.user.username);
            $('.topicUsername').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');
        var matched = false;
        $('#getConsent').attr("href", "/user/" + app.user.username + "/consent");
        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);
    });
    

    That will enable the message again

    24fc2101-e750-463a-b150-e63559bb84f8-image.png

    wrote on last edited by
    #15

    @phenomlab thank you Mark.

  • wrote on last edited by
    #16

    The mentioned codes are not in my CSS, I think we solved this situation with the widget?

  • The mentioned codes are not in my CSS, I think we solved this situation with the widget?

    wrote on last edited by
    #17

    @cagatay said in Rendering issues post migration to Sudonix theme/code:

    The mentioned codes are not in my CSS, I think we solved this situation with the widget?

    Here :

    @phenomlab said in Rendering issues post migration to Sudonix theme/code:

    @cagatay In ACP->/admin/appearance/customise#custom-js

  • The mentioned codes are not in my CSS, I think we solved this situation with the widget?

    wrote on last edited by
    #18

    @cagatay said in Rendering issues post migration to Sudonix theme/code:

    The mentioned codes are not in my CSS, I think we solved this situation with the widget?

    This is not CSS - it’s JS, hence ACP->/admin/appearance/customise#custom-js

  • wrote on last edited by
    #19

    ah soryy for my mistake 🙂

  • ah soryy for my mistake 🙂

    wrote on last edited by
    #20

    @cagatay dog you get this working eventually?

  • @cagatay dog you get this working eventually?

    wrote on last edited by
    #21

    @phenomlab yes my friend, working correctly.

  • @phenomlab yes my friend, working correctly.

    wrote on last edited by
    #22

    @cagatay good. Thanks for confirming.

  • wrote on last edited by
    #23

    Can we ensure that the section I show in the picture can be hidden after the user reads it once?

    image.png

  • Can we ensure that the section I show in the picture can be hidden after the user reads it once?

    image.png

    wrote on last edited by
    #24

    @cagatay Not easily without modifying the function itself. The function will look for the end of the thread and append the banner there. It’s possible to place a cookie on the user’s machine, although they will need to dismiss the banner for that to be saved.

    One other immediate issue is that the cookie is browser session based, so you would need a unique identifier to determine if the message should be displayed or not - this essentially means that we test for the existence of a stored cookie on chat load and if we find a match, we hide the message.

    This will have an impact on performance if you have hundreds of chat messages available, and for that reason, I’d recommend not taking this route.

  • wrote on last edited by
    #25

    got the point Mark, thank you for your explanation.

  • wrote on last edited by
    #26

    Hi,
    How can i change those areas colors to white one?

    image.png

  • wrote on last edited by DownPW
    #27

    Try your browser’s developer tools to try to find the codes that interest you 🙂

    To test & adapt because I searched very quickly :

    .skin-noskin .composer {
        background-color: #xxxxxx !important;
        color: #xxxxxx !important;
    }
    
    .bootstrap-tagsinput, .form-control {
        background-color: #xxxxxx;
        border: 1px solid var(--bs-border-color);
        color: var(--bs-body-color);
    }
    
    .bootstrap-tagsinput, .form-control {
        background-color: var(--bs-card-cap-bg);
        border: 1px solid var(--bs-border-color);
        color: var(--bs-body-color);
    }
    
    .composer .tags-container .bootstrap-tagsinput {
        background: #xxxxxx;
    }
    
  • Hi,
    How can i change those areas colors to white one?

    image.png

    wrote on last edited by phenomlab
    #28

    @cagatay As you are using the Sudonix themes, find

    .bootstrap-tagsinput, .form-control
    

    And replace it with this

    .bootstrap-tagsinput, .form-control {
        background-color: var(--bs-body-bg) !important;
        border: 1px solid var(--bs-border-color);
        color: var(--bs-body-color);
    }
    

    And, find

    .composer .tags-container .bootstrap-tagsinput input
    

    Replace the block with

    .composer .tags-container .bootstrap-tagsinput input, ::placeholder {
        color: var(--bs-body-color-muted) !important;
    }
    
  • wrote on last edited by
    #29

    thank you Mark.
    By the way, gif is not working i dont know why?
    For example;

    https://media.tenor.com/8tZBsGlFtg8AAAAC/evil-plan-evil.gif

  • thank you Mark.
    By the way, gif is not working i dont know why?
    For example;

    https://media.tenor.com/8tZBsGlFtg8AAAAC/evil-plan-evil.gif

    wrote on last edited by phenomlab
    #30

    @cagatay said in Rendering issues post migration to Sudonix theme/code:

    By the way, gif is not working i dont know why?

    It not that it doesn’t work - you have included a link to an image, which OGProxy tries to render but won’t because it’s an image and not a site URL as such.

    For “Giphy” type images, you should use the f36bad9e-8c0a-49f0-9321-7d3f77d2f7b6-image.png button and select an image from there - for example

    Cat Cute GIF

  • wrote on last edited by cagatay
    #31

    so i dont have any gif section and also mine is not similar as yours.

    27305b62-ae00-4902-b741-beca4bca2850-image.png

  • so i dont have any gif section and also mine is not similar as yours.

    27305b62-ae00-4902-b741-beca4bca2850-image.png

    wrote on last edited by
    #32

    @cagatay because you don’t have the giphy extensuon installed.

  • wrote on last edited by
    #33

    you mean tenor gif?


Did this solution help you?
Did you find the suggested solution useful? Support 💗 Sudonix with a coffee ☕
If your organisation needs deeper expertise around infrastructure, security, or technology leadership, learn more about Phenomlab Ltd. Many of the deeper technical guides behind Sudonix are published there.

Related Topics
  • CTA banner for visitors

    Solved Bugs bug
    3
    1
    2 Votes
    3 Posts
    2k Views
    phenomlab
    @crazycells Yes, because of this code $(document).ready(function () { $(window).on('action:ajaxify.end', function (data) { if (config && config.uid > 0) { // User is logged in, so don't fire any message } else { // Insert content into the selected element var addAfterLastPost = $( "<div class='alert alert-warning alert-dismissible fade show' role='alert'>" + "<p><strong>Hello! It looks like you're interested in this conversation, but you don't have an account yet.</strong></p>" + "<p>Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, " + "and choose to be notified of new replies (ether email, or push notification). You'll also be able to save bookmarks, use reactions, and upvote to show your appreciation to other community members.</p>" + "<p>With your input, this post could be even better 💗"+ "<br><br>"+ "<a style='margin-right:5px;' component='topic/reply/guest' href='/register' class='fw-semibold btn btn-sm btn-warning'>Register</a>" + "<a component='topic/reply/guest' href='/login' class='fw-semibold btn btn-sm btn-info'>Log in</a>" + "<button type='button' class='btn-close' data-bs-dismiss='alert' aria-label='Close'></button>" + "</div>" ); $('ul[component="topic"]').after(addAfterLastPost); } }); }); This was adopted into core as far as I know, so I’ve removed my manual code.
  • problem with search page and copyright in footer

    Solved Bugs bug
    13
    1
    6 Votes
    13 Posts
    4k Views
    crazycells
    @phenomlab yes, search page is fixed thanks
  • nodebb error logs

    Bugs nodebb
    6
    2
    4 Votes
    6 Posts
    2k Views
    ahmed
    I just wanted to ask because I don’t have much knowledge about the new installation. Thank you for the explanatory answer.
  • Loading Image Problem

    Bugs hata bug
    24
    3
    6 Votes
    24 Posts
    11k Views
    cagatay
    Thank you Mark.
  • Bug Report

    Solved Bugs nodebb bugs
    47
    1
    26 Votes
    47 Posts
    20k Views
    phenomlab
    @crazycells Good points, thanks. I completely forgot that classes are added - makes life much simpler! EDIT - seems this is pretty straightforward, and only needs the below CSS .upvoted i { color: var(--bs-user-level) !important; } This then yields [image: 3f072f8a-ebfa-4910-8723-73c493b8e4eb-image.png] However, the caveat here is that the .upvoted class will only show for your upvotes, and nobody else’s. However, this does satisfy the original request however I would love to see my upvoted posts more clearly, because currently, when I upvote, nothing on the post tool is changing, it would be nicer if there is an indication that I have upvoted (like a filled or colored triangle?)
  • Nodebb 3.2.2

    Bugs nodebb 3.2.2
    27
    1
    11 Votes
    27 Posts
    11k Views
    phenomlab
    @crazycells yes, I’ve just seen that and modified the post. It seems to only happen if you have a space between the “greater than” symbol and the actual text. Clearly a markdown thing.
  • Issues with Imgur images in Fancybox chat module

    Bugs fancybox chat
    12
    1
    2 Votes
    12 Posts
    4k Views
    phenomlab
    @DownPW looks good to me.
  • Nav Drop-down [Sudonix]

    Moved Bugs
    3
    1
    1 Votes
    3 Posts
    2k Views
    JAC
    @phenomlab said in Nav Drop-down [Sudonix]: @jac Fixed [image: d2e5410b-fa82-4fc9-a861-7913d3c560ab-image.png] Thanks for reporting. Thanks mate, not a problem .