dopetalk does not endorse any advertised product nor does it accept any liability for it's use or misuse


Our Discord Notification Server invitation link is https://discord.gg/jB2qmRrxyD
  • Add a "List Attachments (by Hyperlinks)" Dynamic HTML Table To Your Post 0 0 10 0
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
Rate this topic:  

Author Topic: Add a "List Attachments (by Hyperlinks)" Dynamic HTML Table To Your Post  (Read 107 times)

Offline Chip (OP)

  • Server Admin
  • Hero Member
  • *****
  • Administrator
  • *****
  • Join Date: Dec 2014
  • Location: Australia
  • Posts: 7302
  • Reputation Power: 0
  • Chip has hidden their reputation power
  • Gender: Male
  • Last Login:Yesterday at 05:29:17 PM
  • Deeply Confused Learner
    • View Profile
    • Email
    • Add Reputation
    • Personal Message (Offline)
  • Profession: IT Engineer now retired
  • User is on moderator watch listWatched
Add a "List Attachments (by Hyperlinks)" Dynamic HTML Table To Your Post

Version 5.0 adds "Open with" functionality

Current version: listatt_bbcode_v4.2 for 2.1.x for 2.0.x and 2.1.x -- Download using the table below:

📎 Click on me to view the list of attachments
#FileSizeDL
1PIHKAL-PEA.PDF126.6 KB⬇️
2attachment-index-generator.html7.4 KB⬇️
3Benzodiazepine+equivalents-DASSA-August2014.pdf96.9 KB⬇️
41,4-Butanediol Overview_250130.pdf7.4 MB⬇️
5Claude PDF Project Contines.pdf902.9 KB⬇️
6attachment-index-generator.html7.4 KB⬇️
7listatt_diag_pkg2.zip2.3 KB⬇️
8Context window reconstruction and the ILA free attachment lister BBCode by Andrew and Claude.pdf2.9 MB⬇️
9listatt_bbcode_v4.2.zip11.5 KB⬇️
10listatt_bbcode_v5.0.zip13.6 KB⬇️
11MD_SYNTAX_MANUAL.md7.8 KB⬇️
12Demo Text File.txt1.2 KB⬇️
13Amphetamine Advert.png4.4 MB⬇️
14Amphetamine Advert.png_thumb1.8 MB⬇️
15MG-Party.mp430.3 MB⬇️
16deeper, slower (details withheld until I know what Im doing).mp38.7 MB⬇️

Suggested invocation:

[size=15pt][listatt=Click on me to view the list of attachments][/listatt][/size]

NB: The hyperlinks could be modifed for custom processing of the attachments (like PDF viewing etc.) and is on my TO-DO list ...



TEAM CHECKPOINT by Claude.ai — listatt_bbcode mod (SMF 2.0.x) — RESOLVED/SHIPPEDSTATUS: DONE. Confirmed working on Andrew's live production forum(screenshot verified - real filenames, real sizes, correct ordernumbers, working expandable panel).WHAT IT DOES:[nobbc][listatt=Title][/listatt][/nobbc] - renders acollapsible box listing every attachment on the current post (order#, filename, size). Companion mod to the existing, working pdf_bbcode(PDFBBCode class), same fork, same author.FINAL ARCHITECTURE (v4.0):- Message-id capture: NOT a Display.php line-insertion, NOT reliance  on the ILA (Post_and_PM_Inline_Attachments) mod. Instead: a global  function listatt_parse_bbc() (defined in ListAttBBC.php, outside  the class) wraps core parse_bbc(). listatt_display_patch.xml uses  <search position="replace"> to rename the ONE parse_bbc() call site  inside Display.php's per-message loop from parse_bbc(...) to  listatt_parse_bbc(...) - a straight function-name swap, easier to  verify than an inserted line (grep Display.php for the new name -  present or not, no ambiguity about where a new line landed).  The wrapper sets $context['ila']['msg'] itself (same key ILA uses)  AND its own ListAttBBC::$currentDisplayMsgId, then calls real  parse_bbc() and returns its result unchanged. This makes the mod  fully self-contained - confirmed via reasoning (not direct testing)  that it should coexist fine with a real ILA install too, since our  wrapper's value always agrees with what ILA would set, and  currentMsgId() checks our own tracker first regardless.- Attachment data: direct query against {db_prefix}attachments WHERE  id_msg = X - NOT $context['attachments'], NOT loadAttachmentContext()  (that function doesn't exist on SMF 2.0.x at all; $context['attachments']  confirmed empty at BBC-parse time via a standalone diagnostic even  after a real parse_bbc() call). Matches how PDFBBCode itself sources  attachment data.- BBC tag type: 'unparsed_content' (plain form) + 'unparsed_equals_content'  (=Title form for a custom heading) - both routed through the same  render() validate callback, matching PDFBBCode's own two-entry  pattern. 'closed' type was tried first and produced silent zero  output on this fork - abandoned.- Hook registration: same fork-specific pattern as pdf_register.php -  add_integration_function() only takes 3 args here (hook, function,  permanent - no file-based auto-loading), so integrate_pre_include is  set by hand via updateSettings() in listatt_register.php/  listatt_unregister.php.KEY DEBUGGING LESSON FOR THIS FORK (worth remembering for future mods)Stock SMF source (any version) is NOT a reliable reference for howhooks/registration actually behave on Andrew's customized 2.0.19 fork.The only reliable references are: (1) his own already-working mods'actual source (pdf_bbcode was the template for everything here), and(2) direct diagnostic scripts run against the real server. Guessingfrom stock SMF source repeatedly produced confidently-wrong fixesthis session before that lesson landed.DEBUG TOOL BUILT THIS SESSION (kept intentionally, not removed)listatt_diag.php / listatt_diag_pkg.zip - a standalone SSI-baseddiagnostic, installed like any other package, visited as a URL(?msg=N) - checks integrate_pre_include's raw value, function_exists(),class_exists(), file-on-disk, runs a direct attachments-table query,and calls listatt_parse_bbc() itself to reproduce real behavior inisolation. Proved decisive for finding the actual bugs, faster thanlive post/save cycles. Worth reusing this pattern for future moddebugging on this fork rather than trial-and-error via real posts.TWO LISTATT TRACE LINES ARE DELIBERATELY LEFT IN ListAttBBC.php'srender() - Andrew explicitly wants these kept as an ongoing debuggingaid (matches his PDFBBC TRACE habit), not stripped for a "clean"release.OPEN/NOT YET DONE- CSS (listatt.css) not yet added to Andrew's live stylesheet project  (deliberately not auto-installed - he adds it by hand like his other  CSS work)- No toolbar/editor button yet (pdf_bbcode has one via  integrate_bbc_buttons - listatt doesn't yet)- Real-world test with the ILA mod actually reinstalled alongside  listatt v3.0 hasn't been done - expected to work fine per the  architecture above, but unconfirmed</parameter>

Not this shocker:

attach-index // post generator

ATTACH-INDEX

post generator — v0.1 — builds an attachment table for the post body

Add attachment

Order number is assigned automatically by row position. Use ↑ / ↓ in the table to reorder, × to remove.

Attachments (0)

#SubjectFilenameSize

Markdown output

Preview

friendly
0
funny
0
informative
0
agree
0
disagree
0
like
0
dislike
0
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
Our Discord Server invitation link is https://discord.gg/jB2qmRrxyD

Tags:  [Add Tag]

Who's Online

Users browsing this topic in the last 15 minutes:
smfadmin and 0 Guests
 

dopetalk does not endorse any advertised product nor does it accept any liability for it's use or misuse





TERMS AND CONDITIONS

In no event will d&u or any person involved in creating, producing, or distributing site information be liable for any direct, indirect, incidental, punitive, special or consequential damages arising out of the use of or inability to use d&u. You agree to indemnify and hold harmless d&u, its domain founders, sponsors, maintainers, server administrators, volunteers and contributors from and against all liability, claims, damages, costs and expenses, including legal fees, that arise directly or indirectly from the use of any part of the d&u site.


TO USE THIS WEBSITE YOU MUST AGREE TO THE TERMS AND CONDITIONS ABOVE


Founded December 2014