axew3 / phpBB-image-attachments-rotation

Add icon after the image attachment name into the attachments panel (jpg,gif,png,webp). Onclick open a modal popup where it is possible to rotate the image and save it. Preserve images transparencies. Immediately display the rotated image into the post, and not the browser's cached one. Edit, post and reply mode.
https://www.axew3.com/
GNU General Public License v3.0
3 stars 1 forks source link

Waiting for the last updates prior to check it out. #1

Closed 3D-I closed 4 years ago

3D-I commented 4 years ago

Reading your topic at phpbb dot com I understand you still want to update this repository, isn't? I will be more than glad to have a look once done, thanks. :+1:

axew3 commented 4 years ago

Yes of course! I'm looping with plupload, the problem i have is that when a file removed, because rotated, then it need to be added the new row, and my code until now mess up with indexes. Still i have not understand why. I can provide you a version that do +- all ok, until you do not go to rotate an attachment that s not the 0 in the list, because if not, when saving the post, placeholders do not match anymore. Offset by one. I will check little more then i will send you the code.

The other version, that delete the file directly into the fileRotate.php, that's the other way i try, and that then go to update only values for rotated attachment (id) on DOM when response via js fire, also presents problems. i will wake up tomorrow, i hope, with more clear things in mind and asap let you know! I will link to you the modified versions asap

3D-I commented 4 years ago

I will be notified if you just update this repository, that's easy.

Take your time.

axew3 commented 4 years ago

1.0.1 dev - in the hope i have not forget something on committing changes here at github. The cache issue has been resolved, relevant files where chages about this have been applied are: overall_footer_body_after.html and fileRotate.php. More details on code comments

axew3 commented 4 years ago

Just removed the [007JamesBond] placeholder string: switched to a rand string

axew3 commented 4 years ago

Updated overall_footer_body_after.html js code for a correct code flow execution (there is commented code with a question which i still do not understand)

3D-I commented 4 years ago

This needs a lot of work in order to become a real extension my friend. Really a lot, sorry. At the present stage will not pass the validation for a ton of reasons, let me say it. But I love your efforts, nonetheless.

I tested also this one: https://www.phpbb-work.ru/preview-attachments-ext-t91.html Which you can install on 3.3.1 as I did and it looks like the right way to go, if I were you I would consider having a look at it first. It is not perfect and needs improvement... but is the way to go IMO.

axew3 commented 4 years ago

Ah ok, i see now that i've been able to install it. The guy on post at phpbb.com should had have kindly following with an answer when i said "i've try to install it but it even do not work... Anyway...

It Just do what this 1.0.0 version do: do not update the id of the image, and will never be possible to resolve this way the cache issue. Until the id of the image do not change, there is no way to accomplish with what this code do instead. It do no save the gif with transparency, but this is easily solvable. It add elements on page in a way that is intrusive to me. Easily solvable. I would learn in short phpBB way to do things looking on it. Yes, i see would be easy to edit it, improving and fixing it to do what the code do here instead.

But you'll forgive me if i will not follow. I will follow with this way instead, because it is working 100%, and there is no other possible code, but this, to achieve what this code do. And sorry, i'm happy to had never seen the ext you mention, so i coded this that is no intrusive and easier/immediate. I will improve it making the popup easily editable for anyone. It do not require much more. This extension will be available here, so, at moment, for anyone that will like to use it. Cheers!

3D-I commented 4 years ago

Good luck mate. ;-)