Skip to content

Fixed background to nodebb forum

Solved Configure
25 2 8.1k 1
  • @Panda first, define “skin”

    @phenomlab I go to admin menu and select skins
    Current one is Quartz

  • @phenomlab I go to admin menu and select skins
    Current one is Quartz

    @Panda ok, but which code runs this? Is it mine, or someone else’s work (it does make a difference.

    Edit - ok, unless I login, I cannot change the skin if it’s under admin. I’m being forced to wear sunglasses currently.

  • @Panda ok, but which code runs this? Is it mine, or someone else’s work (it does make a difference.

    Edit - ok, unless I login, I cannot change the skin if it’s under admin. I’m being forced to wear sunglasses currently.

    @phenomlab
    on aignite.nodebb.com I want to pick skin with colors that look ok over back image.
    But all the skins I try have at least one text color that is light and hard to see over image

  • @phenomlab
    on aignite.nodebb.com I want to pick skin with colors that look ok over back image.
    But all the skins I try have at least one text color that is light and hard to see over image

    @Panda it seems you are using the NodeBB skins which frankly, are terrible. They are all based on bootswatch and all have issues.

    You really need to custom develop a skin if your want it to look right.

  • @Panda it seems you are using the NodeBB skins which frankly, are terrible. They are all based on bootswatch and all have issues.

    You really need to custom develop a skin if your want it to look right.

    @phenomlab yea, this is what Im asking,
    Using a skin but maybe modifying one of the color choices

  • @phenomlab yea, this is what Im asking,
    Using a skin but maybe modifying one of the color choices

    @Panda the really depends on what you want to do. Are you offering the same skin to everyone, or do you want to have light and dark modes etc?

    If the one skin, then this is simple enough, but you’d need a lot of custom css to make this work.

  • @Panda the really depends on what you want to do. Are you offering the same skin to everyone, or do you want to have light and dark modes etc?

    If the one skin, then this is simple enough, but you’d need a lot of custom css to make this work.

    @phenomlab the background is supposed to be different for every user everytime they reload page
    but its always covered in light yellow color (alpha .86) so background will always be light

    Its just in each skin theres always one text color that is also light

  • Not sure why you are using a before pseudonym element to set the overlay. It’s much more efficient to do it this way (for example)

    body {
        position: relative;
        background-image: linear-gradient(to bottom, rgba(245, 246, 252, 0.52), rgba(117, 19, 93, 0.73)), url(https://loremflickr.com/500/500/flame);
        min-height: 90%;
        background-repeat: no-repeat;
        background-attachment: fixed;
        background-position: center;
        background-size: cover;
    }
    

    image.png

    The below CSS block should be removed

    body::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(255, 240, 220, 0.85);
        z-index: -100;
    }
    

    z-index: -100; is also overkill - -1 is usually always enough as this places the target element behind everything else.

  • Not sure why you are using a before pseudonym element to set the overlay. It’s much more efficient to do it this way (for example)

    body {
        position: relative;
        background-image: linear-gradient(to bottom, rgba(245, 246, 252, 0.52), rgba(117, 19, 93, 0.73)), url(https://loremflickr.com/500/500/flame);
        min-height: 90%;
        background-repeat: no-repeat;
        background-attachment: fixed;
        background-position: center;
        background-size: cover;
    }
    

    image.png

    The below CSS block should be removed

    body::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(255, 240, 220, 0.85);
        z-index: -100;
    }
    

    z-index: -100; is also overkill - -1 is usually always enough as this places the target element behind everything else.

    @phenomlab ah…
    Chatgpt told me the ::before method.
    Thanks for the human input 🙂

  • @phenomlab ah…
    Chatgpt told me the ::before method.
    Thanks for the human input 🙂

    @Panda said in Fixed background to nodebb forum:

    Chatgpt told me the ::before method.

    Go figure 😛


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
  • Nodebb vs Wordpress vs Other

    General wordpress nodebb woocomerce business
    4
    2 Votes
    4 Posts
    1k Views
    PrestaShop + modules IA https://www.prestashop.com Magento https://developer.adobe.com/open/magento
  • Nodebb and emails

    Solved Configure nodebb
    27
    5 Votes
    27 Posts
    7k Views
    @Panda it will use SMTP. In all cases, I never use any plugin to send email. I’ll always send it raw.
  • www. Infront stops website access?

    Solved Configure nodebb
    10
    1 Votes
    10 Posts
    2k Views
    @Panda because there is no match for the DNS entry specified. The receiving web server parses the headers looking for a destination hostname to match, and anything the web server is unable to resolve will be sent back to the root.
  • Further Widgets question

    Solved Configure nodebb
    4
    1
    1 Votes
    4 Posts
    1k Views
    @Panda category is for a category in its own, so for example, “fruit” whereas categories is the page that contains all categories as a list.
  • NodeBB: hCaptcha

    Solved Configure hcaptcha
    15
    2 Votes
    15 Posts
    3k Views
    @mventures none that I know of. I don’t recall selecting these either for mine.
  • 5 Votes
    13 Posts
    3k Views
    'use strict'; const winston = require('winston'); const user = require('../user'); const notifications = require('../notifications'); const sockets = require('../socket.io'); const plugins = require('../plugins'); const meta = require('../meta'); module.exports = function (Messaging) { Messaging.notifyQueue = {}; // Only used to notify a user of a new chat message, see Messaging.notifyUser Messaging.notifyUsersInRoom = async (fromUid, roomId, messageObj) => { let uids = await Messaging.getUidsInRoom(roomId, 0, -1); uids = await user.blocks.filterUids(fromUid, uids); let data = { roomId: roomId, fromUid: fromUid, message: messageObj, uids: uids, }; data = await plugins.hooks.fire('filter:messaging.notify', data); if (!data || !data.uids || !data.uids.length) { return; } uids = data.uids; uids.forEach((uid) => { data.self = parseInt(uid, 10) === parseInt(fromUid, 10) ? 1 : 0; Messaging.pushUnreadCount(uid); sockets.in(`uid_${uid}`).emit('event:chats.receive', data); }); if (messageObj.system) { return; } // Delayed notifications let queueObj = Messaging.notifyQueue[`${fromUid}:${roomId}`]; if (queueObj) { queueObj.message.content += `\n${messageObj.content}`; clearTimeout(queueObj.timeout); } else { queueObj = { message: messageObj, }; Messaging.notifyQueue[`${fromUid}:${roomId}`] = queueObj; } queueObj.timeout = setTimeout(async () => { try { await sendNotifications(fromUid, uids, roomId, queueObj.message); } catch (err) { winston.error(`[messaging/notifications] Unabled to send notification\n${err.stack}`); } }, meta.config.notificationSendDelay * 1000); }; async function sendNotifications(fromuid, uids, roomId, messageObj) { const isOnline = await user.isOnline(uids); uids = uids.filter((uid, index) => !isOnline[index] && parseInt(fromuid, 10) !== parseInt(uid, 10)); if (!uids.length) { return; } if (roomId != 11) { // 5 Is the ID of the ID of the global chat room. Messaging.getUidsInRoom(roomId, 0, -1); // Proceed as normal. } else { user.getUidsFromSet('users:online', 0, -1); // Only notify online users. } const { displayname } = messageObj.fromUser; const isGroupChat = await Messaging.isGroupChat(roomId); const notification = await notifications.create({ type: isGroupChat ? 'new-group-chat' : 'new-chat', subject: `email:notif.chat.subject, ${displayname}`, bodyShort: `notifications:new_message_from, ${displayname}`, bodyLong: messageObj.content, nid: `chat_${fromuid}_${roomId}`, from: fromuid, path: `/chats/${messageObj.roomId}`, }); delete Messaging.notifyQueue[`${fromuid}:${roomId}`]; notifications.push(notification, uids); } };
  • Top Ranked Forums

    Chitchat nodebb top ranked
    9
    1
    3 Votes
    9 Posts
    3k 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.
  • 0 Votes
    5 Posts
    2k Views
    @qwinter this particular site uses the code I wrote if you want to see it in action. It’s a information and intelligence gatherer I designed for collecting various information security articles from around the globe and consolidating them in one place. Essentially, each “post” is in fact generated by the script, and the NodeBB API. https://hostrisk.com/