A zero-touch, client-side plugin for BinktermPHP that automatically marks your own authored echomail messages as read.
When you compose and post a message to an FTN echo area in BinktermPHP, the message is stored in the echomail table without creating an entry in message_read_status and without advancing the last_read_id subscription watermark.
Consequently:
- The message you just wrote appears bold with an unread envelope in the message list.
- Unread badge counters on the dashboard, navbar, and Echo List page increment by 1 for your own message.
This mod automatically intercepts message posting on /compose and message rendering on /echomail / /echomail/{echoarea}:
- At Post Time: When submitting a message via
/compose, the mod discovers the newly generated message ID and invokes Binkterm's bulk read API (POST /api/messages/echomail/read) to mark it as read and advance the subscription watermark before the page redirects. - On Message List Display: When browsing any echo area, the mod scans incoming message lists. Any unread message authored by the active logged-in user is automatically marked as read in the database and updated in the DOM table.
- Zero-Touch & Upgrade-Proof: Never touches or modifies any core BinktermPHP templates or backend routes. When you update Binkterm via
git pull upstream, you will never encounter merge conflicts. - Immediate Visual Consistency: Eliminates unread badges, bold text, and closed envelope icons on messages you authored.
- Watermark-Aware: Utilizes Binkterm's native
last_read_idwatermark synchronization so unread badges across the dashboard and navigation bar accurately reflect genuine unread messages from others. - Multi-Identity Support: Matches both username and real name attributes for the logged-in user.
Clone this repository and run the installer pointing to your Binkterm installation:
git clone https://github.com/thewebexpert/binkterm-php-readOwnPostsMod.git
cd binkterm-php-readOwnPostsMod
./install.sh /path/to/binkterm(If you run the command from a directory adjacent to binkterm, ./install.sh will auto-detect the binkterm folder).
-
Copy the JavaScript asset:
cp public_html/js/read-own-posts.js /path/to/binkterm/public_html/js/
-
Add the asset to
templates/custom/header.insert.twig: Append the following to/path/to/binkterm/templates/custom/header.insert.twig:{# Binkterm Auto-Read Own Posts Mod #} <script src="/js/read-own-posts.js?v=1.0" defer></script>
If you run BinktermPHP in Docker, mount the plugin file into your container:
services:
binkterm-app:
volumes:
- ./plugins/binkterm-php-readOwnPostsMod/public_html/js/read-own-posts.js:/var/www/html/public_html/js/read-own-posts.js:roTo remove the plugin:
cd binkterm-php-readOwnPostsMod
./uninstall.sh /path/to/binktermMIT License. See LICENSE for details.