News:

SMF 2.1.4 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

-Rock Lee-

I just realized the current but you can see at that moment it did not translate, that's why I leave it to Spanish now! 8)


Regards!
¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

dougiefresh

Uploaded v3.9 - February 13th, 2018
o Added Spanish Latin translation, courtsey of Rock Lee.
o Added translators section to README.txt.
o Added LICENSE.txt to satisfy licensing concerns.




@Rock Lee:  Thank you for the translation!!  It's been included in this version!

GL700Wing

Quote from: dougiefresh on February 13, 2018, 10:02:05 PM
Uploaded v3.9 - February 13th, 2018
Would you please include the fix for A non well formed numeric value encountered in the next release - as requested I have verified that it works with SMF 2.0.15 and PHP 5.6.
Life doesn't have to be perfect to be wonderful ...

dougiefresh

Uploaded v3.10 - February 17th, 2018
o Included "Non well-formed number" fix by GL700Wing, as discussed here.




@GL700Wing:  Whoops!  I completely forgot about that fix when I released the last version!  It's been included for this version, though!  Thanks!

GL700Wing

#124
I installed this mod and discovered that, as per this post, images didn't rotate as expected - in fact 'Rotate 90o Clockwise' and 'Rotate 270o Clockwise' both had the opposite effect to what I expected.  In addition, I thought some of the 'action' descriptions (eg, 'Rotate 270o Clockwise' ) could be made clearer (eg, 'Rotate 90o Left').

So - I've made the following minor changes on my forum.

I changed the text strings in ./Themes/default/languages/AutoRotation.english.php as follows:
$txt['img_orientation'] = 'Rotate/Flip';
$txt['img_orientation1'] = 'No Change';
$txt['img_orientation2'] = 'Horizontal Flip';
$txt['img_orientation3'] = 'Rotate 180°';
$txt['img_orientation4'] = 'Vertical Flip';
$txt['img_orientation5'] = 'Vertical Flip, Rotate 90° Right';
$txt['img_orientation6'] = 'Rotate 90° Right';
$txt['img_orientation7'] = 'Horizontal Flip, Rotate 90° Right';
$txt['img_orientation8'] = 'Rotate 90° Left';
$txt['img_rotate'] = 'Rotate/Flip Images';


And I've changed the drop-down menu selection order in ./Sources/ManageAttachments.php and ./Themes/default/Post.template.php to:
<option value="0">' . $txt['img_orientation1'] . '</option><option value="6">' . $txt['img_orientation6'] . '</option><option value="8">' . $txt['img_orientation8'] . '</option><option value="3">' . $txt['img_orientation3'] . '</option><option value="2">' . $txt['img_orientation2'] . '</option><option value="4">' . $txt['img_orientation4'] . '</option><option value="7">' . $txt['img_orientation7'] . '</option><option value="5">' . $txt['img_orientation5'] . '</option>
Life doesn't have to be perfect to be wonderful ...

dougiefresh

@Rock Lee:  Can you translate these strings properly for this new version?  Thanks!
$txt['img_orientation'] = 'Rotate/Flip';
$txt['img_orientation1'] = 'No Change';
$txt['img_orientation2'] = 'Horizontal Flip';
$txt['img_orientation3'] = 'Rotate 180&deg;';
$txt['img_orientation4'] = 'Vertical Flip';
$txt['img_orientation5'] = 'Vertical Flip, Rotate 90&deg; Right';
$txt['img_orientation6'] = 'Rotate 90&deg; Right';
$txt['img_orientation7'] = 'Horizontal Flip, Rotate 90&deg; Right';
$txt['img_orientation8'] = 'Rotate 90&deg; Left';
$txt['img_rotate'] = 'Rotate/Flip Images';


@GL700Wing:  I'm implementing the changes you suggested.  Once Rock Lee gives me the translations, I'll publish the new version!

-Rock Lee-

No problem, here they are translated 8)

$txt['img_orientation'] = 'Girar / Voltear';
$txt['img_orientation1'] = 'Ning&uacute;n cambio';
$txt['img_orientation2'] = 'Flip horizontal';
$txt['img_orientation3'] = 'Girar 180&deg;';
$txt['img_orientation4'] = 'Vertical Flip';
$txt['img_orientation5'] = 'Vertical Flip, Girar 90&deg; Derecha';
$txt['img_orientation6'] = 'Girar 90&deg; Derecha';
$txt['img_orientation7'] = 'Flip horizontal, Girar 90&deg; Derecha';
$txt['img_orientation8'] = 'Girar 90&deg; Izquierda';
$txt['img_rotate'] = 'Girar / Voltear im&aacute;genes';


Whatever you need, call me...


Regards!
¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

dougiefresh

Uploaded v3.11 - February 20th, 2018
o Updated Spanish Latin translations, courtsey of Rock Lee.
o Changed rotation/flip strings for better understandability, per GL700Wing's post above.
o Changed order of rotation/flip strings in templates, per GL700Wing's post above.




@Rock Lee and @GL700Wing:  Thank you both for your contributions!  They are appreciated, since lately I can't seem to get my sh#t together well enough....  Plus I'm sick with a damn sinus infection from hell!   UGH!!!

GL700Wing

You're welcome - hope you're feeling better soon.
Life doesn't have to be perfect to be wonderful ...

@rjen

Quote from: GL700Wing on February 18, 2018, 10:53:42 PM
I installed this mod and discovered that, as per this post, images didn't rotate as expected - in fact 'Rotate 90o Clockwise' and 'Rotate 270o Clockwise' both had the opposite effect to what I expected.  In addition, I thought some of the 'action' descriptions (eg, 'Rotate 270o Clockwise' ) could be made clearer (eg, 'Rotate 90o Left').

So - I've made the following minor changes on my forum.

I changed the text strings in ./Themes/default/languages/AutoRotation.english.php as follows:
$txt['img_orientation'] = 'Rotate/Flip';
$txt['img_orientation1'] = 'No Change';
$txt['img_orientation2'] = 'Horizontal Flip';
$txt['img_orientation3'] = 'Rotate 180&deg;';
$txt['img_orientation4'] = 'Vertical Flip';
$txt['img_orientation5'] = 'Vertical Flip, Rotate 90&deg; Right';
$txt['img_orientation6'] = 'Rotate 90&deg; Right';
$txt['img_orientation7'] = 'Horizontal Flip, Rotate 90&deg; Right';
$txt['img_orientation8'] = 'Rotate 90&deg; Left';
$txt['img_rotate'] = 'Rotate/Flip Images';


And I've changed the drop-down menu selection order in ./Sources/ManageAttachments.php and ./Themes/default/Post.template.php to:
<option value="0">' . $txt['img_orientation1'] . '</option><option value="6">' . $txt['img_orientation6'] . '</option><option value="8">' . $txt['img_orientation8'] . '</option><option value="3">' . $txt['img_orientation3'] . '</option><option value="2">' . $txt['img_orientation2'] . '</option><option value="4">' . $txt['img_orientation4'] . '</option><option value="7">' . $txt['img_orientation7'] . '</option><option value="5">' . $txt['img_orientation5'] . '</option>

Nice to see that you picked up my request. I made these changes as well, but got not reply on the question. Thought it was forgotten...
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

dougiefresh

Sorry about that, @rjen!  I really didn't know how to fix it....

@rjen

Tested, and looking good.

In the explanation you may also want to update the option descriptions?

It still reads:

QuoteManual Rotation Options
o No Change
o Horizontal Flip
o Rotate 180 degrees
o Vertical Flip
o Vertical Flip, Rotate 270 degrees clockwise. (90 degrees counter-clockwise)
o Rotate 270 degrees clockwise. (90 degrees counter-clockwise)
o Horizontal Flip, Rotate 270 degrees clockwise. (90 degrees counter-clockwise)
o Rotate 90 degrees clockwise.

May be changed to:

o No Change
o Rotate 90 degrees Right
o Rotate 90 degrees Left.
o Rotate 180 degrees
o Horizontal Flip
o Vertical Flip
o Horizontal Flip, Rotate 90 degrees Right
o Vertical Flip, Rotate 90 degrees Right

Find attached the language file for Dutch..
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

GL700Wing

Quote from: @rjen on February 22, 2018, 04:14:09 AM
May be changed to:

o No Change
o Rotate 90 degrees Right
o Rotate 90 degrees Left.
o Rotate 180 degrees
o Horizontal Flip
o Vertical Flip
o Horizontal Flip, Rotate 90 degrees Right
o Vertical Flip, Rotate 90 degrees Right

It may even be possible to use the 'degrees' symbol ...
o No Change
o Rotate 90° Right
o Rotate 90° Left
o Rotate 180°
o Horizontal Flip
o Vertical Flip
o Horizontal Flip, Rotate 90° Right
o Vertical Flip, Rotate 90° Right
Life doesn't have to be perfect to be wonderful ...

dougiefresh

#133
Uploaded v3.12 - February 22nd, 2018
o Added Dutch translation, courtsey of @rjen!
o 2nd attempt: Changed order of rotation/flip strings in templates, per GL700Wing's post above.
o Changed documentation to reflect new order of manual rotation options.




@rjen:  Thank you for the translation!  It's been included in this version!  I've also "reeditted" the install XML files so that the option-order changes are present, cause I'm not sure if they got into the last version....

EDIT:  I finally saw what you were talking about: it's in the documentation....  It's been fixed!  Thanks!

Rob Lightbody

Installed and working on 2.0.15.  Thank you.

Only hiccup is when you go to browse files, then rotate an image, the button at the bottom, and the confirmation, both warn you about deleting files, even though I'm only rotating them.

dougiefresh

Uploaded v4.0 - March 27th, 2018
o Per GL700Wing, fixed issue where images with very large dimensions could not be rotated (Image Processing Memory Limit mod may also be required if issue persists).
o Per GL700Wing, code added to automatically resize images in new and existing topics.
o Per GL700Wing, added automatic rotation and automatic resize for images in PMs if 'PM Attachments' mod is installed.




@GL700Wing:  Thank you for the new version!  It's been converted for use with SMF 2.1 Beta 3, as well!

@The QE2 Story Forum:  I'm not sure where you are talking about.  Are you talking about the admin area?

Rob Lightbody

Hi there,

I uninstalled 3.12, and tried to install 4.0, but it has failed because the following line in subs-graphics is different on my installation.  I believe this is because I am also using the "Resize Attached Images" mod.

$success = imagejpeg($dst_img, $destName, min($modSettings['attachment_image_compression'], 100));


For now, I've re-installed 3.12 again.

Cheers,

- Rob

dougiefresh

@The QE2 Story Forum: The installation readme notes that the Resize Attached Images mod should NOT be installed prior to the installation of this mod, as they contain similar, but not the same, functionality....  IMO, this should imply that if you have it installed, you should uninstall it before installing this mod...

Rob Lightbody

Quote from: dougiefresh on March 30, 2018, 12:31:59 PM
@The QE2 Story Forum: The installation readme notes that the Resize Attached Images mod should NOT be installed prior to the installation of this mod, as they contain similar, but not the same, functionality....  IMO, this should imply that if you have it installed, you should uninstall it before installing this mod...

Thank you for replying, and sorry for not reading the instructions properly!   OK so I uninstalled 3.12 version of this mod, and then I uninstalled "resize attached images" too... then I reinstalled version 4 of this mod and - all is well!  Thank you!

Rob Lightbody

Just a note - I'm having terrible problems with this now I'm afraid.   It doesn't mean that I don't recommend it to others, just that its caused me a lot of bother overall.

Even though it installs and uninstalls cleanly, I'm getting issues such as zero-byte uploads, and I even have a topic that won't display now until I uninstall the mod...

https://www.theqe2story.com/forum/index.php?action=admin;area=manageattachments;sa=browse;sort=date;desc
2: filemtime(): stat failed for /home/robligh/public_html/forum/attachments/57406_a5e04f2e038e80b207c22b83c11a78a07b0bd6c4
File: /home/robligh/public_html/forum/Sources/ManageAttachments.php(383) : runtime-created function
Line: 17


Advertisement: