Version: 2.0 Status: Live, fully tested Tag: [lmv]...[/lmv]
A standalone SMF BBCode mod that renders .md attachment or URL content inline in a post, using the existing MDParser.php engine from md_bbcode. No iframe, no external viewer — just clean inline Markdown rendering.
Architecturally mirrors pdf_bbcode (URL form, attach-NN position-based attachment form, autodisplay toggle, currentMsgId() pattern) but is a fully separate mod from both pdf_bbcode and md_bbcode, so neither is disturbed by changes here.
| Command | Form | Behavior |
|---|---|---|
| URL | [lmv]https://example.com/path/to/file.md[/lmv] |
Fetches and renders the Markdown file at the given URL |
| Attachment by ID | [lmv=ID][/lmv] |
Renders a specific attachment by attachment ID |
| Auto-detect | [lmv=attach-01][/lmv] |
Position-based reference to the Nth attachment on the post — no literal attachment ID needed |
| Force scroll | [lmv=scroll]...[/lmv] / [lmv=scroll-N][/lmv] |
Forces the scroll class regardless of CSS default |
| Force no-scroll | [lmv=noscroll]...[/lmv] / [lmv=noscroll-N][/lmv] |
Forces the .lmv-viewer-noscroll override class |
| No-scroll + attach-NN | [lmv=noscroll-attach-01][/lmv] |
Combines auto-detect with the no-scroll override |
All modifiers are composable with both the URL and attachment forms. With no modifier, scroll behavior falls through to the CSS default (tri-state: unset → CSS default, scroll → forced on, noscroll → forced off).
.lmv-viewer-noscroll — override rule added to force the no-scroll viewer state when the noscroll modifier is used; lives in lmv's own stylesheet, not shared with md_bbcmd_bbc currently exists — each mod ships its own stylesheet. A shared code/asset directory between md_bbc and lmv_bbc (mirroring how pdf_bbc uses a shared PDF.js library) was discussed as a future step but deliberately deferred to keep the initial build simple and portablelistatt) is still on the to-do list, not yet donelmv does not have its own Markdown parser. It calls MDParser.php from md_bbc directly as a standalone callable parse function — one engine, two consumers. This was a deliberate choice to avoid maintaining a second parser, while keeping lmv_bbc as a fully separate, independently installable mod so nothing here touches or destabilizes md_bbc's own [md] tag logic.
lmv is one of five components making up the forum's homegrown Document Management System:
| Component | Role |
|---|---|
| md_bbc | [md] tag — renders Markdown directly in a post; owns MDParser.php, the shared rendering engine |
| pdf_bbc | [pdf] tag — renders PDF attachments inline via PDF.js; architectural template that lmv was deliberately built to mirror |
| lmv | [lmv] tag — renders .md attachment/URL files inline, reusing md_bbc's MDParser.php |
| ISE | "The ISE Project" (Intelligent Search Engine) — the custom Python post-search engine (search.py), replacing/augmenting native SMF search, with its own query logger, tokenizer, and ranking engine |
| ISEpdf | ISE's PDF-focused sibling — PDFIndexer.py/PDFsearch.py, indexing the PDF library (magic-byte discovery, pdftotext -layout extraction, page-level word index) and surfacing results through the "ISEpdf" search-engine dropdown option |
Together: md_bbc, pdf_bbc, and lmv handle rendering documents inline in posts, while ISE and ISEpdf handle finding them — indexing and searching post content and the PDF library respectively. pdf_bbc's architecture (tag-form conventions, install-package pattern) was the template lmv copied; md_bbc's parser is the engine lmv runs on top of.
PDFBBC.php exactly in structureMDParser.php from md_bbcode via a standalone callable parse function (no duplicate parser)md_bbcode and lmv_bbcode (analogous to pdf_bbcode's shared PDF.js library) was considered but deferred; each mod is currently self-containedDisplay.php / Display.template.php autodisplay patch, mirrored from pdf_bbcode's own display patch. This caused install failures:
Display.php patch added key is_lmv, but Display.template.php checked is_md (mismatch)lmv_unregister.php referenced a nonexistent method (capturePreParse vs the actual captureMsgId)pdf_bbcode already having patched nearby anchors in the same core fileslmv feature and was stripped from the packagepdf_bbcode).lmv_register.php does not register integrate_pre_parsebbc on this SMF 2.0.x fork (hook doesn't exist on this branch), so no equivalent fix was needed there.[lmv=ID]).lmv-viewer-noscroll CSS rulelistatt