All Projects → clonemeagain → attachment_preview

clonemeagain / attachment_preview

Licence: GPL-2.0 License
osTicket Plugin: Allows inline view of attachments

Programming Languages

PHP
23972 projects - #3 most used programming language
javascript
184084 projects - #8 most used programming language
CSS
56736 projects
shell
77523 projects

Projects that are alternatives of or similar to attachment preview

citation.vim
Zotero and bibtex citations for Vim
Stars: ✭ 78 (+100%)
Mutual labels:  attachment
ESP-Mail-Client
⚡️Arduino Mail Client Library to send, read and get incoming mail notification for ESP32, ESP8266 and SAMD21 devices. The library also supported other Arduino devices using Clients interfaces e.g. WiFiClient, EthernetClient, and GSMClient.
Stars: ✭ 78 (+100%)
Mutual labels:  attachment
elasticsearch-ingest-attachment-plugin-example
Example of how to use ElasticSearch ingest-attachment plugin using JavaScript
Stars: ✭ 19 (-51.28%)
Mutual labels:  attachment
osTicket-Microsoft-Teams-plugin
osTicket webhook integration to send notifications to MS Teams when new ticket is issued or created
Stars: ✭ 19 (-51.28%)
Mutual labels:  osticket
plugin-autocloser
An osTicket plugin to automatically close open tickets
Stars: ✭ 32 (-17.95%)
Mutual labels:  osticket
Godot-Trello-Reporting-Tool
A tool to create Trello cards and add attachments from an in-game Godot interface.
Stars: ✭ 44 (+12.82%)
Mutual labels:  attachment
hanami-shrine
Upload solution for Hanami using Shrine library
Stars: ✭ 28 (-28.21%)
Mutual labels:  attachment
Outlook-Add-in-SSO
[MOVED] The sample implements an Outlook add-in that uses Office's SSO system to get access to Microsoft Graph APIs and adds buttons to the Outlook ribbon.
Stars: ✭ 48 (+23.08%)
Mutual labels:  attachment
osticket-plugin-mentioner
Finds Staff mentions in a thread and add's them as collaborators to the ticket.
Stars: ✭ 16 (-58.97%)
Mutual labels:  osticket
awesome-osticket
A curated list of awesome osTicket resources, plugins, tutorials and other nice things.
Stars: ✭ 132 (+238.46%)
Mutual labels:  osticket
Phpmailer
The classic email sending library for PHP
Stars: ✭ 17,485 (+44733.33%)
Mutual labels:  attachment
Shrine
File Attachment toolkit for Ruby applications
Stars: ✭ 2,903 (+7343.59%)
Mutual labels:  attachment

Attachment Preview

An osTicket plugin allowing inlining of Attachments, works with PHP5.3+ and osTicket 1.9+

Build Status

#How it looks: agent_view

Current features:

  • PDF Files attachments are embedded as full PDF <object> in the entry. The number to automatically show is configurable, and if you tick the box Hide Seen in the config, then if you go back, your browser remembers you've already seen that attachment and doesn't show it again, instead replacing the embedded PDF with a Toggle button. You can get toggle buttons for everything by setting the Number of attachments to show initially option to 0.
  • Images inserted as normal <img> tags. Supported by most browsers: png,jpg,gif,svg,bmp
  • Text files attachments are inserted into using <pre> (If enabled).
  • HTML files are filtered and inserted (If enabled).
  • Youtube links in comments can be used to create embedded <iframe> players. (if enabled)
  • HTML5 Compatible video formats attached are embedded as <video> players. (if enabled)
  • All modifications to the DOM are now performed on the server, however the bulk of the work is in Javascript.
  • Admin can choose the types of attachments to inline, and who can inline them.
  • Plugin API: allows other plugins to manipulate the DOM without adding race conditions or multiple re-parses.

To Install:

  1. Simply git clone https://github.com/clonemeagain/attachment_preview.git /include/plugins/attachment_preview Or extract latest-zip into /include/plugins/attachment_preview
  2. Navigate to: https://your.domain/support/scp/plugins.php?a=add to add a new plugin.
  3. Click "Install" next to "Attachment Inline Plugin"
  4. Now the plugin needs to be enabled & configured, so you should be seeing the list of currently installed plugins, pick the checkbox next to "Attachment Inline Plugin" and select the "Enable" button.
  5. Now you can configure the plugin, click the link "Attachment Inline Plugin" and choose who the plugin should be activated for, or keep the default.

If you don't already have a PDF program on your computer, Chrome will still work (it does that for you), for Firefox you will need to enable it, eg: enable pdf preview in firefoox and set "Preview in Firefox"

To Remove:

Navigate to admin plugins view, click the checkbox and push the "Delete" button.

The plugin will still be available, you have deleted the config only at this point, to remove after deleting, remove the /plugins/attachment_preview folder.

How it works:

Latest in Wiki

  • Essentially it's simple, when enabled, and a ticket page is viewed, an output buffer is created which waits for the page to be finished rendering by osTicket. (Using php's register_shutdown_function & ob_start)
  • The plugin then uses a DOMDocument and adds a new DOMElement after each attachment, inlining them. PDF's become <object>'s, PNG's become <img> etc. It also injects the plugin's stylesheet and script into the correct places of the page, so they execute once and don't break anything else.

The plugin has several administratively configurable options, including, but not limited to:

  • What to inline (PDF/Image/Youtube/Text/HTML etc)
  • The maximum size of attachments to inline.
  • How many to inline, attachments after that are still inlineable, but the Agent has to press a "Show Attachment" button (translateable).
  • We now support changing the original attachment link into a "New Tab", so there is an option for that.
  • If the browser should remember the attachments it's seen, and if so, for how long.

The plugin is completely self-contained, so there are ZERO MODS to core required to get it working. You simply clone the repo or download the zip from github and extract into /include/plugins/ which should make a folder: "attachment_preview", but it could be called anything.

Note on CI

The travis-ci tests use phpunit, and are configured for PHP 7, therefore I no longer test on PHP 5.4/5.6 etc as the automated tests would break, and Travis gives me testing for free, so I don't want to waste their time running every possible combo of PHP/osTicket. The setup currently tests the plugin using the two most recent versions of osTicket (1.10.5 & 1.11) using PHP 7.1 & 7.3.

TODO:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].