Rotate phpBB attachments images - extension

User avatar
axew3
w3all User
w3all User
Posts: 3020
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Rotate phpBB attachments images - extension

Post by axew3 »

So just to test that this is it, you could
1) set phpBB option to Recompile stale tamplate files to YES on ACP
2) open the file mentioned above
/ext/w3all/imageattachrotation/styles/all/template/event/overall_footer_body_after.html
and change the line

Code: Select all

XHR.open("POST", "{BOARD_URL}ext/w3all/imageattachrotation/core/fileRotate.php");
with this instead (remove or add www, if the board setting is or is not with, or anyway test the one or the other):

Code: Select all

XHR.open("POST", "http://www.yoursite.com/phpbb/ext/w3all/imageattachrotation/core/fileRotate.php");
and check that all will work fine?
Fezroux
User w
User w
Posts: 6
Joined: Sat Oct 25, 2025 5:38 am

Re: Rotate phpBB attachments images - extension

Post by Fezroux »

Hooray it's fixed! :D

The code edit in overall_footer_body_after.html to include my websites URL did the trick.

Thanks so much for taking the time to deal with this for me, I truly appreciate it. My board currently has 134,000+ uploaded images, so you can see why this was important to me.

Just a little nitpick but it would also be nice to be able to change the font awesome rotate icon. Either that or maybe change it in a future update. The default one indicates a counterclockwise rotation but the images rotate the opposite way in a clockwise rotation. :mrgreen:
User avatar
axew3
w3all User
w3all User
Posts: 3020
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Rotate phpBB attachments images - extension

Post by axew3 »

Check that you can style the popup as you like just setting the Recompile Stale setting to yes into ACP and changing so the css file that style the popup:
/ext/w3all/imageattachrotation/styles/all/template/css/style.css
Set the Recompile Stale template to NO when finished.

As finished the Video/Audio Recorder on posts (that's ready!) asap i will take a look and possibly it could be easily extended with something like this (that i do not checked at all maybe is good maybe can be found another better, that can manipulate the image in several more ways like cropping or adding filters or text etc.
https://fengyuanchen.github.io/cropperj ... round.html
Fezroux
User w
User w
Posts: 6
Joined: Sat Oct 25, 2025 5:38 am

Re: Rotate phpBB attachments images - extension

Post by Fezroux »

I was referring to changing the little font awesome icon that appears next to the image filename in the attachments tab. The circle arrow is going the wrong direction compared to the direction the images rotate in. You used 'rotate-left' when it should have been 'rotate-right' It's not a big deal, It's just something I noticed.

After using this extension for a day, I also noticed something else. Sometimes phpBB has a problem when an image is uploaded where it previews with the correct side up, but then when you actually submit the post, it flips the image upside down. I don't know if you've ever experienced that before? If you use this extension to fix the image, it's right side up again in the preview window. When that image orientation problem happens, you can't fix it using this extension on the first try as it just gives the "Click into image to rotate it, then Save!" message. What you have to do is rotate it to an orientation you don't want, save it, and then rotate it back to the original orientation, and save it a second time.

So basically, this extension makes you rotate an image in order to save it which causes a problem in some cases when you need it to fix the orientation of an image without rotating it first. Whatever this extension does to change the orientation of an image, It should also be able to do without having to rotate the image first. It's kind of hard to understand what I mean, and not a huge deal either but something I've come across that you may not have. I can PM you an image that does this so that you can test uploading it to see exactly what I mean. That way you'll quickly understand.
User avatar
axew3
w3all User
w3all User
Posts: 3020
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Rotate phpBB attachments images - extension

Post by axew3 »

Yes please!
User avatar
axew3
w3all User
w3all User
Posts: 3020
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Rotate phpBB attachments images - extension

Post by axew3 »

I finally tested it, little delay, and the unique thing i see is that of course, you have to click into Save image so to have the image set as you have rotated it, before to let close the popup. If the popup close before the image has been saved, when it is re-opened it show the original image in the original position as it is. It is supposed to be like that if you mean the above.

About the icon, that can be changed maybe with any available here:
https://fontawesome.com/v4/icons/

The rotate image icon i tag that display the "rotation icon" is created in JS on fly into this file:

/ext/w3all/imageattachrotation/styles/all/template/event/overall_footer_body_after.html
line

Code: Select all

i.className = "icon fas fa-undo fa-rotate-270";
for example so, to change it and display this new icon instead:
https://fontawesome.com/v4/icon/repeat

just change the line above into this:

Code: Select all

i.className = "icon fas fa-repeat";
Remember that to make changes to take effect when you modify template files, you have to set the Recompile Stale template option to YES into the ACP, or like it is this case, you can also disable the extension, clean-up data of the extension, re-enable the extension.

Ok, of course on next version the icon will be changed to be the above and so to respect the intended direction that you can expect to be based on the icon direction! At the time i did the code i assume that the new Font Awesome icon linked above was not existent.
Post Reply