[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!
Anti-Spam Guide
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 »

Based on code, it is impossible that you get logged out users due to this, because what you go to get should be just an ajax response NO PERMISSION alerted by javascript. Really strange and quite impossible that it can cause an user logout.
Beside this, it is true that a global moderator that go to rotate the image get the NO PERMISSION error.
Going to fix this
Do not take me too serious
Anyway i do not like Discourse
mrix2000
Registered User
Posts: 1204
Joined: Sun Dec 03, 2006 2:23 pm

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

Post by mrix2000 »

Hello, I am not sure what the conflict is with being logged out but when I installed your EXT a moderator explained he kept getting logged out, I then had another moderator explain the same, I then decided to disable the EXT and the issue went away ? it does from my end seem to be a issue somewhere but why I have no idea, could it be in some way linked to the permission issue ? all I know is once I disable the EXT the log out issue is gone.
Just like the permission issue with me being admin I do not get the problem.
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 »

Doing ... it as been necessary to change the query

Code: Select all

// it is required also the forum id of this attach, to know if this user can or not execute things here    
 $sql = 'SELECT T.*, A.*
	FROM ' . ATTACHMENTS_TABLE . " AS A
	JOIN " . TOPICS_TABLE . " AS T on T.topic_id = A.topic_id
	WHERE A.attach_id = $attach_id";
 $result = $db->sql_query($sql);
 $attachment = $db->sql_fetchrow($result);
 $db->sql_freeresult($result);
and the related
$auth->acl_get
call... ok reproduced and fixed. All should work as expected now.
To fix the issue, will be necessary to replace the file
/ext/w3all/imageattachrotation/core/fileRotate.php
i will put the necessary here in reply and updating the github file in short
Last edited by axe70 on Tue Jan 25, 2022 5:42 pm, edited 1 time 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 »

... then any user that can edit posts into the forum the attach is on, will be allowed to do so:

Code: Select all

// let admins and moderators that can edit or attachment owner to follow
$own_attachment = ($auth->acl_get('m_edit', $attachment['forum_id']) || $attachment['poster_id'] == $user->data['user_id']) ? true : false;
a query has been edited and this line above also, on file:
https://github.com/axew3/phpBB-image-at ... Rotate.php

copy the file content and replace the content of fileRotate.php with the new one,
or download the extension, and extract the file ext/w3all/imageattachrotation/core/fileRotate.php
and substitute with it the existent into
ext/w3all/imageattachrotation/core/fileRotate.php.

Ready.
There is much more to be fixed, even if now all should work very smooth.
It will be done on 1.0.5 that is coming soon!
Do not take me too serious
Anyway i do not like Discourse
mrix2000
Registered User
Posts: 1204
Joined: Sun Dec 03, 2006 2:23 pm

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

Post by mrix2000 »

Fantastic stuff, thanks for your time and efforts on this :D 8-)
mrix2000
Registered User
Posts: 1204
Joined: Sun Dec 03, 2006 2:23 pm

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

Post by mrix2000 »

Seems to now be working fine 8-)
IgorCher
Registered User
Posts: 14
Joined: Mon Jan 03, 2022 9:34 pm

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

Post by IgorCher »

It would be great to add a thumbnail
image.jpg
image.jpg (10.33 KiB) Viewed 2931 times
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 »

I did not understood the suggestion (that could be applied on 1.0.5)
It would be great to add a thumbnail
how you get the result to have this thumb in place of the link to the image, into the attachments panel, when on edit post mode?
Do not take me too serious
Anyway i do not like Discourse
IgorCher
Registered User
Posts: 14
Joined: Mon Jan 03, 2022 9:34 pm

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

Post by IgorCher »

Yes exactly. Small image instead of a link. This is very convenient and visual, when making a message.

image1.jpg

(Sorry for my English)
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 »

So, you would like to have the possibility, not only to rotate images when on edit mode, but also when on viewtopic?

P.s ... mhh no i think i have understand what you mean.
anyway, you did not answered to my question.
How you get those images into attachment panel? An extension?
Do not take me too serious
Anyway i do not like Discourse
IgorCher
Registered User
Posts: 14
Joined: Mon Jan 03, 2022 9:34 pm

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

Post by IgorCher »

No, you need to rotate only in theme edit mode.

This extension is called pai (preview-attached-images):

Code: Select all

https://www.phpbb-work.ru/preview-attachments-ext-t91.html

It shows thumbnails in the download list.
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 »

If not wrong the extension you say, allow to rotate attachments also. Thank you for report.
Actually on this, you can open an attach into popup, and moving mouse over attachments images, without clicking elsewhere, you can see into popup the switch from an image to another. So t hat you can see easily which is the one, when there are many, you may have to rotate (assuming you do not remember the name of the image, or that there are more named the same, when you switch from post view to edit mode). It look like a thing that overflow phpBB load, to have thumbs into attachments panel like you say.
[EDITED]
Do not take me too serious
Anyway i do not like Discourse
IgorCher
Registered User
Posts: 14
Joined: Mon Jan 03, 2022 9:34 pm

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

Post by IgorCher »

Yes, it turns too. But your extension is better. :)

And then. Rotate (pai) doesn't work on php 8.1. Your extension is working!

Thumbnails must be seen, as often photos are uploaded from a smartphone and they may initially be upside down. And when you immediately see it, you know that you need to rotate the photo. And you don't have to do anything extra.

Sincerely!

(Sorry for my English)
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 »

Well sorry also you for mine (Eng) :)
This is just another way on doing things years later, i am sure the mentioned ext pai has been,
and still is used and it is useful for many phpBB users.
Thumbnails must be seen, as often photos are uploaded from a smartphone and they may initially be upside down. And when you immediately see it, you know that you need to rotate the photo. And you don't have to do anything extra.
I see. It can be surely added as option, to display a thumb in place of link. As option it will be added.
Activating the option, a thumb created on fly from images sources will display, so where there is no thumb active on ACP or created for the stored image, it will be anyway created on fly for the browser.
Do not take me too serious
Anyway i do not like Discourse
IgorCher
Registered User
Posts: 14
Joined: Mon Jan 03, 2022 9:34 pm

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

Post by IgorCher »

It will be a great joy for me!
I will be looking forward to the update. Thank you for doing this work.
This handy extension brings phpbb closer to people! :!: :!: :!:
Post Reply

Return to “Extensions in Development”