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!
 
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 :)
 
Back
Top Bottom