Rotate phpBB attachments images - extension

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

Rotate phpBB attachments images - extension

Post by axew3 »

Add (font awesome) icon (prepend or append) to the image attachment name into the attachments panel (jpg, gif, png, webp) that 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.

1.0.8 release:
updated 15 Oct 2024
Fixes:
just fix the file
/w3all/imageattachrotation/styles/all/template/event/overall_header_head_append.html so to correctly load the css file that style the rotation popup.
To update, you can also only substitute the mentioned file and clean/purge the cache.
phpBB-image-attachments-rotation-1.0.8.zip
(24.81 KiB) Downloaded 18 times


1.0.7 release:
updated 14 Oct 2024

Fixes:
Allow attachments rotation permissions for: admins, moderators, and the file owner.
Set the extension files available by default for all templates (not only the prosilver and/or related children themes)
phpBB-image-attachments-rotation-1.0.7.zip
(24.81 KiB) Downloaded 12 times

1.0.6 release:
updated 19 Sept 2024

Fixes for all devices/browsers
phpBB-image-attachments-rotation-1.0.6.zip
(24.75 KiB) Downloaded 31 times
1.0.5 release:
updated 27 Oct 2023
[attachment=3]phpBB-image-attachments-rotation-1.0.5.zip[/attachment]



viewtopic.php?p=6048#p6048
On github:
https://github.com/axew3/phpBB-image-at ... s-rotation


Version: 1.0.4.2 updated 02 Apr 2022
[attachment=0]phpBB-image-attachments-rotation-master_1.0.4.2.zip[/attachme
nt]
On github:
https://github.com/axew3/phpBB-image-at ... s-rotation

Version: 1.0.4 updated 10 Apr 2021
[attachment=5]phpBB-image-attachments-rotation-master.zip[/attachment]


Old versions are here:
viewtopic.php?p=4815#p4815

Note if updating: before to proceed, you'll have to disable the previous Attachments Rotation 1.0.3 extension into ACP Extensions Manager, and delete extension data.
Then remove the folder /ext/w3all/imageattachrotation,
so follow installing the new 1.0.4


Install


Copy the "w3all" folder into phpBB/ext/

So you'll have: phpBB/ext/w3all/w3imagerotation

Go to "ACP" > "Customise" > "Extensions" and enable the "Attachments images rotation" extension

Done


How do i can style the rotation popup?
It should fit your theme, anyway you can easily change and style it into:

HTML:
/ext/w3all/imageattachrotation/styles/all/template/event/overall_footer_body_after.html
(note that you (maybe) do NOT have to change w3classes and w3ids for html elements, or the javascript code will not work)

Code: Select all

<div id="w3rPopup" class="w3rPopupContainer text-center inputbox" style="display:none">
<table class="w3wrapTABC">
<tr><td class="w3wrapTDC">
<div class="w3divContainer">
<div class="w3divCont"><strong>{{ lang('W3POPUP_TEXTEXPLAIN') }}</strong></div>
<div class="w3divimg"><img id="w3-img-rotate" src="" onclick="w3rotateByDeg(this);" /></div>
<div class="w3divCont"><button class="w3divCont button" type="submit" id="w3btn" onclick="w3sendThis(document.getElementById('w3-img-rotate'));">{{ lang('W3POPUP_BUTTONTEXT') }}</button></div>
</div>
</td></tr></table>
</div>
the html code is all on top of the file

CSS:
/ext/w3all/imageattachrotation/styles/all/template/css/style.css


How do i can choose to prepend or append the rotate icon?

/ext/w3all/imageattachrotation/styles/all/template/event/overall_footer_body_after.html
search for line (+- on top):

Code: Select all

var Pw3A = 1; // 0 Append icon, 1 Prepend icon (require to rebuild the phpBB template)

dolphin.jpg
dolphin.jpg (14.49 KiB) Viewed 15912 times
dolphin.jpg
dolphin.jpg (16.2 KiB) Viewed 15912 times
image_rotation_output_example.png
image_rotation_output_example.png (20.55 KiB) Viewed 15873 times
attachEx1.png
attachEx1.png (45.39 KiB) Viewed 15887 times
Attachments
phpBB-image-attachments-rotation-1.0.5.zip
(38.08 KiB) Downloaded 1147 times
phpBB-image-attachments-rotation-master_1.0.4.2.zip
(38.01 KiB) Downloaded 1170 times
phpBB-image-attachments-rotation-master.zip
(37.83 KiB) Downloaded 1252 times
User avatar
axew3
w3all User
w3all User
Posts: 2883
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Version 1.0.5 released

Post by axew3 »

17 Oct 2023

phpBB-image-attachments-rotation-v1.0.5
phpBB-image-attachments-rotation-1.0.5.zip
(38.08 KiB) Downloaded 1110 times
Fix the rotation popup to correctly show on browsers/devices.
Add webp img format
On Github: https://github.com/axew3/phpBB-image-at ... /tag/1.0.5
User avatar
profcaju
Posts: 1
Joined: Mon Jul 08, 2024 1:49 am

Re: Rotate phpBB attachments images - exstensions

Post by profcaju »

Thank you very much for this extension. 🤗

I was strugling with users to correct align their images posted in my forum. Now I can have an inhouse solution! :D
User avatar
Ezrael
w3 User
w3 User
Posts: 102
Joined: Wed Nov 15, 2023 9:11 pm
Contact:

Re: Rotate phpBB attachments images - exstensions

Post by Ezrael »

Does the extension still works with 3.3.12 ?
User avatar
axew3
w3all User
w3all User
Posts: 2883
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Rotate phpBB attachments images - exstensions

Post by axew3 »

phpbb.com_logo.png
phpbb.com_logo.png (140.11 KiB) Viewed 1974 times
Seem that yes! You can try it also here.
The little icon that appear near the image attachment name on the attachment panel when posting or editing a post.
Whenever some fix required it will be applied, in the while should work fine into any theme.

I would really like to resume and improve the video/audio like whatsapp/telegram into posts extension.
User avatar
Ezrael
w3 User
w3 User
Posts: 102
Joined: Wed Nov 15, 2023 9:11 pm
Contact:

Re: Rotate phpBB attachments images - exstensions

Post by Ezrael »

Works perfect! Amazing! Haven seen the extension before...
Post Reply