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
    #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
                                • WhoeyW
                                  WhoeyW
                                  Whoey
                                  administrators
                                  wrote last edited by
                                  #72

                                  My testing will not affect the live setup.

                                  Posts completed during the night, now there's some post import bbcode to markdown that is supposed to work, but I don't see any activity yet... But I had to go to work...

                                  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
                                    #73

                                    Yes, work is definitely a four letter word.

                                    Still, great job man. :tu:

                                    Def


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

                                      Donations module is now set up.

                                      ================================================================================
                                      ENGINEERING DAILY LOG: NODEBB TREASURY & MEMBERSHIP PLUGIN

                                      Date: October 21, 2026
                                      Environment: NodeBB v4.16.2 on Elestio (nodebb-vklpj-u73921)
                                      Containers: app-nodebb-1 (NodeBB), app-redis-1 (Redis)
                                      Host Root: /opt/app
                                      Staging URL: https://multitool.ninja (Target: multitool.org)
                                      Git Commit: a91b6f5 ("feat(treasury): complete plugin verification, bind mount and auto-link")


                                      1. EXECUTIVE SUMMARY

                                      Successfully verified, hardened, and locked in the end-to-end implementation
                                      of the custom Treasury & Subscriptions plugin (nodebb-plugin-treasury). All
                                      ledger accounting, IPN webhooks, automated group provisioning, and expiration
                                      cleanup jobs were validated in the live container. Docker Compose bind-mounts
                                      and entrypoint startup scripts were permanently wired so the module survives all
                                      future Elestio updates, rebuilds, and container restarts.


                                      1. KEY ARCHITECTURE & LOGIC

                                      • Webhook Route:
                                        Mounted at /treasury/ipn directly via Express router to cleanly bypass
                                        NodeBB's core /api/v3/* schema validation requirements.

                                      • Double-Entry Ledger Math:
                                        All financial amounts and account balances are stored and calculated strictly
                                        in integer cents in Redis (lib/db.js) to avoid floating-point drift.

                                      • Subscription Indexing & Group Provisioning:
                                        When a valid subscription IPN is received:

                                        • Writes sub details to Redis hash: treasury:sub:<uid>:<planId>
                                        • Indexes expiration in sorted set: treasury:subscriptions:byExpiry
                                        • Adds user to target group: groups.join(plan.groupName, uid)
                                        • Tracks user sub keys in: treasury:user:<uid>:subs
                                      • Expiration & Revocation Engine:

                                        • Hourly background timer triggers: TreasuryDB.checkExpiredSubscriptions()
                                        • Queries sorted set using range: ['-inf' to now] via getSortedSetRangeByScore
                                        • Calls NodeBB core: groups.leave(sub.groupName, uid)
                                        • Purges hashes and keys: treasury:sub:* and all tracking sets.

                                      1. VERIFICATION & HARDENING STEPS COMPLETED

                                      Security Hardening:

                                      - Removed all diagnostic bypass headers ('x-treasury-test').
                                      - Enforced strict requirement for PayPal 'VERIFIED' handshakes.

                                      Expiry Engine Testing:

                                      - Fixed sorted set query lower-bound parameter in lib/db.js to use '-inf'.
                                      - Tested expired subscription record for UID 3 in 'Charter Members'.
                                      - Verified complete automated removal from NodeBB user group.
                                      - Verified cleanup of all Redis hash keys and sorted set indexes.
                                      - Confirmed active subscriptions (UID 1) remained intact and untouched.

                                      Test Data Cleanup:

                                      - Purged ephemeral mock transactions and test subscription hashes from Redis.


                                      1. DEPLOYMENT & CONTAINER PERSISTENCE SETUP

                                      To ensure zero data loss during container recreation or image pulls:

                                      1. Host Directory:
                                        Source repository lives at /opt/app/nodebb-plugin-treasury

                                      2. Docker Compose Bind-Mount (/opt/app/docker-compose.yml):
                                        Added under app-nodebb-1 service volumes:

                                        • ./nodebb-plugin-treasury:/usr/src/app/nodebb-plugin-treasury
                                      3. Startup Auto-Symlink (/opt/app/entrypoint.sh):
                                        Added startup routine to dynamically link into container node_modules:

                                        TREASURY_SRC=/usr/src/app/nodebb-plugin-treasury
                                        TREASURY_DST=/usr/src/app/node_modules/nodebb-plugin-treasury
                                        if [ -d "$TREASURY_SRC" ]; then
                                        ln -sfn "$TREASURY_SRC" "$TREASURY_DST"
                                        echo "MTO NodeBB startup: linked nodebb-plugin-treasury into node_modules."
                                        fi

                                      4. Verification:
                                        Recreated container via docker compose up -d --force-recreate nodebb.
                                        Verified symlink inside container:
                                        /usr/src/app/node_modules/nodebb-plugin-treasury -> /usr/src/app/nodebb-plugin-treasury

                                      5. Git Tracking:
                                        Committed all 15 plugin files, templates, entrypoint, and compose configs
                                        under commit a91b6f5.


                                      STATUS: COMPLETE & PRODUCTION-READY


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

                                        Summary of What We Hardened on NodeBB TonightComposer Runtime Restored & Persisted: Added the null-check to scheduler.js and baked it directly into /opt/app/entrypoint.sh so restarts/rebuilds never break the composer again. Ghost Plugin Cleaned: Purged nodebb-plugin-poll from Redis plugins:active, eliminating asset compiler warnings and missing module errors.Theme Repository Synchronized: Committed the composer duplicate submit button, post count metadata, and button styling cleanly into git. Registration Hardened: Active hCaptcha challenge enabled on registration without requiring SMTP email verification. Brute-Force Throttle Active: Enforced a 60-second cooldown after 5 failed login attempts to prevent credential stuffing.


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

                                          ================================================================================
                                          MULTITOOL.ORG (MTO) MIGRATION & SYSTEM AUDIT LOG
                                          Date: October 28, 2026
                                          Host Environment: nodebb-vklpj-u73921 (/opt/app)
                                          Container: app-nodebb-1 (NodeBB v4.16.4 on Node.js v24.22.1 / Redis)

                                          1. SUMMARY OF CHANGES & ACTIONS COMPLETED

                                          A. FULL SYSTEM & COMPONENT AUDIT

                                          • Audited active plugins in Redis (plugins:active) and the physical filesystem.
                                          • Verified 5 custom MTO components are present, validly formed, and loaded:
                                            • nodebb-plugin-mto-bbcode (legacy SMF BBCode parser, quick-mod bar, client scripts)
                                            • nodebb-plugin-mto-messages (custom private messaging module)
                                            • nodebb-plugin-mto-awards (badges / user awards system)
                                            • nodebb-plugin-treasury (ledger, subscriptions, and PayPal IPN listener)
                                            • nodebb-theme-mto (custom Harmony-based skin, brand header, widget areas)
                                          • Audited all theme template anchors against registered Express backend routes.
                                            Confirmed that header buttons (Home, Search, Admin, Profile, Messages,
                                            Bookmarks, Members, Badges) map to live route endpoints.

                                          B. PRIVATE MESSAGES (MTO-MESSAGES) NAVIGATION & UX FIX

                                          • Problem Identified: Clicking "MESSAGES" in the top navbar failed silently;
                                            only right-clicking "Open in new window" worked.
                                          • Root Cause: NodeBB's single-page router (Ajaxify) attempted to intercept
                                            the custom route (/mto-messages) without an in-memory client template,
                                            halting page transition.
                                          • Solution Implemented:
                                            • Patched brand.tpl inside the custom theme to include an inline
                                              navigation bypass:
                                              onclick="window.location.href=this.href; return false;"
                                            • Now standard left-clicking routes cleanly and directly into the inbox.

                                          C. REAL-TIME UNREAD PRIVATE MESSAGE TRACKING & BELL NOTIFICATIONS

                                          • Problem Identified: Unread counters remained static or failed to clear.
                                          • Solution Implemented in nodebb-plugin-mto-messages/library.js:
                                            • Implemented per-thread read timestamps in Redis:
                                              Key: mto:pm:read:<threadId>:<uid>
                                            • Thread views at /mto-messages/:threadId automatically update this
                                              timestamp to Date.now().
                                            • Re-engineered endpoint GET /mto-messages/unread-count to dynamically
                                              compute unread threads where latest post timestamp > user's lastRead timestamp.
                                            • Added NodeBB bell notification dispatch on message send (notifications.create
                                              and notifications.push) to alert recipients across desktop/mobile.
                                            • Injected a lightweight client poller in nodebb-plugin-mto-bbcode/static/client.js
                                              hooked to action:ajaxify.end and a 60-second interval to keep the red
                                              navbar badge (.mtorg-pm-count) updated in real time.

                                          D. TREASURY PLUGIN & MULTI-SITE DONATION FEDERATION

                                          • Audited the "OPERATIONAL FUNDS" sidebar widget; verified it is dynamically
                                            driven by nodebb-plugin-treasury via renderFundsWidget recalculating
                                            monthly targets, dates, receipts, and percentage progress against ledger entries.
                                          • Re-engineered PayPal IPN listener (POST /treasury/ipn) in
                                            nodebb-plugin-treasury/library.js:
                                            • Enhanced IPN custom payload parsing from targetUid:actionType to:
                                              targetUid:actionType:sourceSite
                                            • Added fallback extraction from item_name to auto-detect "SAKSelector"
                                              or "EDC-TV".
                                            • Updated TreasuryDB.recordTransaction to record projectId ('sakselector',
                                              'edctv', or 'forum') and append site origin tags to transaction descriptions
                                              (e.g., PayPal Donation [SAKSELECTOR]: donor@email.com).
                                            • Verified that incoming satellite donations maintain category: 'donation',
                                              allowing external contributions to automatically advance the forum's
                                              operational funds thermometer.

                                          E. PERSISTENCE & HARDENING (PREVENTING REGRESSION ON REBOOT/UPDATE)

                                          • Converted node_modules copies of custom plugins and theme into persistent
                                            symbolic links pointing directly to the root source directories.
                                          • Created host-level external backups in /opt/app/mto-custom-backup/ to protect
                                            custom code against container recreations or image resets.
                                          • Created a one-line self-healing restoration script at /opt/app/restore-mto.sh.

                                          ================================================================================
                                          2. SATELLITE SITE INTEGRATION PAYLOAD SPECIFICATIONS

                                          To feed incoming donations from SAKSelector and EDC-TV into the MTO Treasury,
                                          ensure external forms use the following parameters:

                                          • POST Target URL: https://www.paypal.com/cgi-bin/webscr
                                          • Business: admin@def-it.com
                                          • IPN Notification URL (notify_url): https://multitool.ninja/treasury/ipn

                                          SAKSelector Payload:

                                          • item_name: SAKSelector Donation
                                          • custom: 0:donation:sakselector
                                          • return: https://sakselector.org

                                          EDC-TV Payload:

                                          • item_name: EDC-TV Donation
                                          • custom: 0:donation:edctv
                                          • return: https://edctv.org

                                          ================================================================================
                                          3. CHECKLIST OF POTENTIAL FAILURE POINTS & FAST REMEDIES

                                          1. SYMLINKS OVERWRITTEN BY NPM / NODEBB BUILD

                                          - Risk: Running npm install inside the container can replace directory
                                          symlinks with static folder trees or delete unindexed packages.
                                          - Check:
                                          docker exec -it app-nodebb-1 ls -la /usr/src/app/node_modules/ | grep -E "nodebb-(plugin-mto|theme-mto|plugin-treasury)"
                                          - Remedy: If entries do not show -> /usr/src/app/..., re-run:
                                          /opt/app/restore-mto.sh

                                          2. CONTAINER RECREATION / ELESTIO WATCHTOWER UPDATES

                                          - Risk: If Elestio updates or recreates the container image, any file not
                                          mapped to a persistent Docker volume will revert to default.
                                          - Check: Confirm Elestio "Auto-Update" is disabled for the NodeBB service.
                                          - Remedy: If a container reset occurs, run on the host:
                                          /opt/app/restore-mto.sh

                                          3. PAYPAL IPN DROPS OR SILENT REJECTIONS

                                          - Risk: PayPal changes TLS/SSL handshakes, or your firewall/reverse proxy
                                          blocks POST requests to /treasury/ipn.
                                          - Check:
                                          docker exec -it app-nodebb-1 grep "Treasury IPN" /usr/src/app/logs/output.log
                                          Check for "IPN unverified" or "Handshake error".
                                          - Remedy: Confirm SSL certificates are valid on the domain and that PayPal's
                                          IPN history dashboard reports HTTP 200 responses.

                                          4. PM UNREAD BADGE NOT DECREMENTING

                                          - Risk: User navigates via back-button cache or WebSocket disconnects.
                                          - Check: Open browser DevTools (F12) -> Network tab, and verify that
                                          /mto-messages/unread-count returns valid JSON { count: X }.
                                          - Remedy: Verify the thread visit endpoint is reached (/mto-messages/:threadId)
                                          which resets mto:pm:read:<threadId>:<uid> in Redis.

                                          5. REDIS OBJECT / WIDGET SYNC CONFLICT

                                          - Risk: Editing widgets in NodeBB ACP (/admin/extend/widgets) can
                                          inadvertently overwrite the custom treasury_funds or HTML containers.
                                          - Check: Ensure widgets:global still contains treasury_funds in the
                                          sidebar area via Redis CLI or inspection script.
                                          - Remedy: Re-drag the "Treasury Funds" widget into the Global Sidebar in ACP.

                                          ================================================================================
                                          END OF LOG


                                          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