clonemeagain / attachment_preview Goto Github PK
View Code? Open in Web Editor NEWosTicket Plugin: Allows inline view of attachments
License: GNU General Public License v2.0
osTicket Plugin: Allows inline view of attachments
License: GNU General Public License v2.0
Will this add a player for .wav format attachments?
This isn't something I tested myself, however I have an Agent using IE and they receive this popup just after clicking on a ticket that will use this plugin, however it shows before the ticket page opens. They can just click ok, and then the ticket is displayed ok, however, the plugin doesn't display the attachment.
i got and error when try to install this attachment preview:
it said: Successfully installed a plugin but get and error:
Parse error: syntax error, unexpected '.', expecting '&' or variable (T_VARIABLE) in /var/share/www-data/osticket/include/plugins/attachment_preview/class.AttachmentPreviewPlugin.php on line 647
Is it possible to add support to eml file?
Sometimes the user forwards emails as an attachment and it is necessary to download them to open them with third-party software.
After installation of this plugin, if I disable the plugin - printing works again, we can no longer print tickets. Please see images containing the issue.
Prompt Message containing the Error:
Additional information:
osTicket v 1.9.12
all php extensions are activated including gdlib
If I click the drop-down arrow instead of the button, printing works perfectly.
The plug-in provides its function perfectly (Thanks!)
Once I've seen an attachment eg a PDF it obviously extends the height of the page so scrolling up and down between messages takes longer.
Could a Collapse/Expand option be added, to hide the preview once has been seen (defaulting to show obviously).
Great plugin thanks for making it.
Could you add Vimeo video support too? Currently it look to be only working for Youtube Videos.
Are there any plans in moving this towards PHP7?
Initial view after creation doesn't match.
See clonemeagain/osticket-plugin-notefirst#1
Search results don't always match, depends on pjax.
If you spot others, let me know.
On OSTicket v1.12 (a076918) Attachment Inline Plugin doesn't work with Tasks (new feature for internal issues), only for Tickets. Is there an upgrade for this new OSTicket functionality?.
hi @clonemeagain sorry for againt with the backguard compatibility, i'm have a very special case in my job, due we are under a very hard crissis and i have a xtrange idea.. hard to explain but there its the problem:
i using php 5.3 and seems the tests was agains 5.4 and in production we have 5.3 patched with security fixeds.. i have some array short way problems, solved with the attached patch i supply here..
support.php5.3.diff.txt (how stupid, github dont support a diff file!! stupid windosers)
after right array convert to php 5.3 old way, got that problem that seems are a context problem:
Fatal error: Using $this when not in object context
in /srv/intranet/elticket/include/plugins/attachment_preview/class.AttachmentPreviewPlugin.php
on line 107
i dont understang so much about abstraction programing but:
the context was changed due the call function here are not from instance in register function?..
Hi guys,
I cannot get this to work on the latest stable build 1.15, but also not getting any errors anywhere so just wanted to check has this been successfully used on 1.15 at all yet?
Many thanks
Jack
Hi clonemeagain,
I have a couple osTicket Awesome users that are also using your plugin. When your plugin is enabled some jQuery becomes borked in an odd way.
Any change you might know what is going on, off the top of your head?
I'd prefer to find a fix rather than asking my users to disable your plugin. Cheers!
Is anyone else having cases where all attachments show up in the thread twice?
Mike
http://osticket.com/forum/discussion/comment/119583/#Comment_119583
Currently the code uses zero in config to show all attachments, when naturally "show zero initially" actually is a valid use-case.. it just means that you have to click every attachment to view any of them.
Doable. Might not happen today though.
My agents love this plugin, but I had to uninstall it in order to upgrade osTicket to 1.17.
Are there any plans to update the plugin for compatibility with 1.17 so they will quit bugging me?
Thanks!
Hi, I'm new to osTicket and this plugin so please forgive my poor terminology.
I'm not sure if I've installed this incorrectly or if this is a bug or browser limitation. I have plugin v1.11 with osTicket v1.14.3.
Apache MySQL 10.4.14 PHP 7.4.9
The preview works 100% fine with pdf and img files showing the preview in the ticket thread, but I cannot get it to play wav attachments. the player is visible but greyed out.
Any ideas, thanks in advance,
Al
Used the wrong variable in the cache expiration system.. can't be bothered fixing right now. Making an issue to remember to do it later.
Hi,
Since the upgrade to osticket 1.11 (the file preview is all white).
Corentin
Hello Aaron,
thank you for your fantasitc plugin. It makes working much easier.
But I detected a small bug :-)
With enabled plugin (version 1.1 - stable) I can not print any ticket at all. The generated PDF-files don't have any useable content and are only 1-2 kb size.
When looking at the source of the PDF, I think the generated PDF is parsed with your plugin:
Example with attachment_preview enabled: https://pastebin.com/pgDqdQEe
Example with attachment_preview disabled: https://pastebin.com/F7J0wD9M (a normal PDF-file)
Kind regards
Timo
Nice plugin. Just want to say: thanks.
I attempted to open a .docx file as an iframe, however it only opens a window, doesn't actually show the document. Any suggestions on a solution, or possibly changing the file to either pdf or text?
Hi,
I like this plug-in since it was released and my current osTicket is V1.14.3. Everything is working fine. I can play the audio from the ticket and view files from the ticket.
I am forced to update to v1.17 due to MS OAuth2 but before updrading. I setup a new server to test all the plugin and mods I made for osTicket.
My main browser and all users main browser is Chrome with the latest update and I too have an issue with PDF viewing and Audio with no player. Long store short see below.
Chrome: Can view PDF View and No audio player
Edge: Can view PDF and No audio player
Safari: Can view PDF and No audio player
This osTicket PR looks to be incompatible with this plugin: osTicket/osTicket#3920
I received a "failed to load pdf document" error on PDF's and others didn't display either until I reverted this PR.
Cheers.
Do you have an updated version that supports 1.14?
Thank you
Hello,
Seems the plugin is broken on v1.16.1 since PHP version is now 8.x
For example, http://osticket/scp/tickets.php?id=1&a=zip
results in these warnings:
PHP Warning: file_get_contents(): Unable to find the wrapper "phar" - did you forget to enable it when you configured PHP? in phar://osticket/include/plugins/attachment_preview.phar/class.AttachmentPreviewPlugin.php on line 169
PHP Warning: file_get_contents(phar://osticket/include/plugins/attachment_preview.phar/stylesheet.css): failed to open stream: No such file or directory in phar://osticket/include/plugins/attachment_preview.phar/class.AttachmentPreviewPlugin.php on line 169
PHP Warning: file_get_contents(): Unable to find the wrapper "phar" - did you forget to enable it when you configured PHP? in phar://osticket/include/plugins/attachment_preview.phar/class.AttachmentPreviewPlugin.php on line 186
PHP Warning: file_get_contents(phar://osticket/include/plugins/attachment_preview.phar/script.js): failed to open stream: No such file or directory in phar://osticket/include/plugins/attachment_preview.phar/class.AttachmentPreviewPlugin.php on line 186
And ignoring those warnings spits out the following malformed ZIP file:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body><p>PK</p><script></script>
</body></html>
I assume the NUL in the ZIP is causing the rest of the file to not display in the <p>
tag.
JPEG attachments will not showed inline with OSticket 1.17.2 --- PDF is working fine
anyone else has this problem?
Hi!
Would it be possible to show EML file attachments?
They are essentially made of text, so they could be included in "Inline textfiles (txt,csv)"
What do you think?
it just gives error 500, with this plugin installed osTicket stops working, not even disabling, it has to be deleted to get the osTicket working
any way to get it fixed?
Thank you in advance
Hi,
I'd like to use your plugin's signal in order to append scripts to the DOM in my own plugins, since they don't seem to include my signals for that (osTicket/osTicket#5693).
However in my test-install I cannot get the mechanism to work, because my plugin's bootstrap is called before your bootstrap and thus my call to the signal::send has vanished before your bootstrap will listen to it.
Have you considered just adding a static method instead of the signal in order to receive hooks from other plugins or is there a way to ensure correct order?
I upgraded my osTicket deployment to 1.18.1 and discovered that the plugin no longer functions. Am looking into the code but I suspect it may ba the javascript not really playing nice with osTicket 1.18.
User asked for attachments to be inlined on KB articles too.
http://osticket.com/forum/discussion/comment/106633#Comment_106633
Should be possible. Assuming admin might want option of selecting one or the other, I've arranged a few tasks that will need to be completed to achieve this goal.
Tasks:
Additional/Extras:
Hi,
The Hide Attachment / Show attachment buttons are disappeared after 1.16. update.
(The Pdf viewer function still works correctly.)
How Can I fix this problem?
solving the issue #21 now i have this problem in AttachmentPreviewPlugin.php on line 217
Cannot use object of type DOMNodeList as array
Fatal error: Cannot use object of type DOMNodeList as array in /var/share/www/osticket/include/plugins/attachment_preview/class.AttachmentPreviewPlugin.php on line 217
To prevent slow loading of page , along with max attachments to open at start , should have an option to limit open attachments with size less than particular size.
http://osticket.com/forum/discussion/comment/107522/#Comment_107522
...problem we encountered (at least for us) was that when showing all the attachments straight away (attachments more than 1) the thread becomes quite large.
So, we customized ticket-view-inc.php by adding a show/hide preview attachment button. By clicking on show the attachments are expanded, by clicking on hide all the attachments are closed again. It will be great if that already include in your plugin.
We could inline the first attachment only (create admin/user option?) Leave the rest as display:none elements. Add button to toggle them. (individually or all as one button.. either is doable)
Hi, I had never printed the ticket before, just tested and notice, images or PDF don't show up
I looked at this and it still does not work
9b5d0a6
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.