Rotate phpBB attachments images - exstension

Post a reply


This question is a means of preventing automated form submissions by spambots.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

If you wish to attach one or more files enter the details below.

Expand view Topic review: Rotate phpBB attachments images - exstension

Re: Rotate phpBB attachments images - exstension

by HaioPaio » Sun Aug 29, 2021 7:42 pm

I'm using this extension since the first day and I'm still happy with it.
Before, it was the daily task of our team to help members to get their image attachements rotated. Members were not satisfied with the forum software. We were pissed off about members not following our advice not to post portrait format pics. An endless story.
Nowadays, the problem has disappeared. Members have learned fast how to rotate misaligned pics with a mouseclick.
The Mod Team no longer is wasting time and can focus on more important things.

A real success story. Thaaaank youuuuuu
der-räuchertreff.de

Re: Rotate phpBB attachments images - exstension

by axew3 » Mon Mar 29, 2021 3:59 pm


Version: 1.0.4 has been released
Download 1.0.4 here



Version: 1.0.3 updated 04 Oct 2020

Re: Rotate phpBB attachments images - exstension

by DjPorkchop73 » Fri Jan 15, 2021 1:09 am

DOH! Not sure how I did not see that. Upgrading again now. :D

Re: Rotate phpBB attachments images - exstension

by axew3 » Thu Jan 14, 2021 8:47 pm

Ehi! Why not last 1.0.3 on top?

Re: Rotate phpBB attachments images - exstension

by DjPorkchop73 » Thu Jan 14, 2021 8:17 am

I finally got around to upgrading to the 1.0.2 Dev. I really like this extension. It is really a fantastic addition to phpBB. Especially on a image based website such as photography.

Nicely done!

Re: Rotate phpBB attachments images - exstension

by micka76 » Tue Oct 13, 2020 8:39 am

Hello
Great thanks a lot
Good work

Re: Rotate phpBB attachments images - exstension

by axew3 » Mon Oct 12, 2020 12:57 pm

This is not the unique scenario where it is truncated. It is truncated also if the link name is too long, into any other device, standing on default phpBB attachments panel template. At moment the unique way to change this is:

Prepend icon to attachment link: how to

OPEN:
/w3all/imageattachrotation/styles/prosilver/template/event/overall_footer_body_after.html

search for:
i.style = "font-size:70%;margin:0px 0px 0px 5px;";
change into:
i.style = "font-size:70%;margin:0px 5px 0px 0px;";

search for:
this.after(ah); // work
change into:
this.before(ah); // work

search for:

Code: Select all

$(this).append( '<a class="w3rotate" href="javascript:void(0);"><i style="margin:0px 0px 0px 5px;font-size:70%" class="icon fas fa-undo fa-rotate-270"></i></a>'); 
change into:

Code: Select all

$(this).prepend( '<a class="w3rotate" href="javascript:void(0);"><i style="margin:0px 5px 0px 0px;font-size:70%" class="icon fas fa-undo fa-rotate-270"></i></a>'); 
note that into this last line, have been changed append that become prepend and the css margin, as above, moved to right 5px with 0px 5px 0px 0px

search for:

Code: Select all

var getPrevHref = $( this ).prev().attr('href'); // need to match on DOM
change into:

Code: Select all

var getPrevHref = $( this ).next().attr('href'); // need to match on DOM
search for:

Code: Select all

var getPrevHref = $( this ).prev().children().attr('href'); // need to match on DOM
change into:

Code: Select all

var getPrevHref = $( this ).next().children().attr('href'); // need to match on DOM
remember to recompile stale template.

p.s the extension is installed also here, but can be noted that when popup appear into iframe mode (as it is this example), it appear more on top on window, so if the post is with many replies, it seem that it do not has opened, because you won't see it if you not scroll to top the page. It has been already resolved with 3 lines of code, that still have not been applied here, and that maybe will become default on next 1.0.4.

[EDITED]

Re: Rotate phpBB attachments images - exstension

by micka76 » Mon Oct 12, 2020 12:33 pm

Hello
How to put the icon BEFORE the link please?
Because on a smartphone it is not visible as the link is truncated, I found for the size and the color but not the placement
Thank you

visible
Image

no visible
Image

Re: Rotate phpBB attachments images - exstension

by DjPorkchop73 » Mon Sep 21, 2020 4:03 pm

Molto ben fatto!
Very well done. I really like this plugin. It is very much needed.

Re: Rotate phpBB attachments images - exstension

by axew3 » Tue Sep 15, 2020 10:10 pm

The cache issue has been resolved, even if still not committed.
Now when image rotate, his id change into db, so when process executed, the id pushed to change id also into attachments panel at mean time.
The image will be immediately available after rotation, because his id will change. A by long time requested feature in phpBB easily done. I will commit all updates asap a js instruction will decide to work as expected, that update values into attachments panel to achieve immediately as soon the image as been processed. Then all will be complete!

Re: Rotate phpBB attachments images - exstension

by DjPorkchop73 » Tue Sep 15, 2020 4:10 pm

I have tested this out on my test board and I really like it. It did have the cache issue as you stated but it can be fixed in time I am more than sure as you have done a wonderful job thus far.

I have many times uploaded attachment images that turned sideways on me for one reason or the other and I wished I could flip them. This plugin solves that. Very practical and usable. +1

Rotate phpBB attachments images - exstension

by axew3 » Mon Sep 14, 2020 4:00 pm

Add (font awesome) icon after the image attachment name into the attachments panel (jpg, gif or png) that onlick 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.
Working on edit, post and reply mode. Light, secure.




Version: 1.0.4 has been released
Download 1.0.4 here



Version: 1.0.3 updated 04 Oct 2020
phpBB-image-attachments-rotation-master_1.0.3.zip
(39.75 KiB) Downloaded 103 times


Install


Copy the "w3all" folder into phpBB/ext/

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

Set ACP option "Recompile stale style components" to yes

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

Test things may doing a test post

If all ok, reset "Recompile stale style components" to no

Done

phpBB cookie domain


Note that the setting
ACP -> Security settings -> Cookie domain:
Need to be set properly. Leaving this setting empty, lead to make it fail the js code of the popup.
For example, on localhost, set it as localhost, or if into online site, mysite.com or my-site.co.uk or mysubdomain.mysite.com etc

How do i can style the rotation popup?

It is the file rotate_popup.html, which you can find into:

/ext/w3all/imageattachrotation/styles/prosilver/template/event/rotate_popup.html

Note that you need to respect the normal/correct html DOM in this file, that (anyway) start with a <style> tag
<style> .... </style>

... ... ...
It do not contain the starting 'html' and 'head' tags, and you do not have to add them (already added earlier)


phpBB image attachments rotation extension on github
from github: download the zip by clicking into Code button, then on Download zip.
Follow instructions on same download page.


To prepend icon, see here:

viewtopic.php?p=4852#p4852


OLD VERSIONS:


Version: 1.0.0 dev
phpBB-image-attachments-rotation-master.zip
(33.23 KiB) Downloaded 93 times

Version: 1.0.1 dev
phpBB-image-attachments-rotation-master1.0.1.zip
(34.81 KiB) Downloaded 91 times

Version: 1.0.2 dev
phpBB-image-attachments-rotation-master_1.0.2.zip
(35.26 KiB) Downloaded 85 times

Version: 1.0.3 dev
phpBB-image-attachments-rotation-master_1.0.3.zip
(39.75 KiB) Downloaded 103 times
32769191_1317613495048760_2189393457838030848_n.jpg
32769191_1317613495048760_2189393457838030848_n.jpg (16.2 KiB) Viewed 2117 times
32769191_1317613495048760_2189393457838030848_n.jpg
32769191_1317613495048760_2189393457838030848_n.jpg (14.49 KiB) Viewed 2117 times
image_rotation_output_example.png
image_rotation_output_example.png (20.55 KiB) Viewed 2011 times

Top