Skip to content
  • Categories
  • Recent
  • Popular
  • World
Skins
  • Light
  • Dark

Collapse

NodeBB

MTO- NodeBB on Elestio

Scheduled Pinned Locked Moved Website Maintenance
83 Posts 1 Posters 338 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Grant LamontagneG
    Grant LamontagneG
    Grant Lamontagne
    administrators
    wrote on last edited by
    #52

    Big ones on the to-do list are:

    • Finish Merit Badges
    • Private messages
    • Treasury

    I think those are the only things left to do before we do the import. Other things we can deal with as we go.

    Are there any other things we need to deal with that are major concerns?

    The Smileys should be set up and just need to be imported, and the Merit Badge system is mostly done and also needs to be imported.

    Let me know what else needs to be done ASAP please.

    Def


    1 Reply Last reply
    0
    • Grant LamontagneG
      Grant LamontagneG
      Grant Lamontagne
      administrators
      wrote on last edited by
      #53

      Private Messages should be (more or less) working now.

      MTO PM — Daily Development Log / Executive Summary
      Date: October 7, 2026
      Project: MultiTool.Org — MTO Private Messages
      NodeBB: 4.16.0
      Status: 🟢 Core PM prototype functioning; navigation work in progress
      Executive Summary
      Today we successfully built and tested the foundation of a standalone Private Message system for NodeBB, independent of NodeBB's native Live Chat.
      The system is now capable of:

      • Displaying My Messages
      • Creating a new PM
      • Selecting a recipient
      • Entering subject/body
      • Sending a PM
      • Delivering the PM to another user
      • Displaying PM threads
      • Reading messages
      • Tracking read/unread state
      • Replying/quoting at the backend level
      • Deleting messages for the individual user
      • Opening the PM system from the main forum navigation
      • Opening the New Message composer from the PM inbox
        The last test tonight successfully opened:
        https://multitool.ninja/mto-messages/compose
        and displayed the New Message form.
        Architecture
        MTO PM is intentionally not using NodeBB Live Chat.
        We initially tested NodeBB's Messaging.getRecentChats() and discovered that this accesses the existing Live Chat/private-room system. That was rejected because the new PM system needs to reproduce the old SMF-style PM experience independently.
        The PM system therefore has its own Redis/database namespace:
        mto:pm

      Current storage concepts include:
      mto:pm:messages
      mto:pm:message:<id>
      mto:pm:thread:<id>
      mto:pm:thread:<id>:messages
      mto:pm:inbox:<uid>
      mto:pm:outbox:<uid>
      mto:pm:unread:<uid>

      This separation is important and should be maintained.
      Current Files
      Plugin
      /usr/src/app/nodebb-plugin-mto-messages/

      Important files:
      library.js
      lib/pm.js
      plugin.json
      templates/mto-messages.tpl
      templates/mto-messages-thread.tpl
      templates/mto-messages-compose.tpl

      Theme
      /usr/src/app/nodebb-theme-mto/

      Important files:
      library.js
      plugin.json
      theme.json
      templates/partials/header/brand.tpl
      static/lib/mto-topic-actions.js

      Working PM Routes
      These server-side routes are functioning:
      /mto-messages
      /mto-messages/compose
      /mto-messages/<threadId>

      POST operations include:
      /mto-messages/send
      /mto-messages/delete/<id>

      CSRF protection is being used on the POST routes.
      Database / PM Logic
      lib/pm.js currently provides the core PM functionality:

      • getMessage
      • getThread
      • getThreadMessages
      • isParticipant
      • createMessage
      • listInboxThreads
      • markThreadRead
      • deleteForUser
      • renderInbox
      • renderThread
      • renderCompose
      • sendFromRequest
        A participant-storage issue was encountered earlier.
        Initially, storing the participant array directly did not behave as expected with NodeBB's database object handling.
        We changed the thread structure to:
        participant1
        participant2

      and getThread() derives the participants from the first message in the thread as a fallback/source of truth.
      That resolved the participant problem and allowed PM delivery/reply functionality to work.
      What We Successfully Tested
      We tested sending PMs between accounts.
      The recipient received the PM.
      The inbox displayed conversations.
      The thread view displayed:

      • sender
      • subject
      • timestamp
      • message body
      • Reply
      • Quote
      • Delete
        The basic PM exchange therefore works.
        Navigation Issue We Solved Tonight
        NodeBB's client-side AJAX navigation was causing custom MTO routes to produce:
        Not Found

      when clicked from the forum, even though manually loading the URL worked.
      For example:
      https://multitool.ninja/mto-messages

      worked when directly loaded, but clicking the header link initially caused a NodeBB Not Found page.
      We discovered that the MTO theme already contains a known workaround for custom routes, specifically for the MTO Merit Badges route.
      The active theme file is:
      /usr/src/app/nodebb-theme-mto/static/lib/mto-topic-actions.js

      We added a similar PM navigation mechanism.
      The PM navigation handler now exists at the beginning of that file:
      (function () {
      // =========================================================
      // MTO PRIVATE MESSAGES NAVIGATION
      // Bypass NodeBB ajaxify for the custom MTO PM route.
      // =========================================================
      $(document).on("click", "a.mtorg-private-messages-link", function (e) {
      if (e.which !== 1 || e.ctrlKey || e.shiftKey || e.metaKey) {
      return;
      }

          e.preventDefault();
          e.stopImmediatePropagation();
          window.location.assign(this.href);
      });
      

      }());

      There was a shell-quoting mistake while inserting this code which temporarily corrupted the JavaScript. That was repaired and verified.
      The existing Merit Badges navigation handler was also preserved.
      Header PM Link
      The header originally pointed toward NodeBB Live Chat.
      That was changed from the old chat URL to:
      <a href="{relative_path}/mto-messages" ...>

      We ultimately found that the most reliable solution was an inline navigation override:
      <a href="{relative_path}/mto-messages" onclick="window.location.href=this.href; return false;">

      The header now successfully opens:
      https://multitool.ninja/mto-messages

      This was confirmed tonight.
      New Message Navigation
      The same AJAX issue affected the New Message button.
      We changed:
      <a class="btn btn-primary" href="/mto-messages/compose">

      to:
      <a class="btn btn-primary"
      href="/mto-messages/compose"
      onclick="window.location.href=this.href; return false;">

      After restarting NodeBB and refreshing the browser, this was successfully tested.
      Final test tonight
      The New Message page successfully loaded:
      https://multitool.ninja/mto-messages/compose

      The form displayed:
      New Message

      To
      Subject
      Message

      Send Message
      Cancel

      This is where we stopped.
      Current Known Issue / Next Task
      The PM system still needs the same navigation treatment applied to the remaining internal PM links.
      Likely candidates:
      Inbox

      • conversation/thread links
      • New Message — already fixed
        Thread view
      • Back to My Messages
      • New Message
      • Reply
      • Quote
        Compose
      • My Messages / Cancel
        The backend functionality for Reply/Quote already exists, but their links have not yet been tested after solving the navigation issue.
        So the next logical step tomorrow is:
      1. Test the remaining PM navigation
        Especially:
        My Messages
        ↓
        Thread
        ↓
        Reply

      and:
      Thread
      ↓
      Quote

      Then verify that the reply actually appears in the existing thread.
      After Navigation Is Stable
      Once the core navigation is solid, we should move to the next functional layer rather than spending time on visual polish.
      Suggested order:
      Phase 1 — Finish functional MVP

      • Thread links
      • Reply
      • Quote
      • Back to inbox
      • Cancel
      • Delete testing
      • Read/unread verification
      • Two-account end-to-end test
      • Verify permissions/security
      • Verify users cannot access another user's thread

        Phase 2 — PM features
      • Outbox / Sent Messages
      • BCC
      • Multiple recipients
      • Message labels
      • Better recipient selection
      • Message management
      • Pagination
      • Empty states
      • Unread PM counter in header

        Phase 3 — SMF-style experience
      • Rich text editor
      • Smilies
      • Quote formatting
      • User avatars/details
      • Reply/Delete actions styled like SMF
      • Conversation/message metadata
      • Exact inbox layout
      • Preferences
      • Save copy in Outbox
      • More complete message-management controls

        Phase 4 — Polish
        Only after functionality is stable:
      • Exact
        MultiTool.Org styling
      • Dark/light theme consistency
      • Icons
      • Responsive/mobile layout
      • Header unread badge
      • Pagination appearance
      • Fine UI spacing
      • SMF-inspired presentation

        Important Things NOT to Change Tomorrow
        Do not migrate MTO PM onto NodeBB Live Chat.
        Keep the independent:
        mto:pm:*

      storage architecture.
      Also, don't start redesigning the interface yet. The current objective is still:
      Get the complete PM workflow working reliably first; make it pretty afterward.

      Current Milestone
      🟢 Completed
      Standalone MTO PM backend + inbox + compose + sending + receiving + thread display + basic read/unread + deletion + header navigation + New Message navigation
      🟡 In progress
      Internal PM navigation and complete reply/quote workflow
      ⚪ Later
      SMF-level feature completeness and visual polish
      Tomorrow's starting point
      The first thing to say to the next ChatGPT instance would be:
      “We are building the standalone MTO PM system for NodeBB 4.16.0. The PM backend is working and the header /mto-messages link and New Message /mto-messages/compose link now work using normal browser navigation to bypass NodeBB AJAXify. We stopped after successfully opening the New Message composer. Next, test/fix the remaining internal PM links—thread links, Reply, Quote, Back to My Messages, and Cancel—and verify reply messages appear in the same thread. Do not switch to NodeBB Live Chat.”


      1 Reply Last reply
      0
      • Grant LamontagneG
        Grant LamontagneG
        Grant Lamontagne
        administrators
        wrote on last edited by
        #54

        MTO Private Messages — Daily Development Log / Executive Summary

        Date: October 9, 2026
        Project: MultiTool.Org — MTO Private Messages
        NodeBB: 4.16.0
        Environment: Docker (app-nodebb-1, app-redis-1)
        Theme: /usr/src/app/nodebb-theme-mto/
        PM Plugin: /usr/src/app/nodebb-plugin-mto-messages/
        Status: 🟢 Core PM workflow and notification synchronization working; further feature development remains.


        1. Executive Summary

        Since the October 7 log, we continued development of the standalone MTO Private Messages system and improved its integration with the forum theme.

        The major accomplishments were:

        • Continued work on the PM thread and reply/quote experience.
        • Improved PM navigation and notification navigation.
        • Added a custom PM unread-count endpoint and initially connected it to the header badge.
        • Corrected the header count so it used the MTO PM unread system rather than NodeBB Live Chat's count.
        • Integrated PM thread reading with NodeBB's notification read/unread state.
        • Removed the PM unread-count badge from the main header by design.
        • Confirmed that the side notification bell displays a new PM notification and clears its unread indicator after the conversation is opened.
        • Preserved the independent mto:pm:* storage architecture.

        Current result: The top menu retains the Private Messages link without a separate unread badge. The notification bell is the single place for unread notification alerts. Opening a PM thread marks its associated NodeBB notification as read.

        2. Existing PM Architecture Preserved

        The PM system remains independent of NodeBB Live Chat.

        Redis/database namespace:

        mto:pm

        Existing storage concepts include:

        • mto:pm:messages
        • mto:pm:message:<id>
        • mto:pm:thread:<id>
        • mto:pm:thread:<id>:messages
        • mto:pm:inbox:<uid>
        • mto:pm:outbox:<uid>
        • mto:pm:unread:<uid>

        Do not migrate the system to NodeBB Live Chat. The standalone storage design is intentional.

        3. PM Workflow and Theme Improvements

        The following areas were worked on or confirmed during the continued development.

        Navigation

        The custom PM routes use normal browser navigation where necessary to bypass NodeBB AJAXify issues.

        Working PM routes include:

        • /mto-messages
        • /mto-messages/compose
        • /mto-messages/<threadId>

        POST routes include:

        • /mto-messages/send
        • /mto-messages/delete/<id>

        The PM notification path directs users to their custom MTO PM thread route. The theme's PM notification navigation avoids the NodeBB AJAXify Not Found problem.

        Reply and quote experience

        The thread interface includes Reply, Quote, and Delete actions. Further work was done on reply history, multi-quote behavior, and the positioning and return navigation of the composer.

        These improvements were made in the custom theme JavaScript and PM templates. Continue to test the entire workflow after future changes rather than assuming every edge case has been covered.

        Other theme functionality

        The existing theme JavaScript also received work involving:

        • Share and print actions.
        • Merit Badges navigation.
        • Post counts.
        • Composer button placement and title/return links.
        • Registration-page customization.
        • Per-post reply-body behavior.
        • PM notification navigation and badge handling.

        The principal theme JavaScript file is:

        /usr/src/app/nodebb-theme-mto/static/lib/mto-topic-actions.js

        The working theme has legitimate local modifications and backup files. Do not reset or check out the Git working tree.

        4. PM Unread Count and Notification Synchronization

        Original issue

        The custom PM system tracked unread messages separately from NodeBB's notification bell. This could result in duplicate indicators or a notification remaining unread after the user had already opened the PM conversation.

        Custom unread-count endpoint

        Added PM.getUnreadCount(uid) to:

        /usr/src/app/nodebb-plugin-mto-messages/lib/pm.js

        The function returns the number of entries in the user's custom MTO PM unread sorted set.

        Added the authenticated endpoint in:

        /usr/src/app/nodebb-plugin-mto-messages/library.js

        Route:

        GET /mto-messages/unread-count

        It returns a JSON count for a logged-in user and rejects unauthenticated requests.

        The endpoint was previously confirmed in the logged-in browser to return a count of 1 when one unread PM existed. A direct unauthenticated curl request returned 403 Forbidden, which was expected for that test.

        NodeBB notification-read integration

        Inspected the NodeBB implementation in:

        /usr/src/app/src/notifications.js

        Confirmed the existence of:

        Notifications.markReadMultiple(nids, uid)

        This API moves notifications owned by the specified user from their unread notification set to their read notification set.

        Updated PM.markThreadRead() in:

        /usr/src/app/nodebb-plugin-mto-messages/lib/pm.js

        After removing the thread's message IDs from the custom MTO PM unread set, the function now marks the corresponding NodeBB notifications as read:

        const notifications = nodebb.require("./src/notifications");
        await notifications.markReadMultiple(
            ids.map(id => `mto_pm_${id}`),
            Number(uid)
        );
        

        The notification IDs use the existing mto_pm_<messageId> naming convention.

        A malformed expression occurred during shell-based editing. It was corrected, and node --check lib/pm.js passed afterward.

        Important behavior

        The integration marks notifications as read; it does not deliberately delete them. Other unrelated NodeBB notifications should remain unaffected.

        5. Header Design Decision

        Initially, the top-menu Private Messages link was given a custom unread-count badge driven by the MTO PM unread endpoint.

        The implementation included:

        • A badge in templates/partials/header/brand.tpl.
        • A PM.getUnreadCount(uid) helper.
        • The /mto-messages/unread-count route.
        • Theme JavaScript to fetch and update the badge.

        After reviewing the live interface, we decided that the additional top-menu count was unnecessary because NodeBB already displays unread notifications in the side notification bell.

        Final header change

        Removed the following badge element from:

        /usr/src/app/nodebb-theme-mto/templates/partials/header/brand.tpl

        <span class="mtorg-pm-count badge rounded-1 bg-primary hidden" aria-label="Unread private messages">0</span>
        

        The Private Messages navigation link remains.

        A timestamped backup was created before changing the template, using the filename prefix:

        brand.tpl.before-hide-pm-count-

        Final intended interface

        • Main header: Private Messages link without a count badge.
        • Side notification bell: displays unread PM alerts alongside other NodeBB notifications.
        • Opening a PM thread: marks the corresponding PM notification as read.
        • Unrelated notifications: remain subject to NodeBB's normal read/unread behavior.

        The custom unread-count endpoint and related code have not been removed; only the visible header badge was removed.

        6. Backups and Safety

        Backups created during the October 9 work include:

        • lib/pm.js.before-unread-badge-20261009-222608
        • library.js.before-unread-badge-20261009-222608
        • mto-topic-actions.js.before-unread-badge-20261009-222608
        • lib/pm.js.before-notification-read-sync-<timestamp>
        • brand.tpl.before-hide-pm-count-<timestamp>

        The exact timestamped filenames can be listed in their respective directories.

        Safety notes:

        • Redis security settings were not changed.
        • No Git reset or checkout was performed.
        • NodeBB core notification source was inspected but not modified.
        • Existing theme customizations and backups must be preserved.
        • Make a fresh backup before any further edits.

        7. Verification and Final Test

        The following results were observed:

        1. The custom PM unread endpoint returned a valid count in the authenticated browser.
        2. The custom PM thread continued to load correctly.
        3. The PM notification appeared in the side notification bell.
        4. Opening the PM thread caused the unread indicator to clear.
        5. The main header no longer displays a separate PM count badge.
        6. The user performed a repeat test and confirmed that the behavior works.

        Final status: The notification behavior is working as intended.

        No additional changes to this feature are currently required.

        8. Remaining Work

        The October 7 plan remains relevant for features not yet confirmed as complete.

        Functional testing and reliability

        • Full two-account end-to-end testing of sending, receiving, replying, quoting, and deleting.
        • Verify all PM internal links and cancellation/return behavior.
        • Verify that users cannot access another user's private threads.
        • Review permissions and security for every PM route.
        • Test unread state across multiple messages and conversations.
        • Test notification behavior with multiple unread PMs and unrelated notifications.
        • Confirm whether the sent/outbox view is fully implemented and tested.

        Additional PM features

        • Outbox / Sent Messages.
        • BCC and multiple recipients.
        • Message labels and management controls.
        • Improved recipient selection.
        • Pagination and empty states.
        • Preferences and save-copy-in-Outbox behavior.

        SMF-style experience and visual polish

        • Rich text editor and smilies.
        • Quote formatting.
        • User avatars and metadata.
        • Complete inbox/thread controls and layout.
        • Responsive/mobile behavior.
        • Consistent dark/light theme appearance.

        Do not prioritize visual redesign over workflow reliability.

        9. Starting Instructions for the Next ChatGPT Session

        We are building a standalone MTO Private Messages system for NodeBB 4.16.0.

        The system uses its own mto:pm:* namespace and must not be migrated to NodeBB Live Chat.

        The PM inbox, composer, sending/receiving, thread display, deletion, and custom navigation were already established in the October 7 work. Subsequent work improved reply/quote interactions and notification handling.

        As of October 9:

        • The header's Private Messages link works without an unread-count badge.
        • New PM notifications appear in NodeBB's side notification bell.
        • Opening a PM thread marks its corresponding NodeBB PM notification as read.
        • The user has confirmed that the unread indicator clears as expected.

        Next priority: Continue functional testing, security/permissions verification, and any unfinished PM workflow tasks. Preserve working customizations and create backups before edits. Do not redesign the interface or switch to NodeBB Live Chat unless explicitly requested.


        1 Reply Last reply
        0
        • Grant LamontagneG
          Grant LamontagneG
          Grant Lamontagne
          administrators
          wrote on last edited by
          #55

          Session Log — MTO Private Messaging: Group Messaging

          Date: October 13, 2026
          Environment: NodeBB v4.16.2, Elestio Docker deployment
          Application container: app-nodebb-1
          Plugin directory: /usr/src/app/nodebb-plugin-mto-messages
          Status: Core group messaging implemented and functionally tested

          1. Objective

          Extend the existing MTO private messaging plugin to support multiple recipients in a shared conversation, while preserving existing one-to-one messaging and integrating new-message alerts with the NodeBB notification bell.

          2. Changes made

          Backend — lib/pm.js

          • Updated conversation retrieval to use thread participants when identifying a user's conversations.
          • Updated thread access checks to verify that the requesting user is a participant.
          • Extended createMessage() to accept multiple recipient UIDs.
          • Stored all participants in a shared conversation thread.
          • Added a recipientUids field to new messages while retaining the legacy recipientUid field for compatibility.
          • Added each message to every recipient's inbox index and the sender's outbox.
          • Kept replies in the existing shared thread and routed them to all other participants.

          Routes and notifications — library.js

          • Updated the send handler to accept multiple recipient UIDs through toUids, while retaining support for the existing toUid field.
          • Added recipient validation, including a maximum of 20 recipients per new conversation.
          • Updated group replies to target all other thread participants.
          • Preserved the existing notification creation logic and changed notification delivery to include all recipients of a message.
          • Updated the inbox conversation summary to display the other participants' usernames.
          • Updated the thread route to supply participant names to the conversation template.

          Compose page — templates/mto-messages-compose.tpl

          • Replaced single-recipient selection with a multi-recipient selector.
          • Retained username autocomplete.
          • Added selected-recipient chips with removal controls.
          • Kept the subject and message fields.
          • Added client-side validation requiring at least one recipient and limiting selection to 20 recipients.

          Conversation page — templates/mto-messages-thread.tpl

          • Added a participant summary beneath the conversation subject.
          • Preserved the existing message display and reply form.

          3. Backups created

          The following backups were created during this session:

          • backup-before-groups-20261013-025359/ — pm.js and library.js
          • backup-participants-20261013-030233/ — library.js and mto-messages-thread.tpl
          • mto-messages-compose.tpl.backup-20261013-030041 — original compose template

          An earlier backup was also present:

          • backup-group-pm-20261013-024650/

          These backups are located in the plugin directory. Preserve them until the implementation has been used successfully in normal operation.

          4. Validation and testing

          • JavaScript syntax checks passed for lib/pm.js and library.js.
          • The compose template and participant-summary changes were verified to be present.
          • NodeBB restarted successfully.
          • Asset compilation completed successfully.
          • Redis connected successfully.
          • NodeBB reported NodeBB Ready.
          • The log confirmed [MTO PM] Page routes registered.
          • Messages sent to the test accounts appeared in the shared conversations.
          • Replies from each test account updated the same conversation correctly.
          • The notification bell was confirmed to work.

          5. Outstanding verification

          • Access control: An unrelated account was not available for testing. The thread retrieval code checks membership, but an independent browser-level access-control test remains outstanding.
          • Group membership management: Membership is fixed when a conversation is created. No interface for adding or removing participants was implemented.
          • Longer-term operation: Normal use beyond the test accounts has not yet been evaluated.

          6. Final status

          The core group private messaging feature is implemented and has passed the functional tests performed during this session. One-to-one compatibility and notification behavior were preserved in the updated code.

          No further changes are planned immediately. Retain the backups and perform the access-control test when a suitable unrelated account becomes available.


          1 Reply Last reply
          0
          • Grant LamontagneG
            Grant LamontagneG
            Grant Lamontagne
            administrators
            wrote on last edited by
            #56

            TL/DR: I had the PM function working nicely then broke it when I went to clean up the code. It is working again, and it now has the ability to message multiple recipients.

            Some other things broke while doing all of this and I have been working on them.

            We also have a poll feature now on the new forum.

            Addendum to above log:

            Session Log & Technical Handover
            Environment & Architecture Context

            • Platform: NodeBB running in Docker (app-nodebb-1) on Ubuntu host.
            • Theme: Custom theme directory at /opt/app/nodebb-theme-mto.
            • Primary Script: /opt/app/nodebb-theme-mto/static/lib/mto-poll.js (registered in plugin.json under "scripts").
            • Backend Poll Engine: nodebb-plugin-poll (/usr/src/app/node_modules/nodebb-plugin-poll/).
              Completed Milestones
            • Native Poll Feature Integration & Verification
              • Mechanism: Dissected nodebb-plugin-poll/lib/poll.js to determine payload expectations (title, maximumVotesPerUser, options array containing objects with string id and title keys).
              • Implementation: Built a custom dynamic poll container (#smf-poll-box) injected above the editor toolbar. Added a category list trigger (#new_poll) and a composer toggle button (#btn-trigger-poll-bar).
              • Data Pipeline: Hooked into both submit triggers (mousedown/click on [component="composer/submit"] and the action:composer.submit client event) to populate composer.posts[uuid].polls and data.postData.polls.
              • Result: Interactive polls successfully render inside topics, record votes, display graphical percentages, and toggle between voting and results screens.
            • Composer Toolbar Decluttering
              • Issue: Unwanted tools (Heading, List, Zen Mode, Topic Thumbnail) cluttered the composer bar.
              • Fix: Added dynamic DOM pruning within mto-poll.js bound to action:composer.loaded, action:composer.enhanced, and action:ajaxify.end.
              • Result: Cleaned up the formatting bar to keep only essential controls (Bold, Italic, Strikethrough, Code, Link, Picture, Upload, Poll, Emoji).
            • Codebase Cleanup & Backups
              • Archived working state: /opt/app/nodebb-theme-mto-working-poll-backup-*.tar.gz.
              • Reset unused static/style.less (which was unregistered in plugin.json).
              • Consolidated all poll UI creation, submission synchronization, and toolbar sanitization into a single clean IIFE inside /opt/app/nodebb-theme-mto/static/lib/mto-poll.js.
                Active Task & Next Steps
            • Status: Submit Button Refactoring (Incomplete)
            • Objective:
              • Remove the "Post Later" / schedule down-arrow dropdown button and menu adjacent to the submit button.
              • Expand the primary Submit button ([component="composer/submit"]) across the entire bottom bar (full width / w-100, centered text).
            • Current Script State:
              • Logic was staged in mto-poll.js (setupFullWidthSubmit), but testing, visual verification, and any required CSS/container adjustments are paused until the next session.

            Def


            1 Reply Last reply
            0
            • Grant LamontagneG
              Grant LamontagneG
              Grant Lamontagne
              administrators
              wrote on last edited by
              #57

              Did a bunch of things- hopefully they help.

              MTO Forum Migration: Work Log & Architecture State1. Environment & Base ConfigurationPlatform: NodeBB (Dockerized container: app-nodebb-1).Active Theme: Custom child theme nodebb-theme-mto symlinked into /usr/src/app/node_modules/nodebb-theme-mto.Host Theme Directory: /opt/app/nodebb-theme-mto.Overridden Templates:/opt/app/nodebb-theme-mto/templates/partials/topic/post.tpl/opt/app/nodebb-theme-mto/templates/topic.tpl/opt/app/nodebb-theme-mto/theme.scssPost Numbering Scheme: Classic SMF scheme preserved (Original Post is #0 / index 0; subsequent replies are #1, #2, etc.). 2. Accomplishments This SessionA. SMF-Style Left Poster Sidebar (post.tpl & theme.scss)Retained the boxed left author column containing soft-square avatars (80px), username, user groups/badges, and account status indicators. Fixed the duplicate post count glitch (which previously output Posts: 34 twice). Root Cause: The post count was being rendered once statically via manual fallback syntax and a second time dynamically via NodeBB's posts.user.custom_profile_info array. Fix: Removed the redundant fallback check from post.tpl and wrapped .mto-post-author-info to allow the single dynamic array item to cleanly print once (Posts: 34 / Posts: 65). B. Classic SMF Post Header Strip & Subject BarCreated the top header strip across the post container (.mto-post-header): Dynamic Subject Header: Set to display the thread subject on the original post ({title}) and prefix replies with Re: {title} using {{{ if (./index == 0) }}} logic. Timestamp & Edit Indicator: Displays the relative wrote time with hover ISO string and post edit indicator icon. Post Sequence Permalink: Anchored on the right side showing #{./index} (e.g., #0, #1, #2). C. Hoisted Post Action Buttons (Quote / Reply)Successfully moved the primary action buttons out of the bottom footer and placed them directly into the top-right header strip (.mto-post-top-actions). Added flex-shrink: 0 and explicit CSS visibility rules to prevent parent flex truncation from collapsing the button bar. Button Behavior Decoupled:Quote Button (component="post/quote"): Captures the specific post content with author attribution markdown tags (Defender said: > ...) and routes it into the composer. Reply Button (component="topic/reply"): Replaced the default NodeBB post-targeting with topic-level reply so that clicking Reply opens a completely blank, clean composer without dumping the previous post's raw text into the draft. 3. Open Tasks & Pending Punch ListThe following items remain for the next session:SMF Quote Box Styling:Style markdown blockquotes (> text) so quotes mimic classic SMF beveled quote containers (distinct border, subtle background tint, clear header citing "Author said:").Layout Width & Right Sidebar ("Community Links"):Review page width constraints across large desktop displays. Address community feedback (noted by SteveC) regarding the right-hand sidebar widget: evaluate options to collapse, hide, or reposition sidebar widgets to maximize post reading width. Private Messages Time/Date Stamp:Inspect and adjust chat/direct messaging timestamps to display exact legible dates and times. Submit Button Styling:Polish the visual appearance and placement of composer submission buttons. Word/Smurf Filter:Configure forum automated word censorship rules. Treasury / Donations Module:Investigate module or widget integration for forum treasury/supporter tracking. 4. Container Maintenance Reference CommandsTo clear cache and apply theme changes in subsequent sessions:Bash# Clear NodeBB template build cache
              docker exec -it app-nodebb-1 rm -rf /usr/src/app/build/public/templates

              Rebuild assets

              docker exec -it app-nodebb-1 ./nodebb build

              Restart container

              docker restart app-nodebb-1


              1 Reply Last reply
              0
              • Grant LamontagneG
                Grant LamontagneG
                Grant Lamontagne
                administrators
                wrote on last edited by
                #58

                I have started to install some anti-spam stuff, so if you want to try banning someone, you should do it with one of the existing spambots as hopefully there won't be a lot more.

                Otherwise you can ban Fred if you want to try, but please let me know if you do as I need him.

                ⭐ Multitool.org Anti‑Spam Setup Log — October 14, 2026

                1. Installed & opened Spam‑Be‑Gone

                You accessed the NodeBB admin panel:

                Admin → Plugins → Spam Be Gone

                You reviewed all available tabs:

                • Akismet
                • Project Honeypot
                • Google reCAPTCHA
                • StopForumSpam
                • hCaptcha

                2. Configured Project Honeypot (successfully)

                Steps completed:

                • Logged into Project Honeypot
                • Navigated to Services → HTTP:BL Access
                • Retrieved your 12‑character access key
                • Entered it into Spam‑Be‑Gone under Project Honeypot → Honeypot API Key
                • Enabled Honeypot
                • Saved changes

                Result:
                Project Honeypot is active and working.
                It silently checks IPs during registration with zero user friction.


                3. Attempted to enable StopForumSpam (SFS)

                You enabled SFS but left the API key blank.

                Your version of Spam‑Be‑Gone requires an SFS API key if SFS is enabled.

                This caused the error:

                “Error — Empty fields not allowed!”

                You confirmed:

                • Honeypot tab had no empty fields
                • SFS tab had no required fields except the optional API key
                • All CAPTCHA tabs were disabled

                Conclusion:
                The error was caused by SFS being enabled without an API key.


                4. Disabled StopForumSpam to clear the error

                You disabled SFS.

                Result:
                The error disappeared immediately.

                This confirmed the plugin’s behavior:

                • SFS must have an API key if enabled
                • Leaving it blank triggers validation failure

                5. Current active anti‑spam configuration

                As of the end of the session:

                ✔ Enabled

                • Project Honeypot (with valid API key)

                ❌ Disabled

                • StopForumSpam (temporarily)
                • Akismet
                • Google reCAPTCHA
                • hCaptcha

                This configuration is:

                • Fully functional
                • Invisible to users
                • Error‑free

                6. Plan for later (after domain switch)

                You decided to wait until the forum is running on its final, correct domain before enabling SFS.

                When ready:

                Steps to re‑enable SFS:

                1. Log into StopForumSpam
                2. Go to User Panel → API Keys
                3. Copy your API key
                4. Paste it into Spam‑Be‑Gone → StopForumSpam
                5. Enable SFS
                6. Save changes

                This will give you:

                • IP checks
                • Email checks
                • Username checks
                • Zero friction for new members

                7. Overall outcome

                You now have:

                • A clean, stable anti‑spam setup
                • No signup friction for legitimate users
                • Strong invisible protection via Honeypot
                • A clear path to enabling SFS later
                • No plugin errors

                Def


                1 Reply Last reply
                0
                • Antti LammiA
                  Antti LammiA
                  Antti Lammi
                  Global Moderators
                  wrote on last edited by
                  #59

                  For some reason i cannot reply to messages, i tried to wait but it doesnt send message even tho i tried multiple times. Site is now bit messy to use on mobile cannot open threads where messages has been sent without changing to desktop mode

                  1 Reply Last reply
                  0
                  • Grant LamontagneG
                    Grant LamontagneG
                    Grant Lamontagne
                    administrators
                    wrote on last edited by
                    #60

                    You are right- the Submit button doesn't seem to work.

                    smurf.

                    I'll get on that ASAP.

                    Def


                    1 Reply Last reply
                    0
                    • Grant LamontagneG
                      Grant LamontagneG
                      Grant Lamontagne
                      administrators
                      wrote on last edited by
                      #61
                      1. User Intent — Diagnose and restore broken compose submit actions, implement a permanent mobile-friendly duplicate Submit button below the composer, retain custom profile card structures, restore the display of user post counts in post sidebars, and apply readable, high-contrast light and dark styling to post header Quote and Reply buttons.
                      2. Key Information —
                      • Core compose routes fire action:composer.enhance via forum/compose.
                      • NodeBB core client.js was patched from require(['composer']) to app.require('composer') because global require was unavailable.
                      • composer/scheduler.js was patched with a null-check guard on cancelBtn.addEventListener to prevent unhandled TypeError crashes when .dropdown-item.cancel-scheduling was absent from the DOM.
                      • Theme client scripts must be declared inside plugin.json (such as static/lib/mto-topic-actions.js) for NodeBB to compile them into the active bundle.
                      • Post header Quote and Reply buttons are rendered in templates/partials/topic/post.tpl using .mto-btn-quote and .mto-btn-reply classes, requiring explicit styling across light and dark mode in theme.scss.
                      • Author sidebar metadata is rendered in templates/partials/topic/post.tpl under <aside class="mto-post-author"> and supports {formattedNumber(posts.user.postcount)}.
                      1. Progress & Completed Changes —
                      • Core Engine & Scheduler Patches: Verified patches to client.js and scheduler.js in node_modules preventing silent client JS execution failures.
                      • Duplicate Mobile Submit Button: Implemented the duplicate submit button container inside static/lib/mto-topic-actions.js on action:composer.enhanced, verified working natively on compose views.
                      • Quote & Reply Button Restyling: Added custom SCSS in theme.scss targeting .mto-header-tools .mto-btn-quote and .mto-btn-reply, restoring sharp border definition, solid background contrast, and crisp icons across both light and dark themes.
                      • Author Post Count Restoration: Added <div class="mto-post-author-stats"> displaying Posts: {formattedNumber(posts.user.postcount)} directly into templates/partials/topic/post.tpl beneath the author groups container, along with matching styles in theme.scss.
                      • Asset Compilation & Container State: Completed nodebb build client and verified clean asset compiles followed by container restarts.
                      1. Active Context / Next Session — All primary functional fixes, duplicate submit controls, post count metadata displays, and header button styling updates are successfully compiled, verified, and running in production. Optional polish items left for the next session include suppressing the automatic @username pre-population when clicking per-post Reply buttons and any remaining profile sidebar layout enhancements.


                      1 Reply Last reply
                      0
                      • Grant LamontagneG
                        Grant LamontagneG
                        Grant Lamontagne
                        administrators
                        wrote on last edited by
                        #62

                        I am working on the Treasury module now- if there are any more functional/operational changes you guys think should be made, let me know. Currently it appears as if the forum is functioning as a forum should.

                        Def


                        1 Reply Last reply
                        0
                        • Grant LamontagneG
                          Grant LamontagneG
                          Grant Lamontagne
                          administrators
                          wrote on last edited by
                          #63

                          I cut it a bit short tonight- these nights seem to be catching up to me and I am having trouble focusing. But, here is where I am at:

                          Development & Deployment Log: NodeBB Treasury & Membership Plugin

                          Date: October 16, 2026

                          Environment: NodeBB v4.16.2 running inside Docker (app-nodebb-1) on Elestio host (nodebb-vklpj-u73921) backed by Redis (app-redis-1). Staging URL: [https://multitool.ninja](https://multitool.ninja) (production domain cutover target: multitool.org).


                          1. Summary of Work Completed

                          A. Sidebar Widget Fixes & Visual Polish

                          • Widget Crash Resolution: Resolved an unhandled TypeError: Cannot read properties of undefined (reading 'renderAsync') in library.js by capturing the Express app instance during plugin.init({ app, router, middleware }) and wrapping app.render in a native Promise.

                          • Theme Icon & Contrast Styling:

                          • Removed the heart icon from the Make A Donation button and replaced it with a wrench/screwdriver tool motif (fa-solid fa-screwdriver-wrench).

                          • Locked button text and icons to deep charcoal (#141414 !important; font-weight: 700;) on an amber/yellow background (#fca311), eliminating washed-out white text in dark mode.

                          • Adjusted widget table numbers to soft muted body colors (var(--bs-body-color) / text-body fw-semibold) instead of harsh pure white.

                          • Header Simplification:

                          • Removed the misaligned, clipped inline fa-vault icon from the top of the card.

                          • Eliminated the redundant uppercase DONATIONS header, leaving a clean, centered title: Operational Funds.

                          B. Member Privacy & Forum Scoping

                          • Restricting Member-Facing Treasury View (/treasury😞

                          • Removed all public access to raw transaction ledgers, individual line-item payouts, and internal account balance sheets to protect financial privacy.

                          • Transformed /treasury into a focused member contribution and goal progress page featuring monthly target metrics, quick-donation buttons, and a link to /subscriptions.

                          • Retained the double-entry ledger, project allocation tracking, and complete audit trail strictly inside the Admin Control Panel (/admin/plugins/treasury).

                          • Donation Calculation Scoping:

                          • Updated getForumDonationsMonthTotal() in library.js to strictly tally credits where category === 'donation' or category === 'forum-donation' for the current calendar month.

                          • Excluded paid membership fees (category: 'subscription'), initial seed funding, merchandise sales, and cross-site external income from the public progress bar to maintain contest and giveaway eligibility rules.

                          • Updated the ACP transaction posting modal to distinguish between Forum Donation, Seed / Opening Balance, and Merch / External.

                          C. PayPal Integration & Domain Agnosticism

                          • Public Donation Form Buttons:

                          • Built direct donation form actions ($10, $25, $50, $100, and Custom) on /treasury submitting directly to PayPal's standard checkout via POST, avoiding brittle inline client-side scripts.

                          • Tagged submissions with custom="{uid}:donation" for backend tracking.

                          • Subscriptions Store Integration:

                          • Added direct PayPal checkout forms to tier cards on /subscriptions passing custom="{uid}:{planId}".

                          • Backend IPN Listener (/api/v3/plugins/treasury/ipn😞

                          • Configured an unauthenticated POST webhook that performs an immediate 200 OK receipt and executes an asynchronous cmd=_notify-validate handshake back to ipnpb.paypal.com.

                          • Automatically joins members to designated NodeBB usergroups upon confirmed payment of subscription plans.

                          • Logs verified donation transactions directly into the default financial ledger in integer cents.

                          • Live Merchant Verification:

                          • Updated the template merchant identity from placeholder donations@multitool.org to the live account (Defender Web & Tool), successfully validating checkout generation for $10.00 CAD.

                          • Dynamic Domain Resolution for Production Cutover:

                          • Injected baseUrl = nconf.get('url') into both controllers and templates.

                          • All form return and notify_url parameters now dynamically bind to whatever domain is active in config.json (multitool.ninja during testing, transitioning to multitool.org at launch without code edits).

                          • Crash Fix (ReferenceError: donationsCents is not defined😞

                          • Resolved variable naming mismatch in library.js and wrapped controllers in robust try/catch error boundaries to prevent worker process drops and 502 Bad Gateway proxy errors.


                          2. Technical Architecture & File Reference

                          File Path Description
                          /opt/app/nodebb-plugin-treasury/library.js Core plugin entrypoint: controllers, routes, widget renderer, PayPal IPN listener, and hourly subscription expiry cron.
                          /opt/app/nodebb-plugin-treasury/lib/db.js Redis data access layer: double-entry ledger, subscriptions, projects, and audit logs.
                          /opt/app/nodebb-plugin-treasury/templates/treasury.tpl Public donation and monthly operational goal view.
                          /opt/app/nodebb-plugin-treasury/templates/subscriptions.tpl Public membership tiers and active subscription status store.
                          /opt/app/nodebb-plugin-treasury/templates/widgets/treasury-funds.tpl Global sidebar widget template for operational funds progress.
                          /opt/app/nodebb-plugin-treasury/templates/admin/treasury-overview.tpl ACP management interface for ledger, accounts, plans, and audit logs.
                          /opt/app/backups/treasury_* Local restore point containing compressed plugin source and Redis database dump.

                          3. Next Steps & Implementation Plan

                          Phase 1: End-to-End Payment & Webhook Verification

                          • Configure PayPal IPN in Dashboard: In the live PayPal merchant account, set the Instant Payment Notification (IPN) URL to [https://multitool.ninja/api/v3/plugins/treasury/ipn](https://multitool.ninja/api/v3/plugins/treasury/ipn) and enable IPN delivery.
                          • Live Test Transaction ($1.00 or test tier): Run a live subscription or direct donation test using a secondary PayPal account to verify that:
                          • The payment completes successfully on PayPal.
                          • The IPN callback receives a 200 OK and validates with VERIFIED.
                          • The test user is automatically added to the target group (e.g., Charter Members) without admin intervention.
                          • The amount is credited to the internal ACP ledger in integer cents.

                          Phase 2: Expiration & Renewal Notifications

                          • Renewal Reminder Alerts: Hook into the hourly background cron in library.js (TreasuryDB.checkExpiredSubscriptions) to send automated NodeBB in-app notifications and emails to members 7 days and 1 day prior to subscription expiration.
                          • Grace Period / Expiration Handling: Confirm the automated group removal (groups.leave) fires accurately when expiryDate <= now without breaking permissions.

                          Phase 3: Final Production Polish & Cutover Checklist

                          • Seed Transaction Database Cleanup: Using redis-cli directly inside app-redis-1, clean up the category tag on the initial hypothetical seed transaction so the public widget begins cleanly at $0.00 for live launch.
                          • DNS Cutover Verification: When switching from multitool.ninja to multitool.org:
                          • Update url in /usr/src/app/config.json.
                          • Update the IPN URL inside the PayPal merchant settings to [https://multitool.org/api/v3/plugins/treasury/ipn](https://multitool.org/api/v3/plugins/treasury/ipn).
                          • Run ./nodebb build and restart container.


                          1 Reply Last reply
                          0
                          • SteveCS
                            SteveCS
                            SteveC
                            Global Moderators
                            wrote on last edited by
                            #64

                            Will there be a Moderate button at the top of the page for moderation log and reported posts ?

                            1 Reply Last reply
                            0
                            • Grant LamontagneG
                              Grant LamontagneG
                              Grant Lamontagne
                              administrators
                              wrote on last edited by
                              #65

                              @SteveC said:
                              Will there be a Moderate button at the top of the page for moderation log and reported posts ?

                              I am hoping so. 😄

                              I have been noticing that the options for moderators are either well hidden or kind of limited. Looking into making it easier for you guys to do your thing is high on my list.

                              Def


                              1 Reply Last reply
                              0
                              • WhoeyW
                                WhoeyW
                                Whoey
                                administrators
                                wrote on last edited by
                                #66

                                Sorry haven't been following much.

                                I can generate sfs key, for when domain migrates.

                                I haven't made any progress on my local migration attempt.

                                Somehow my docker setup is confusing me and I seem to have some sort of duplicate running, preventing me from installing scripts on my local copy of nodebb.

                                Gemini wasn't particularly helpful to figure it out yet.

                                Also I should probably apply all your updates once content is imported to see if it's working correctly.

                                Don't be afraid to leave some crap out for implementation later, that is if anyone noticed it is missing. The cleaner the base install the less headaches keeping up to date.

                                The difficult we do immediately, the impossible takes a little longer.

                                1 Reply Last reply
                                0
                                • SteveCS
                                  SteveCS
                                  SteveC
                                  Global Moderators
                                  wrote on last edited by
                                  #67

                                  @Grant Lamontagne said:
                                  I am hoping so. 😄

                                  I have been noticing that the options for moderators are either well hidden or kind of limited. Looking into making it easier for you guys to do your thing is high on my list.

                                  Def

                                  :tu:

                                  1 Reply Last reply
                                  0
                                  • SteveCS
                                    SteveCS
                                    SteveC
                                    Global Moderators
                                    wrote on last edited by
                                    #68

                                    @Grant Lamontagne said:
                                    I am working on the Treasury module now- if there are any more functional/operational changes you guys think should be made, let me know. Currently it appears as if the forum is functioning as a forum should.

                                    Def

                                    How about a Like button with emojis ?

                                    Also, did we lose notifications, profile editing ?

                                    1 Reply Last reply
                                    0
                                    • WhoeyW
                                      WhoeyW
                                      Whoey
                                      administrators
                                      wrote last edited by
                                      #69

                                      Finally got some progress with my local testing.

                                      SMF mysql restored (2gb)

                                      nodebb functional
                                      Import plugin functional
                                      started import this morning;

                                      1.5h for 9500 users
                                      1h for nearly 300000 PMs
                                      now into topics, it's been going for hours...

                                      I don't have any attachments setup for this first test, wanted to see how we go first with posts before I give it 50gb of files to dig through.

                                      It seems like it doesn't like repeated emails, so if there are profiles with the same email, one will override.

                                      Also, I believe passwords will not migrate; they will need to be regenerated and users will need to use recovery to update. For this PLEASE try to put some sort of notice/newsletter that all users ensure their profile has an updated email or they will be blocked when we migrate.

                                      Additionally based on the experience so far, looks like we will have to put the current site in read only mode, backup, download, migrate, create a db/attachments backup and upload migrated forum to new platform. This will take a few days, unless there is some way to just sync latest... still early to say.

                                      The difficult we do immediately, the impossible takes a little longer.

                                      1 Reply Last reply
                                      0
                                      • WhoeyW
                                        WhoeyW
                                        Whoey
                                        administrators
                                        wrote last edited by
                                        #70

                                        So it was in a restart loop.

                                        89k topics took about 40 min once I got the hiccups sorted, it's now about 160k through the 2.4million replies, estimated time 13-17h...

                                        We definitely need a few days downtime to migrate all posts.

                                        Attachments is likely to be even more.

                                        The difficult we do immediately, the impossible takes a little longer.

                                        1 Reply Last reply
                                        0
                                        • Grant LamontagneG
                                          Grant LamontagneG
                                          Grant Lamontagne
                                          administrators
                                          wrote last edited by
                                          #71

                                          I am holding off on any further modifications to NodeBB until Micah says it's clear to continue.

                                          Def


                                          1 Reply Last reply
                                          0

                                          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                          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 (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                          With your input, this post could be even better 💗

                                          Register Login

                                          • Login

                                          • Don't have an account? Register

                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Popular
                                          • World