📝 listatt_manual.mdv4.6.0 · 2026-10-19

listatt manual

listatt v7.3.0 (2026-10-26) -- List Attachments BBCode, Andrew's standard post header and flagship tool. Another collaboration between Andrew.human and Claude.ai, with the lady's touch only Gemini.ai can.


1. What it is

[listatt] is a BBCode tag. Put it in a post and the post shows a collapsible box listing every attachment on that post: order number, filename, size, a download button, an INFO button and a download count. Clicking a filename opens the file in the right viewer for its type instead of forcing a download.

If the post is linked into a project by the separate nexus package, the box also opens with the project outline (section 8).

2. Requirements

Needs Status
SMF 2.0.x or 2.1.x required
CollabCore v2.0+ with MsgTracker required -- the install stops if Sources/CollabCore/CollabCore.php is missing
Who Downloaded Attachment mod optional -- without it the Downloads count still shows and its panel says the log is not available
PDFBBCode (PDF.js viewer) used for .pdf clicks
nexus package (v2.1.0 for connected projects, v2.2.0 for branch masters) optional -- only for the project outline
AVIF Attachment Support (AVIF_v1.0.0) only for .avif on SMF 2.0.x with PHP below 8.1

3. Install and uninstall

Install listatt_bbcode from the SMF Package Manager.

Step SMF 2.0.x SMF 2.1.x
Dependency check listatt_check_collabcore.php same
Files copied to $sourcedir ListAttBBC.php, view_attach.php, view_attach_range.php, listatt_posts.php, listatt_dupes.php, listatt_report.php, listatt_shared.php same
Hooks registered integrate_bbc_codes, integrate_pre_parsebbc, integrate_buffer, plus integrate_pre_include same
CSS appended to Themes/default/css/index.css between BEGIN listatt.css / END listatt.css markers same
Display.php the one parse_bbc() call is patched (listatt_display_install.php, safe to re-run) not touched -- the native integrate_pre_parsebbc hook gives the message id

Uninstall removes the hooks, the marked CSS block and the files above, and reverses the Display.php change on 2.0. listatt.css also ships alone, in case index.css is not writable or you prefer to add the styles by hand.

The three corpus-report result tables (batch_runs, batch_attach_report, batch_attach_orphans) are left for you to drop.

4. Using the tag

[listatt=Your heading here]x[/listatt]
[listatt]x[/listatt]

5. The box

Columns: zero-padded order number (starts at 00), filename (link), size, DL (download), INFO, Downloads.

Themes: the box has a per-box theme switcher with 15 ISE themes plus 8 added in V6.12; the choice is remembered in the browser (localStorage).

Banner: the bottom line reads ListAttBBC | v7.3.0 | date | live HH:MM:SS. live means the fresh render is active; bbc means the buffer hook is not registered and a possibly cached copy is showing.

INFO panel: every real column of the attachment (ids, poster, type, hash, extension, size, downloads, width/height, mime type, approved, thumbnail) plus the true on-disk filename, which directory it is in ("base" = attachments/, "2" = attachments2/), a file-exists check, and for audio/video the technical metadata (sample rate, channels, duration, codec, bitrate, resolution, frame rate) via getID3 or ffprobe. Downloads count opens a "who downloaded this" list (needs Who Downloaded Attachment).

Filename click routing

File type Opens via
.pdf PDFBBCode's PDF.js viewer
.md Sources/view_attach.php -> rendered Markdown (LMV)
.html / .htm Sources/view_attach.php -> rendered inline
audio, video, image (incl. .avif) CollabCore/listatt_media_viewer.html
everything else CollabCore/ISE_text_viewer.html (in-page find)

PDF rows also show [native] (the browser or OS handles the file via view_attach.php) and [pdf in chunks] (PDF.js on view_attach_range.php, which answers HTTP range requests so pages draw as they arrive; a linearized "Fast Web View" PDF shows page 1 soonest).

6. Live rendering and caching

SMF caches parse_bbc() output keyed on the post body, so new attachments would never refresh a cached list. listatt wraps its output in <!--LISTATT:BEGIN:msg:title--> ... <!--LISTATT:END--> markers and an integrate_buffer hook re-renders each box fresh from the database on every page view. If the hook is missing, the cached render still shows (no failure).

7. Administrator pages (admins only, read-only)

Open from the INFO panel. Nothing is deleted or changed by any of them; to detach a file, use SMF's own Edit page.

Page What it does
Forum-wide counts (in INFO) posts with attachments, how many already carry [listatt, how many do not; cached 10 minutes when SMF caching is on
listatt_posts.php every post owning an attachment, with subject, poster, date, file count, tagged yes/no, View and Edit; ?show=untagged / ?show=tagged
listatt_dupes.php?attach=ID every post owning a byte-identical copy (size and extension, then SHA-256), up to 200 candidates
listatt_report.php results of the corpus report job: every attachment in both directories, post-date order, every metric, problem flags, shared content
listatt_shared.php every file held by 2+ posts, sortable, searchable, expandable, with Edit links and CSV export

The corpus report needs its job run first, from a shell: php Sources/CollabCore/attach_report.php (separate attach_report package; its manual is Sources/CollabCore/SMFBatch_manual.md). Run it with hashing on for the shared-files page. The two report pages keep your sort, search, filter and page in the address bar.

8. Nexus project outline

Closed by default (v7.3.0): the box shows the attachments first. If the post has nexus links, one line sits above the table: "Nexus project: 6 posts + 1 connected project - click to explore". Click it to open the hierarchy below; click again to fold it away. No JavaScript is used, and a post with no nexus links shows no line.

Opened, the hierarchy shows (nexus package, table {db_prefix}nexus_links):

Rules (same as nexus): a post that contributes to or depends on another sits under it; a superseded post sits under its replacement; the master is the top post with the most posts beneath it; a master set by hand ({db_prefix}nexus_masters) goes to the top and is marked "chosen by hand"; with only related links there is no master. It reads the same from any post of the project. Up to 8 hops and 40 posts.

Who sees what: titles are checked per viewer with SMF's own board check. A post the viewer may not see is "post N (not visible)": step number kept, no title, link or date. Posts in boards named in the nexus_protected_boards setting are never shown or counted. Without the nexus tables nothing is drawn and the box is as before. listatt only reads; links are made with nexus.

Branch masters (v7.2.0)

With nexus v2.2.0, any number of posts can be flagged master of its own branch (nexus_tool.php branch <post>). The outline shows a BRANCH MASTER badge on each flagged post, beside the project's own MASTER badge (one per project). The flag changes only the label; the post stays where the links put it. Without the nexus nexus_branches table nothing changes.

Connected projects (v7.1.0)

A nexus uses link (nexus v2.1.0) joins two separate projects without merging them, for example a project that depends on the listatt project. The box then shows:

Without uses links the box is exactly as before. Links are made with nexus: php Sources/CollabCore/nexus_pair.php <post of A> <post of B> --kind=uses.

9. Files in the package

package-info.xml, ListAttBBC.php, listatt_manual.md, readme.md, changelog.md, license.txt, listatt.css, install_css.php, uninstall_css.php, listatt_check_collabcore.php, listatt_register.php, listatt_unregister.php, listatt_display_install.php, listatt_display_uninstall.php, listatt_display_patch.xml (reference only), listatt_dl_log.sql (obsolete, never used), view_attach.php, view_attach_range.php, listatt_posts.php, listatt_dupes.php, listatt_report.php, listatt_shared.php.

10. Troubleshooting

Symptom Cause / fix
List shorter than the real count Cached render; the buffer hook (integrate_buffer) is not registered. Banner says bbc. Reinstall or re-run registration.
"No attachments on this post" on every post CollabCore / MsgTracker missing or too old.
Tag disappears when the post is saved (2.1) Nothing between the tags. Use [listatt=Title]x[/listatt].
Single < shown (before 6.14) Fixed in 6.14.
Fatal SQL error on download panel (before 6.2 / 6.14) Fixed; panel now checks the log table exists.
.avif shows raw bytes Needs 6.15 and, on 2.0 with PHP < 8.1, the AVIF Attachment Support package.
Box unstyled index.css not writable at install; add listatt.css by hand.
Shared / report page empty Run the corpus report job first.
No project outline nexus not installed, or the post is not linked. It is folded by default: click "Nexus project ... click to explore".
Connected project card missing needs nexus v2.1.0 and a uses link (nexus_pair.php A B --kind=uses); a project the viewer cannot see shows as "another project (not visible to you)"; only 6 are drawn.

11. Version history

Version Date Change
7.3.0 2026-10-26 The attachments come first: the nexus outline and connected projects are folded behind one line, "Nexus project: N posts - click to explore"; click to open or fold.
7.2.0 2026-10-26 Branch masters: the outline shows a BRANCH MASTER badge on every post flagged with nexus v2.2.0 (nexus_tool.php branch).
7.1.1 2026-10-26 The outline (and the master in the summary line) shows each post's topic number, the key used with nexus_pair.php / nexus_tool.php; a post that is not its topic's first post reads "topic N, reply".
7.1.0 2026-10-26 Connected projects drawn: a nexus uses link shows each project it uses, or that uses it, as its own card with its own master and outline.
7.0.0 2026-10-26 This manual added; version renumbered from 6.30. No code change.
6.30 2026-10-24 Outline honours a master chosen by hand (nexus v2.0.0).
6.29 2026-10-24 Project strip becomes an outline: master, hierarchy, step numbers, dates, span.
6.28 2026-10-24 Fix: titles showed &quot; / &amp; as text (double escaping).
6.27 2026-10-24 Nexus project strip: count line and one chip per post, roles, per-viewer titles, protected boards hidden.
6.26 2026-10 Layout of the two report pages (fixed columns, scroll in own box, view kept in address bar).
6.25 2026-10 Shared attachments page (listatt_shared.php) and link in INFO.
6.24 2026-10 Corpus report worker moves to Sources/CollabCore/attach_report.php.
6.23 2026-10 Corpus report worker leaves this package (own attach_report package).
6.22 2026-10 Full attachment corpus report page (listatt_report.php).
6.21 2026-10 "Find other posts that own this same file" (listatt_dupes.php).
6.20 2026-10 Counts section admin-only; posts list page (listatt_posts.php).
6.19 2026-10 Forum-wide attachment counts in INFO, cached 10 minutes.
6.18 2026-10 [pdf in chunks] via PDF.js on view_attach_range.php.
6.17 2026-10 [native in chunks] link (replaced by 6.18).
6.15 2026-10 .avif opens in the image viewer.
6.14 2026-09 SMF 2.1 support; plain-form < fix; download-log table check.
6.13 2026-09 Live re-render via integrate_buffer; thumbnail rows no longer listed.
6.12 2026-09 8 more themes by Gemini.
6.11 2026-09-13 CollabCore (MsgTracker) becomes a hard dependency.
6.10 2026-09 [native] link on PDF rows.
6.9 2026-09 .html opens rendered via view_attach.php.
6.7.1 / 6.7 / 6.6 2026-09 Viewer and AttachMeta moved into Sources/CollabCore/; paths fixed.
6.5 2026-09 Audio / video / image viewer.
6.4 2026-09 INFO panel becomes the full attachment truth (true filename, directory, exists, media metadata via AttachMeta).
6.3 2026-09 .html goes straight to the browser.
6.2 2026-09 Fix: dropped the private download-log table; reads Who Downloaded Attachment.
6.1 2026-09 Bold ordinal, Downloads count and who-downloaded panel.
6.0 2026-09 Ordinals from 00; click routing by type; 15 themes; INFO button.

Dates shown as "2026-10" or "2026-09" are the month only; the exact dates are in changelog.md and the header of ListAttBBC.php. Versions 6.8.2, 6.11 (apart from the dependency), 6.16 and 6.17's viewer dropdown are placeholders or were replaced before release.

Earlier builds on a separate "v7.x line" were reverted before 6.10 (see the header of ListAttBBC.php). This 7.0.0 is a different thing: it continues straight on from 6.30.