News:

SMF 2.1.6 has been released! Take it for a spin! Read more.

Main Menu

Automatic Attachment Rotation (and Resize)

Started by dougiefresh, March 04, 2016, 07:34:59 PM

Previous topic - Next topic

sts_pro

Quote from: sts_pro on February 06, 2022, 06:31:38 AMFirst of all thank you for the great mod!

I just started using it and facing one issue: manual thumbnail rotation for existing attachments is not working. I tried both IT and TO modes: image rotation happening without any issues every time, however, thumbnail does not rotate.
Could it be an issue with some settings on my side?
Revoking my question :) Mod is working as expected, it was a problem on my side 👍

evgeniyk

Quote from: landyvlad on February 09, 2022, 07:18:17 PM@GL700Wing I have this mod installed on 2.0.19.

I see its noted as compatible with 2.1RC4

With the release now of 2.1.0 is it compatible for use with no further changes necessary?
It is not working with 2.1.1. Just tried.

Pyrhel

This is one of the most helpful mods I had on the previous version. I hope it will be patched soon.

gevv

SMF 2.1.1 update canceled :) 

Quote from: Pyrhel on February 16, 2022, 04:43:21 AMThis is one of the most helpful mods I had on the previous version. I hope it will be patched soon.

+1000

@dougiefresh Thanks
ElkArte is a modern, powerful community building forum software. https://www.elkarte.net/

pmmGarak

I wish the error message on install was somewhat more telling, I have no idea where to look for the problem - GL700wing seems to have no time in the near future... In a forum with lots of non-tech, smartphone photography people, things go really fast towards blown storage quotas without this mod...

GL700Wing

Quote from: Pyrhel on February 16, 2022, 04:43:21 AMThis is one of the most helpful mods I had on the previous version. I hope it will be patched soon.
I know lots of people are waiting for an update to this mod for 2.1.x and I will create one as soon as I can. 

However, I'm currently away from home on holidays (first time in three years I've been able to get away for more than a couple of weeks) and I won't be home until mid March.  Obviously, and until such time as I have access to my development and test environments (and the internet - I love remote area travelling/camping - most days I have only limited access to mobile/cell phone networks and the internet and you're only getting this reply because today is one of those days!), I don't know how much work is involved in updating the mod so I cannot commit to a release date of a new version.


Quote from: gevv on February 25, 2022, 11:58:15 AM@dougiefresh Thanks
Just letting you know I now maintain this mod - as far as I can tell @dougiefresh has not been active here for almost three years ...


Quote from: pmmGarak on February 26, 2022, 06:00:32 AM... GL700wing seems to have no time in the near future...
If by 'near future' you mean tomorrow or next week (and probably next month) you're correct.  However, and as I have already indicated, I will be able to work on an update for 2.1.x in early April ...
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

pmmGarak

Quote from: GL700Wing on February 26, 2022, 07:38:43 AMIf by 'near future' you mean tomorrow or next week (and probably next month) you're correct.  However, and as I have already indicated, I will be able to work on an update for 2.1.x in early April ...

Just to make it clear: I was just spreading the information you gave somewhere else. No critique or pressure, I know quite well how some people can expect volunteers to work quicker and harder than payed folks. And most only learn if ever they try doing something for free others might find useful.

GL700Wing

Quote from: pmmGarak on February 27, 2022, 02:18:10 AMJust to make it clear: I was just spreading the information you gave somewhere else. No critique or pressure, I know quite well how some people can expect volunteers to work quicker and harder than payed folks. And most only learn if ever they try doing something for free others might find useful.
No problem - I just wasn't sure that you were aware of my current situation ...
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

GL700Wing

@evgeniyk, @Pyrhel, @gevv, @pmmGarak, etc ...

Just wondering if any of you have tried to install (using emulation mode) and/or use the GitHub version of this mod that I created for 2.1 RC4 (ie, AARR_v6.11-RC4GitHub-210918.zip) - I created this version to work with some 2.1 code changes that were made after RC4 was released ...

You cannot view this attachment.

Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Pyrhel

I've just installed it and in some topics an error occurs:

QuoteAutoRotation_Resize FAILED for "xxx/forum/attachments/10021_04984bee5f70492d0add95ee3a6662888cf7f5e3.dat" - the original image file has been restored.

GL700Wing

Quote from: Pyrhel on February 28, 2022, 02:30:08 AMI've just installed it and in some topics an error occurs:

QuoteAutoRotation_Resize FAILED for "xxx/forum/attachments/10021_04984bee5f70492d0add95ee3a6662888cf7f5e3.dat" - the original image file has been restored.
Try disabling the 'Resize, compress and/or reformat existing images when messages are displayed' option ...
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Pyrhel

Yup, I did it once I went through the topics with attachments, posted after the update to resize all of the 3-4MB images. Now everything seems OK.

gevv

Quote from: GL700Wing on February 27, 2022, 05:39:25 PM@evgeniyk, @Pyrhel, @gevv, @pmmGarak, etc ...

Just wondering if any of you have tried to install (using emulation mode) and/or use the GitHub version of this mod that I created for 2.1 RC4 (ie, AARR_v6.11-RC4GitHub-210918.zip) - I created this version to work with some 2.1 code changes that were made after RC4 was released ...

You cannot view this attachment.



Using emulation mode  AARR_v6.11-SMF20-SMF21RC4Official.zip

You cannot view this attachment.


Where can I download the github version? AARR_v6.11-RC4GitHub-210918.zip
ElkArte is a modern, powerful community building forum software. https://www.elkarte.net/

GL700Wing

Quote from: gevv on February 28, 2022, 11:29:32 AMUsing emulation mode AARR_v6.11-SMF20-SMF21RC4Official.zip
...
The issues with installing this version of the mod on 2.1.x have already been reported ...

QuoteWhere can I download the github version? AARR_v6.11-RC4GitHub-210918.zip
From the same place you downloaded AARR_v6.11-SMF20-SMF21RC4Official.zip - it's the package above this one  (shown inside the red box in the image below) ...
You cannot view this attachment.
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

@rjen

One more note for the next version:

occasionally this error is logged...

https://www.fjr-club.nl/index.php?action=post;msg=373541;topic=27731.0
/home/deb77453/domains/fjr-club.nl/public_html/Themes/default/Post.template.php (Regel 339) 

Errortype: Ondefined
Error:
8: Undefined index: imageAttachments
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

GL700Wing

Uploaded v6.12 - March 21, 2022
o Added support for SMF 2.1.x.
o Removed support for SMF 2.1 RC4.
o SMF 2.1: Per @rjen - undefined index error for 'imageAttachments' in ./Themes/default/Post.template.php.
o No changes for SMF 2.0


Thanks to @rjen for reporting this issue.
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

GL700Wing

Quote from: sts_pro on February 06, 2022, 06:31:38 AMFirst of all thank you for the great mod!

I just started using it and facing one issue: manual thumbnail rotation for existing attachments is not working. I tried both IT and TO modes: image rotation happening without any issues every time, however, thumbnail does not rotate.
Could it be an issue with some settings on my side?
@sts_pro - this issue hasn't been reported by anyone else and it could be a browser caching issue - have you tried clearing your browser cache after rotating thumbnails to see if they display correctly?

Also, and if you're still having this issue, please let me know which version of SMF you are using.
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

GL700Wing

Quote from: GL700Wing on March 21, 2022, 06:23:47 AM
Quote from: sts_pro on February 06, 2022, 06:31:38 AMFirst of all thank you for the great mod!

I just started using it and facing one issue: manual thumbnail rotation for existing attachments is not working. I tried both IT and TO modes: image rotation happening without any issues every time, however, thumbnail does not rotate.
Could it be an issue with some settings on my side?
@sts_pro - this issue hasn't been reported by anyone else and it could be a browser caching issue - have you tried clearing your browser cache after rotating thumbnails to see if they display correctly?

Also, and if you're still having this issue, please let me know which version of SMF you are using.
@sts_pro - I've done some more testing and found the cause of the issue you reported - after an image/thumb is rotated I change the timestamp back to the original timestamp and because of this most browsers use the cached version of the image/thumb.  I'll fix this in the next release but in the meantime clearing the browser cache should result in the updated image/thumb being shown.
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

mucknet

Hi @GL700Wing  -
I have a very old installation, upgraded over the years. I recently upgraded to 2.1.1. I don't have any other Mods, and I'm using the default Theme. The Mod install went well without any major errors. the only test that failed was the "./Sources/PersonalMessage.php" test. I don't know why it failed. Permissions were correct.


The attachment options are showing as expected in the admin console. But when I try to upload an image in a post, I don't see any resizing, or orientation options like the screenshots show. I just see the standard attachment UI.

I had the same results on both 2.0.19 and 2.1.1. I originally tried 2.0.19, and then restored from backup, and tried 2.1.1 when I couldn't make it work on 2.0.19. Both times the "./Sources/PersonalMessage.php" test failed, I could see the admin options, but couldn't resize images during posting/uploading.
I plan on staying on 2.1.1 now that I'm on it.

GL700Wing

Quote from: mucknet on March 22, 2022, 05:08:36 AMHi @GL700Wing  -
I have a very old installation, upgraded over the years. I recently upgraded to 2.1.1. I don't have any other Mods, and I'm using the default Theme. The Mod install went well without any major errors. the only test that failed was the "./Sources/PersonalMessage.php" test. I don't know why it failed. Permissions were correct.
@mucknet - Changes to "./Sources/PersonalMessage.php" are only relevant if you also have the PM Attachments mod installed.  That said, I'll fix the next version to ignore all errors for "./Sources/PersonalMessage.php".

QuoteThe attachment options are showing as expected in the admin console. But when I try to upload an image in a post, I don't see any resizing, or orientation options like the screenshots show. I just see the standard attachment UI.
1.  Image resizing happens automatically when you save a post with an uploaded image (options are only shown for SMF 2.0 if you have configured different options for some membergroups and you have one of those membergroups as your Primary membergroup - for SMF 2.1 information is shown indicating the JPEG quality and maximum width/height that will be used);
3.  If uploaded JPEG images have the orientation EXIF information in their metadata they will be rotated automatically when the post is saved; and
2.  The option to manually rotate images (and now thumbs) has only ever been shown when you edit an existing message.
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Advertisement: