attachment_preview icon indicating copy to clipboard operation
attachment_preview copied to clipboard

Update class.AttachmentPreviewPlugin.php

Open leandrovergara opened this issue 6 years ago • 9 comments

Added on elseif from line 1059 an extra validation in order to use this plugin in task issues.

leandrovergara avatar May 16 '19 11:05 leandrovergara

@leandrovergara, in my osticket, v.1.12 if I implement your change, I cannot access osticket anymore.

ilippert avatar Aug 01 '19 22:08 ilippert

Can you send me the error that you are having? Which version of AttachmentPreviewPlugin are you using?

leandrovergara avatar Aug 05 '19 12:08 leandrovergara

Hi Ingmar,

Sorry i didn't answer your bug post. I was on Argentina Winter Holidays. I have already send you some questions in order to help you in your original comment. Please reply and i'll do my best in order to help you.

Have a nice day.

Leandro.

El jue., 1 ago. 2019 a las 19:42, Ingmar Lippert ([email protected]) escribió:

would be great ifyour have time to review and merge this as the task functionality is otherwise well usable, @clonemeagain https://github.com/clonemeagain

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/clonemeagain/attachment_preview/pull/40?email_source=notifications&email_token=AE6QA76MXSLXFISUYDS2DYTQCNRDRA5CNFSM4HNLNZYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3MCYGA#issuecomment-517483544, or mute the thread https://github.com/notifications/unsubscribe-auth/AE6QA75QPCLQALJ5RISLA63QCNRDRANCNFSM4HNLNZYA .

-- Leandro H. Vergara

leandrovergara avatar Aug 05 '19 13:08 leandrovergara

Dear Leandro,

thanks for writing.

I used the plugin from https://codeload.github.com/clonemeagain/attachment_preview/zip/master

I did not experience an error beyond simply nothing showing at all. the apache log tells me

PHP Parse error: syntax error, unexpected '||' (T_BOOLEAN_OR)

The lines in the code look like this

  elseif (strpos($url, 'index.php') !== FALSE ||
  strpos($url, 'tickets.php') !== FALSE) ||
  strpos($url, 'tasks.php') !== FALSE) {
  // Might be a ticket or a task page.
  $tickets_view = TRUE;

Cheers, Ingmar

ilippert avatar Aug 05 '19 21:08 ilippert

whilst this suggested change does achieve not breaking the site, it does not yet achieve resulting in the equivalent collapsible boxes within the task views, as within the tickets.

ilippert avatar Aug 06 '19 08:08 ilippert

Change have been commited on branch. Please check again an tell me please.

leandrovergara avatar Aug 06 '19 11:08 leandrovergara

I don't use "Show Attachment" functionality, because most of attachment are pdf or images files, so i preview them on task inside the thread. Can you show me some example with a screenshot so i could help your issue?

image

leandrovergara avatar Aug 06 '19 14:08 leandrovergara

in a ticket view, I get this result: https://ibb.co/4Kb9G7t

in a task I get this result: https://ibb.co/8cczvSc

ilippert avatar Aug 06 '19 14:08 ilippert

We don't use tasks, but with the recent PR merge, this conflicts, so needs a touch of rework, apologies

clonemeagain avatar Apr 14 '20 23:04 clonemeagain