Rotate

Rotate 1.9

No permission to download
Cool add-on... it works, but gets an error after I do a rotation:

Imagick::flattenImages method is deprecated and it's use should be avoided

  1. XenForo_Application::handlePhpError()
  2. Imagick->flattenimages() in Andy/Rotate/ControllerPublic/Rotate.php at line 138
  3. Andy_Rotate_ControllerPublic_Rotate->actionIndex() in XenForo/FrontController.php at line 351
  4. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
  5. XenForo_FrontController->run() in /home2/mysite/public_html/forum/index.php at line 13

Also... I second the addition of permisions to let the original poster rotate their own images!
 
I am going to ask the **** question but can this be used to fix & rotate avatars or does anybody know of a mod that does that ?

But AndyB you are epic.

Pierce
 
If I rotate images it works while I'm logged in but shrinks the pictures if I log out. All the images below were the same size if logged in or out prior to rotation of 2nd & 4th images.

upload_2016-6-12_17-28-7.webp
 
Hi Andy

I use the latest Rotate 1.6 with xenforo 1.5.11 and the rotation works good, but I have the same nerving error like rwm1962 posted. Can it be, that the addon uses hardcoded the default thumbnail size instead of the setting we made in ACP thumbnail settings?

upload_2017-1-6_6-55-1.webp

The litle thumbnails are after rotatet images, the two big ones are not rotatet. Any chance to solve this?

Best regards

EDIT: Found a qick and dirty solution for me:
Open library/Andy/Rotate/ControllerPublic/Rotate.php

and edit near the end of this file this line:
PHP:
        $imagick->resizeImage(100, 100, Imagick::FILTER_LANCZOS, 1, true);
the "100" in both cases to what ever thumbnail image size you want to have.

In my case, I change it to 280px
PHP:
        // if using Imagick version 3.2.0 or newer
        if ($imagickVersion)
        {
            $imagick->mergeImageLayers(Imagick::LAYERMETHOD_FLATTEN);
        }
        else
        {
            $imagick = $imagick->flattenImages();
        }       
    
        $imagick->resizeImage(280, 280, Imagick::FILTER_LANCZOS, 1, true);
        $imagick->writeImage($thumbnailFullPath);
        $imagick->clear();
        $imagick->destroy();

I think it bounces only with newer Imagick versions, and the problem is, that the Rotate addon in this case own thumbnail settings use instead the settings we set in ACP attachment settings...

To solve the bad sized thumbnails, just rotate them again now or start a bulk in ACP run to renew all thumbnails to the right settings. For me it works now. :)

Best Regards again...
 
Last edited:
Is it possible to have the button only show up when there's a valid image attachment? It seems to show up in every post.
Good idea.
This could be achieved by adjusting Rotate_post template modification from;
Code:
$0
                                <xen:if is="{$post.canEdit} AND {$visitor.permissions.rotateGroupID.rotateID}">
                                    <a href="{xen:link 'posts/rotate', $post}" class="item control">{xen:phrase rotate_rotate}</a>
                                </xen:if>
to
Code:
$0
                                <xen:if is="{$post.canEdit} AND {$visitor.permissions.rotateGroupID.rotateID} AND {$message.attach_count} > 0">
                                    <a href="{xen:link 'posts/rotate', $post}" class="item control">{xen:phrase rotate_rotate}</a>
                                </xen:if>

Ref: Brogan :)
 
@AndyB

Hello Andy, i tried out your rotate function but it don´t work in my Site.
I can rotate the Picture but if i go back to the Post-Site and refresh nothing happen.
Do you have any Idea why i have this Problem?
Thanks

I have exactly the same problem. What was the fix for it?
 
Getting error on install. PHP 7.1 problem?

Security error occurred. Please press back, refresh the page, and try again.
 
Looks like it's an issue with how php 7.1 is set, from WHM or cPanel... it prefers the latter because of the htaccess file.
 
Must say, Andy's support is top notch. It's a donation plugin, it's not a problem with it either, yet he gave his time to investigate futher.
 
Top Bottom