Hiding Attachment Buttons

Deek

Member
I'm working on a plugin that will allow users to upload files to a ticket. I've been able to hook up the backend and am able to get files attached. The only problem I have is that the editor that submitters are using doesn't allow for inline referencing of attached image when submitting.

attachment_ui.webp
In the previous image I'm looking to hide the sections in red, but only for a specific section where the ticket is being creating (/developer/new-ticket) and remain the same everywhere else in the forum. Since all of the sections in red are coming back from a AJAX request I'm not sure the best way to approach this.

Any suggestions?
 
You should be able to hide them with CSS.

Use a template modification to add additional code to the specific CSS template or call an additional CSS template on your page.

You can ensure it only affects your page because the content template name for every page is used as a class name for the content, e.g the container for the content on this page uses a class name of thread_view.

Therefore any CSS selectors which are prefixed with .thread_view will apply on this page

So you could do the same.

That being said, I'm trying to think if there is anything built in which can be used to stop them from showing. I'll have to check the code to refresh my memory. But failing that, the above will achieve what you want.
 
Top Bottom