osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now
So, I've finally upgraded, and wanted to restore my previews mod, but didn't want to have to generate preview images again.. that was horrible and sometimes didn't work.
This time, I've spent a few hours figuring out the plugin interfaces.. and generally failing to figure them out. :-(
Got it to work anyway.
Basically, it takes PDF's or Images and embeds them in the thread entries responsible for uploading them. Without modifying core! :D My best mod yet. The PDF is fully scrollable/rotatable/printable etc, the links are preserved should you need to download them. Images are linked to the full image and are not rotated etc, the PDF rendering is fully standard browser dependant etc.. Tested with Firefox/Chrome/IE11, not successful on IE11.. can't figure out why, as browser is broken. Added a message about the browser sucking and providing the normal link.. This also happens in Opera if you don't have a PDF plugin.
- PDF Files attached to a thread entry (note/message/reply etc) are embedded as full PDF objects in the entry.
- Images attached to a thread entry are inserted as normal <img> tags.
- Text files attached to a thread entry are fetched via AJAX and inserted into the thread entry using <pre> (If enabled).
- HTML files are also fetched via AJAX and inserted (If enabled).
- Detects pjax and falls back to stock jQuery if not found.
Message me if you want more features, I'm thinking of adding a "Tick the box extension selection" or something to pick what to display.
- Extrude CSS into file
- Add admin options for file-types
- Maybe modify the output in PHP rather than JS.. haven't decided, see what people say. This is working for now.