[3.2][3.3][RC] Attachments images rotation extension - dev/bugs logs

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Ideas Centre
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
User avatar
axe70
Registered User
Posts: 752
Joined: Sun Nov 17, 2002 10:55 am
Location: Italy
Name: Alessio
Contact:

Re: [3.2][3.3][RC] Attachments images rotation extension - dev/bugs logs

Post by axe70 »

Ok, it will be!

About icon dimension:
unfortunately at moment, you can do this only via:

open:
ext/w3all/imageattachrotation/styles/prosilver/template/event/overall_footer_body_after.html

there are two lines of code where you need to change this:

Code: Select all

i.style = "font-size:70%;margin:0px 0px 0px 5px;";
and

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 font-size:70% value to what you want into these strings.

May you need to recompile stale template to make it changes take effect.

I will try to check how to add these options in another way on next release, without complicating things. I mean, i would like to not add options on phpBB ACP about this, nor about something else if possible. It need to stay easy and fast to be updated along the time. And non intrusive.

P.s you can also change the rotation of the icon, as you'll easily argue looking for (there are 2 again, one in same line):
fa-rotate-270 . change into something between 0/360 the 270 value to make it look rotated as you like
Last edited by axe70 on Wed Oct 07, 2020 2:35 pm, edited 3 times in total.
Do not take me too serious
Anyway i do not like Discourse
Holger
Registered User
Posts: 1883
Joined: Tue Mar 12, 2002 3:54 pm
Location: Hannover

Re: [3.2][3.3][RC] Attachments images rotation extension - dev/bugs logs

Post by Holger »

Nice! Thank you for the fast support!

Edit: 150% did the trick

BTW: https://fontawesome.com/how-to-use/on-t ... ting-icons
User avatar
axe70
Registered User
Posts: 752
Joined: Sun Nov 17, 2002 10:55 am
Location: Italy
Name: Alessio
Contact:

Re: [3.2][3.3][RC] Attachments images rotation extension - dev/bugs logs

Post by axe70 »

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
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.

if anybody wants to know more about:
Prepend icon to attachment link: how to
https://www.axew3.com/w3/forums/viewtop ... 4852#p4852

or resuming the 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.

[EDITED]
Last edited by axe70 on Sat Oct 31, 2020 10:03 am, edited 2 times in total.
Do not take me too serious
Anyway i do not like Discourse
User avatar
axe70
Registered User
Posts: 752
Joined: Sun Nov 17, 2002 10:55 am
Location: Italy
Name: Alessio
Contact:

Re: [3.2][3.3][RC] Attachments images rotation extension - dev/bugs logs

Post by axe70 »

p.s
the Prepend icon to attachment link how to procedure on previous post, has been updated making it fully working.
Unfortunately there is no way at moment to do this in a more comfortable matter, it will be on 1.0.4
viewtopic.php?p=15606656#p15606656

the result will be this:

attach-icon-left-post.png
attach-icon-left-post.png (9.91 KiB) Viewed 1852 times
Do not take me too serious
Anyway i do not like Discourse
sakm
Registered User
Posts: 713
Joined: Sun Jan 21, 2007 8:14 pm
Location: Hull, uk
Name: Stu
Contact:

Re: [3.2][3.3][RC] Attachments images rotation extension - dev/bugs logs

Post by sakm »

Just installed this and it is a nice simple extension

The icon is way too small though and I ended up putting it at 150% for more visibility for users :)
Holger
Registered User
Posts: 1883
Joined: Tue Mar 12, 2002 3:54 pm
Location: Hannover

Re: [3.2][3.3][RC] Attachments images rotation extension - dev/bugs logs

Post by Holger »

I dont know why, but my attachments-view is messed up.
Attachments
rotate.JPG
sakm
Registered User
Posts: 713
Joined: Sun Jan 21, 2007 8:14 pm
Location: Hull, uk
Name: Stu
Contact:

Re: [3.2][3.3][RC] Attachments images rotation extension - dev/bugs logs

Post by sakm »

I have found an issue!

viewtopic.php?f=661&t=2572851&p=15616121#p15616121

disabling the extension allows the smilies to work as normal

With it enabled then I get the issue as detailed in the link
User avatar
axe70
Registered User
Posts: 752
Joined: Sun Nov 17, 2002 10:55 am
Location: Italy
Name: Alessio
Contact:

Re: [3.2][3.3][RC] Attachments images rotation extension - dev/bugs logs

Post by axe70 »

sakm wrote: Mon Nov 02, 2020 1:30 pm I have found an issue!

viewtopic.php?f=661&t=2572851&p=15616121#p15616121

disabling the extension allows the smilies to work as normal

With it enabled then I get the issue as detailed in the link
Can you explain what kind of issue you find out?
Please point me with:

download link to this extension that cause the issue when used with this
and little explain of what you do when you activate the one and the other, like so:
i go to write a post, then i click into this, that should do this other, but then i see it fail with .... etc etc

This code extension, works fine into any phpBB template, that respect the default one about attachment panel DOM.
If there is some other extension, that via any other way, change the default phpBB template attributes on the attachment panel, may adding elements on same way, into same place, may javascript could return error.

Can you reply with the above? I will take a look on where the problem is, if here or in the other side, or maybe in no one, and it is just something that mess up because done the same way.
Do not take me too serious
Anyway i do not like Discourse
bikeridr
Registered User
Posts: 92
Joined: Wed Oct 14, 2020 9:19 pm

Re: [3.2][3.3][RC] Attachments images rotation extension - dev/bugs logs

Post by bikeridr »

axe70 wrote: Tue Nov 03, 2020 3:14 pm Can you explain what kind of issue you find out?
Hi, I was adviced to bring this to your attention. I had the same issue with the "view more smilies" did not work.
My post on the issue and the solution is in this post:
viewtopic.php?p=15625476#p15625476

Please notify me if you want the "test1" user and the extension enabled again for test purposes.
scheccia
Registered User
Posts: 94
Joined: Fri Feb 10, 2017 8:16 am

Re: [3.2][3.3][RC] Attachments images rotation extension - dev/bugs logs

Post by scheccia »

Hi, i install it on my test board... enabled it, but I don't see it anymore in te list of extension and don't work. what can I do? pbpbb 3.3.0
User avatar
axe70
Registered User
Posts: 752
Joined: Sun Nov 17, 2002 10:55 am
Location: Italy
Name: Alessio
Contact:

Re: [3.2][3.3][RC] Attachments images rotation extension - dev/bugs logs

Post by axe70 »

Hello!
Hi, i install it on my test board... enabled it, but I don't see it anymore in te list of extension and don't work. what can I do? pbpbb 3.3.0
it is strange you do not see it into extensions list.
So you enable it, and then after activated the extension disappear into ACP extensions? Sorry my repeat, i just asking myself how this can be possible!
Do not take me too serious
Anyway i do not like Discourse
scheccia
Registered User
Posts: 94
Joined: Fri Feb 10, 2017 8:16 am

Re: [3.2][3.3][RC] Attachments images rotation extension - dev/bugs logs

Post by scheccia »

ops... now i see it
but not works, i must set something?
User avatar
axe70
Registered User
Posts: 752
Joined: Sun Nov 17, 2002 10:55 am
Location: Italy
Name: Alessio
Contact:

Re: [3.2][3.3][RC] Attachments images rotation extension - dev/bugs logs

Post by axe70 »

No! there are no options.
You can follow with prepending the Rotate img icon to the file name, if you want:
viewtopic.php?p=15606656#p15606656

or styling the popup:
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)
Beside this, the extension as possible will move to next version, where will respect phpBB rules, and passed for validation.
In the while it is not improved together with the new 1.0.4 release, this is the actual way to use it.

If any problem or bug, just post!
Do not take me too serious
Anyway i do not like Discourse
scheccia
Registered User
Posts: 94
Joined: Fri Feb 10, 2017 8:16 am

Re: [3.2][3.3][RC] Attachments images rotation extension - dev/bugs logs

Post by scheccia »

axe70 wrote: Thu Feb 04, 2021 1:49 pm No! there are no options.
okk. Work in reply, edit and post. I have quickreply and in this don't work. I can add your function to it?
User avatar
axe70
Registered User
Posts: 752
Joined: Sun Nov 17, 2002 10:55 am
Location: Italy
Name: Alessio
Contact:

Re: [3.2][3.3][RC] Attachments images rotation extension - dev/bugs logs

Post by axe70 »

But if i'm not wrong, on quick reply, you have title to insert, and textarea for the content, not attachments, isn't it?
You mean so, the possibility to rotate images as these appear on topic, for each post?
It is not possible at moment, but should be quite easy to add, where quite easy by the way, mean to add more code about this into another phpBB event listener (or probably only more js code into actual). At moment do not work this way, but of course, it is intended to be improved to work also this way. So 1.04 will may add this feature, like options to into ACP without the need to edit files.(like the icon prepend or append to filename). Not sure if you was aiming to this.
Do not take me too serious
Anyway i do not like Discourse
Post Reply

Return to “Extensions in Development”