• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Auto Image Rotate for iPhone and iPad [Deleted]

tommydamic68

Well-known member
#22
Not me, the original member that told me of the problem. I didn't do this part by the way -
Admin CP -> Home -> Options -> Attachments -> Default Image Processor -> ImageMagick PECL Extension
-
but it did work when I first did the modification without this setting.
 

tommydamic68

Well-known member
#25
Like so. Like I said, I have never changed this and at first, it did work for this person. If you are going to ask me to change it, how will it effect my images and can it be set back? Thanks.

Screen Shot 2013-09-24 at 4.39.07 AM.png
 

tommydamic68

Well-known member
#26
I just realized something, I check and the modified upload.php and it was back to its original state. What may have happened is that I got a server error a week or so ago and @Mike had me re-upload a file and I can't remember the name of it or find the thread. It did fix the server error. Will this hack cause a server error on the ACP back end?
 

AndyB

Well-known member
#28
I just realized something, I check and the modified upload.php and it was back to its original state. What may have happened is that I got a server error a week or so ago and @Mike had me re-upload a file and I can't remember the name of it or find the thread. It did fix the server error. Will this hack cause a server error on the ACP back end?
This modification will not cause server errors. But you do need to confirm ImageMagick is working.

In my previous post I asked which image processor you have checked.
 

Marcus

Well-known member
#34
The addon would look like this:

listener: load_class
hint: XenForo_Upload
Listener: AutoRotate_Listener::loadClass
PHP:
class AutoRotate_Listener

public function loadClass
{
extend[] = 'AutoRotate_Upload';
}
PHP:
class AutoRotate_Upload extends XFCP_AutoRotate_Upload
{
  protected function _checkImageState()
{
  if ($this->_imageInfo !== null)
     {
       return;
     }

     $this->_imageInfo = false; // default to not an image

exec("/usr/bin/mogrify -auto-orient $this->_tempFile");
return parent::_checkImageState();
}
}
There might be some errors, but maybe this helps you.