Skip to content

NodeBB: The global Search option

Solved Configure
  • Hi,
    I noticed both on the NodeBB forum, Sudonix forum, and mine also, there is no Search functionality. I would like this very much because I would like people to search for a past answer before asking for a new one. Maybe, I am looking at the wrong place, or do I need to activate it from admin?

  • My apologies! I have found the Search field on NodeBB and your site. I just need to figure out how to get it on my site. Could it be because I have no posts yet?

    @mventures Not quite - it’s because of this

    ff0a9849-5815-4c7a-853a-808fd325a779-image.png

    It’s installed, but not activated by default

    f6280a04-ace2-43a6-8e9a-4614efecba84-image.png

    Every time you install or uninstall a plugin, you need to rebuild NodeBB

    c638615a-4597-41f6-ad32-b552c8433c06-image.png

    f539df98-cb0c-4875-abf4-b61a60333ad5-image.png

    f311a7a0-05b7-4036-820d-85661410369b-image.png

    Confirm, and wait for NodeBB to restart

    bd46bebc-58c6-400a-a3f3-1bd09e17a5b0-image.png

    b1b5263e-f68a-4a34-99b6-5147979fb8af-image.png

    Now go back to your site

    You should see that Search has appeared

    39af2e82-15ec-4add-a758-f422b60c43ba-image.png

    I’ve done all of this for you, so this is for reference.

    Regds

  • My apologies! I have found the Search field on NodeBB and your site. I just need to figure out how to get it on my site. Could it be because I have no posts yet?

  • My apologies! I have found the Search field on NodeBB and your site. I just need to figure out how to get it on my site. Could it be because I have no posts yet?

    @mventures Not quite - it’s because of this

    ff0a9849-5815-4c7a-853a-808fd325a779-image.png

    It’s installed, but not activated by default

    f6280a04-ace2-43a6-8e9a-4614efecba84-image.png

    Every time you install or uninstall a plugin, you need to rebuild NodeBB

    c638615a-4597-41f6-ad32-b552c8433c06-image.png

    f539df98-cb0c-4875-abf4-b61a60333ad5-image.png

    f311a7a0-05b7-4036-820d-85661410369b-image.png

    Confirm, and wait for NodeBB to restart

    bd46bebc-58c6-400a-a3f3-1bd09e17a5b0-image.png

    b1b5263e-f68a-4a34-99b6-5147979fb8af-image.png

    Now go back to your site

    You should see that Search has appeared

    39af2e82-15ec-4add-a758-f422b60c43ba-image.png

    I’ve done all of this for you, so this is for reference.

    Regds

  • phenomlabundefined phenomlab has marked this topic as solved on
  • That’s awesome @phenomlab! Thank you. I can see it 🙂

    What did you mean by, “rebuild NodeBB”? And the whole rebuild happens by just clicking that “recycle” button?

  • That’s awesome @phenomlab! Thank you. I can see it 🙂

    What did you mean by, “rebuild NodeBB”? And the whole rebuild happens by just clicking that “recycle” button?

    @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.


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 v4.0.0

    General nodebb sudonix version 4
    28
    4 Votes
    28 Posts
    682 Views
    @Panda said in NodeBB v4.0.0: the workings of World aren’t intuitive Its not easy to get World populating when a forum is new to it This is a good point and one I’ve considered also. It’s a little confusing to be honest.
  • Nodebb and emails

    Solved Configure nodebb
    27
    5 Votes
    27 Posts
    984 Views
    @Panda it will use SMTP. In all cases, I never use any plugin to send email. I’ll always send it raw.
  • build nodebb Warning in entrypoint size limit

    Solved Performance nodebb
    2
    0 Votes
    2 Posts
    307 Views
    @eeeee they are nothing to worry about, and can be ignored.
  • NodeBB: hCaptcha

    Solved Configure hcaptcha
    15
    2 Votes
    15 Posts
    706 Views
    @mventures none that I know of. I don’t recall selecting these either for mine.
  • NodeBB: Consent page

    Solved Configure nodebb consent
    16
    4 Votes
    16 Posts
    1k Views
    @DownPW I still do not see any issues.
  • 5 Votes
    13 Posts
    815 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); } };
  • restarting nodebb on boot

    Unsolved Configure nodebb
    3
    1 Votes
    3 Posts
    430 Views
    @eeeee said in restarting nodebb on boot: can I just run nodebb under nodemon for auto restarts? It’s a better method. Nodemon just looks for file system changes and would effectively die if the server was rebooted meaning you’d have to start it again anyway. Systemd is the defacto standard which is how the operating system interacts in terms of services, scheduled tasks etc.
  • [NodeBB] username cards

    Solved Customisation nodebb
    8
    5 Votes
    8 Posts
    1k Views
    @phenomlab Aha…nice to know. As always thank you for the reply and information.