MyBB Community Forums

Full Version: Thank You MyBB System 2.6.x
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
You got to hook to attachment_start (attachment.php), find whatever is inside the hide tag, then check if the attachment being fetched is found within such content. Ultimately block the attachment if the user has no permission to see it.

I did this in a plugin but couldn't find it for you, but probably a close reference could be the following :
https://github.com/Sama34/OUGC-Custom-Re...p.php#L790
(2023-12-07, 11:38 AM)Omar G. Wrote: [ -> ]You got to hook to attachment_start (attachment.php), find whatever is inside the hide tag, then check if the attachment being fetched is found within such content. Ultimately block the attachment if the user has no permission to see it.

I did this in a plugin but couldn't find it for you, but probably a close reference could be the following :
https://github.com/Sama34/OUGC-Custom-Re...p.php#L790

Thank you so much for your suggestion, but it appears that the plugin is a lot more complicated than I thought. I will try to make use of your suggestion and hopefully I can figure it out
Cheers! Smile

Okay,
so it appears that by default, when an attachment is inserted into a post, the attachment field will disappear, but the hide setting of this plugin does the opposite of what it's intended to do
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18