yes, how stupid of me. I didn't think about the forum add-ons. Most forums support plug-ins. I didn't research the subject with XenForo, then i moved on once you mentioned encrypted code. I will look at the official add-on documentation.I like your MacGyver-style ingenuity.
But i think it's better to just make a add-on, just like the inline PDF add-on. Or something like option 2 in this post:
Viewing PDF attachments in the browser
The issue: Cannot get Safari to view PDF attachments in the browser, it always just downloads. The fix option 1: Install the Open PDF v1.5 add-on: https://www.xf2addons.com/resources/open-pdf.113/ The fix option 2: Add this code to your src/config.php file: $c->extend('inlineImageTypes'...www.xf2addons.com
The link that you have provided contains the code that i mentioned in my earlier post:
Code:
$container['inlineImageTypes'] = function (Container $c) {
return [
'gif' => 'image/gif',
'jpg' => 'image/jpeg',
'txt' => 'text/plain'
];
extending c will do the trick (option 2). I have some things to do but i will read the official addon docs later and conjur up a viable solution. I have been studying C99 the past two weeks (which you already know), so i have to switch back into PHP mode...
Thanks for the link Mr. e
ps: atleast we could intercept when it is the only option. i considered that encrypted code may make it more difficult to add code without XenForo approval, so keeping it clean was the best route for me until now. Addon support is perfect! Thanks.