Picture directly paste

Looking for an Extension? Have an Extension request? Post your request here for help. (Note: This forum is community supported; while there is an Extensions Development Team, said team does not dedicate itself to handling requests in this forum)
Ideas Centre
KTy
Registered User
Posts: 31
Joined: Mon Aug 25, 2014 4:22 am

Re: Picture directly paste

Post by KTy »

This was a 2 hours development.... Give it some time and continue to contribute by giving feedback, including errors in the development console :idea:
User avatar
2600
I've Been Banned!
Posts: 2567
Joined: Fri Nov 14, 2014 5:14 pm
Location: Area-51

Re: Picture directly paste

Post by 2600 »

KTy wrote:
Tue Jan 01, 2019 10:23 am
This was a 2 hours development.... Give it some time and continue to contribute by giving feedback, including errors in the development console :idea:
What??? I thought Senky was developing this? How do you know it was 2 hours?
Morpheus: Unfortunately, no one can be told what The Matrix is. You'll have to see it for yourself.
Hack me.
Consider a canary token.
The nature of my chosen username
:ugeek:
Senky
Extension Customisations
Extension Customisations
Posts: 2290
Joined: Thu Apr 30, 2009 8:49 pm
Name: Jakub
Contact:

Re: Picture directly paste

Post by Senky »

John connor wrote:
Tue Jan 01, 2019 1:34 pm
I thought Senky was developing this? How do you know it was 2 hours?
He is right in both occasions. :lol: your console log would help a lot to see where the problem lies.
‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎📝‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎ ‎‏‎‏‏‎ ‎ ‎ ‎🔔 ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎ ‎‎ ‎ ‎ ‎ ‎ ‎ ‎‏‏‎ ‎‏‏‎ ‎ ‎🛠
Forms Extension | Browser & Mobile Notifications Extension | Mixed Content Fixer Extension
User avatar
2600
I've Been Banned!
Posts: 2567
Joined: Fri Nov 14, 2014 5:14 pm
Location: Area-51

Re: Picture directly paste

Post by 2600 »

I only use a shard account so I have no such thing.
Morpheus: Unfortunately, no one can be told what The Matrix is. You'll have to see it for yourself.
Hack me.
Consider a canary token.
The nature of my chosen username
:ugeek:
KTy
Registered User
Posts: 31
Joined: Mon Aug 25, 2014 4:22 am

Re: Picture directly paste

Post by KTy »

Hit F12?
User avatar
EA117
Registered User
Posts: 1816
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Picture directly paste

Post by EA117 »

John connor wrote:
Tue Jan 01, 2019 4:41 am
I did try Firefox and it didn't work at all.
Without any clarification as to what "Quick Post" was, this may very well be expected. Are you in the full reply/post editor when making these tests, or are you in some other editor or some other extension's idea of where the editor should be?

The issue might in fact be the theme, as you mentioned. But I just still wasn't clear on where the test is even being performed in your case.

If you're inclined, feel free to create an account on my site (http://ea117.com) and test in the full reply/port editor there. It's a proSilver-inherited style in use there; but the latest version of senky's extension is installed there and is working.
Senky
Extension Customisations
Extension Customisations
Posts: 2290
Joined: Thu Apr 30, 2009 8:49 pm
Name: Jakub
Contact:

Re: Picture directly paste

Post by Senky »

John connor wrote:
Wed Jan 02, 2019 7:53 am
I only use a shard account so I have no such thing.
Console is in every browser. Just type into Google: "how to open console <your browser>".
‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎📝‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎ ‎‏‎‏‏‎ ‎ ‎ ‎🔔 ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎ ‎‎ ‎ ‎ ‎ ‎ ‎ ‎‏‏‎ ‎‏‏‎ ‎ ‎🛠
Forms Extension | Browser & Mobile Notifications Extension | Mixed Content Fixer Extension
User avatar
2600
I've Been Banned!
Posts: 2567
Joined: Fri Nov 14, 2014 5:14 pm
Location: Area-51

Re: Picture directly paste

Post by 2600 »

EA117 wrote:
Wed Jan 02, 2019 9:22 am
John connor wrote:
Tue Jan 01, 2019 4:41 am
I did try Firefox and it didn't work at all.
Without any clarification as to what "Quick Post" was, this may very well be expected. Are you in the full reply/post editor when making these tests, or are you in some other editor or some other extension's idea of where the editor should be?

The issue might in fact be the theme, as you mentioned. But I just still wasn't clear on where the test is even being performed in your case.

If you're inclined, feel free to create an account on my site (http://ea117.com) and test in the full reply/port editor there. It's a proSilver-inherited style in use there; but the latest version of senky's extension is installed there and is working.


No, I was using the full editor and for the hell of it the quick reply. I knew in advance the quick reply would not work.

I haven't tried this again so I'll try latter on and look at the browser console.
Morpheus: Unfortunately, no one can be told what The Matrix is. You'll have to see it for yourself.
Hack me.
Consider a canary token.
The nature of my chosen username
:ugeek:
User avatar
2600
I've Been Banned!
Posts: 2567
Joined: Fri Nov 14, 2014 5:14 pm
Location: Area-51

Re: Picture directly paste

Post by 2600 »

Still no go using Pro Silver. I disabled a few extensions thinking that was the issue but nope. Here's the har file, but I doubt this will help. I didn't even see anything get added to the console upon paste.


https://app.box.com/s/zlvrfxri20o24402597jxtknydb00hgu
Morpheus: Unfortunately, no one can be told what The Matrix is. You'll have to see it for yourself.
Hack me.
Consider a canary token.
The nature of my chosen username
:ugeek:
User avatar
2600
I've Been Banned!
Posts: 2567
Joined: Fri Nov 14, 2014 5:14 pm
Location: Area-51

Re: Picture directly paste

Post by 2600 »

EA117 wrote:
Wed Jan 02, 2019 9:22 am
If you're inclined, feel free to create an account on my site (http://ea117.com) and test in the full reply/port editor there. It's a proSilver-inherited style in use there; but the latest version of senky's extension is installed there and is working.
Am I doing something wrong here or what! I went and created an account at your site, F22 Simpilot. I selected new topic, I copied an image form my computer, right clicked the reply box and hit paste. Nothing happened. I did not submit the post since nothing happened. Somethings wrong with my computer perhaps? I don't get it. I was using a plain vanilla install of FF.


Edit-

Well how be damned. It's my laptop. The extension works on my desktop. So something on my laptop is preventing the clipboard from pasting into a website in some fashion. Which doesn't make since because I can copy and paste text perfectly fine.


Edit 2-

One thing I notice is that if you select more than one picture, only one image can be attached.
Morpheus: Unfortunately, no one can be told what The Matrix is. You'll have to see it for yourself.
Hack me.
Consider a canary token.
The nature of my chosen username
:ugeek:
KTy
Registered User
Posts: 31
Joined: Mon Aug 25, 2014 4:22 am

Re: Picture directly paste

Post by KTy »

When you paste in full editor, do you at least see the picture uploaded automatically under "Add attachment" tab (or similar)?
Make sure Javascript is enabled and authorized.

If you don't see anything in the developper console, this is pretty unexpected.

Please mention OS and web browser.
User avatar
EA117
Registered User
Posts: 1816
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Picture directly paste

Post by EA117 »

John connor wrote:
Thu Jan 03, 2019 8:09 am
Well how be damned. It's my laptop. The extension works on my desktop. So something on my laptop is preventing the clipboard from pasting into a website in some fashion. Which doesn't make since because I can copy and paste text perfectly fine.
Interesting. I can't think of something obvious that would prevent an image in the clipboard from being "available as image data", but it sounds like what's happening there, or something similar to that. We don't know if the issue is really laptop-wide, or specific to the browser in use on the laptop.

But at least it explains why all the tests had been negative thus far, even if we don't know the exact cause of what's different on the laptop.

If you put an image into the clipboard on the laptop, and then try to paste that into some standard Microsoft application like Microsoft Word or even the WordPad application included with Windows, what does "Paste Special" show as the available clipboard formats for the data? e.g. Would normally list things like metafile, DIB (device independent bitmap), and perhaps application-specific formats. It could be the application you're trying to paste from has something unique about the data it makes available.
John connor wrote:
Thu Jan 03, 2019 8:09 am
One thing I notice is that if you select more than one picture, only one image can be attached.
Note we are talking about "pasting an image", not "pasting a file that contains an image." When "pasting an image", there is no "more than one", at least with standard Windows clipboard behavior.

i.e. We're not talking about "select one or two files that are saved on your desktop, press CTRL-C or right-click and Copy, but then instead of pasting them into another folder on your computer, paste them into the message instead." That's essentially the "drag-n-drop" operation, where you're trying to paste files, not "an image." You could drag and drop both of those images as attachments in a single operation.

"Copy and paste an image" is when you right-click an image you're viewing on another web page and select "Copy image". (Not copy URL, copy target, etc.) This puts the image into your clipboard. It's not a file; it doesn't exist as a file; it's just an image in the memory of your clipboard. Now you go paste that image into some other application; in this case, phpBB with senky's extension enabled.

If you tried to "select an additional image, and also Copy Image to put it into the clipboard too", what you're actually doing is overwriting the current clipboard image with the second image. Except with third-party "clipboard manager applications" to create non-standard Windows behavior, there is no "hold two different images in the clipboard at the same time" in Windows, even if we take phpBB entirely out of the equation.
User avatar
2600
I've Been Banned!
Posts: 2567
Joined: Fri Nov 14, 2014 5:14 pm
Location: Area-51

Re: Picture directly paste

Post by 2600 »

EA117 wrote:
Thu Jan 03, 2019 3:29 pm
If you tried to "select an additional image, and also Copy Image to put it into the clipboard too", what you're actually doing is overwriting the current clipboard image with the second image. Except with third-party "clipboard manager applications" to create non-standard Windows behavior, there is no "hold two different images in the clipboard at the same time" in Windows, even if we take phpBB entirely out of the equation.
Then that explains it. I highlighted two images and copied them, then I pasted them into the posting screen. The first image only showed up as an attachment.

I used the same browser in both the desktop and the laptop. Both are updated to the same version. The only difference observed is that in the laptop the extension doesn't function with the copy/paste scheme, but on the desktop it works.

I can copy and paste things perfectly fine on the laptop, it's just this extension functionality that doesn't work on the laptop for some reason. I'd have to investigate further. It may have been something I changed in the OS for security, but now I don't recall what that was now. I have not tried to use the paste special option in a word document. I'll give that a try and see if it works. Like I said though, all other paste and copy operations in the laptop work perfectly well. I can copy and paste text from websites as well. Even using the copy all feature of a website that automatically adds text to your clipboard through the magic of JS.
Morpheus: Unfortunately, no one can be told what The Matrix is. You'll have to see it for yourself.
Hack me.
Consider a canary token.
The nature of my chosen username
:ugeek:
User avatar
EA117
Registered User
Posts: 1816
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Picture directly paste

Post by EA117 »

Senky wrote:
Thu Dec 27, 2018 3:57 pm
Okay, so this intrigued me, I took a look and it turned out to be a very simple task. The ext is already in the validation queue, until then you can use Github to download it:

https://github.com/senky/phpbb-ext-clipboardimage
Thanks again for allowing this to intrigue you and the time spent implementing this functionality, and for the now official release. Appreciate having that option available, and that maybe one day this small amount of code will sneak into phpBB itself along side drag-n-drop support.

Understandable that the "insert inline in response to the paste event" didn't make the cut, given the "relative to plupload's inclusion" issues that were unnaturally contingent upon style implementation. Still sounds like something that could be easily resolved when the functionality merges into phpBB itself, though... 😉
Post Reply

Return to “Extension Requests”