vikdiesel / justboil.me

Justboil.me — A very simple TinyMCE image upload plugin
https://justboil.marketto.ru/
121 stars 46 forks source link

Rotate portrait image when resize #13

Open Oliv- opened 8 years ago

Oliv- commented 8 years ago

Hello, thank you for this plugin! Just when I sent a big image with portrait orientation, the image has good (re)size but runs in landscape orientation?!

$config['max_size'] = 0;
$config['max_width'] = 900;
$config['max_height'] = 800;
$config['allow_resize'] = TRUE;
vishwakarma09 commented 8 years ago

if image width is more than height , that is a landscape. Nonetheless, are you trying to add image in tinyMCE editor using plugin?

RanaZubair commented 8 years ago

@vishwakarma09 I load html in tinymce. i need to resize image according to div in html. When i gave width:100% height:100% in css it works with other plugin but not jbimages. is there any why to resize images uploaded via jbimages...?

vishwakarma09 commented 8 years ago

Hi,

As you see the images uploaded by justboil are readily available for you to do anything. consider this file https://github.com/vishwakarma09/bimpra.tk/blob/master/common/backend/js/plugins/tiny_mce/plugins/jbimages/dialog.htm

This file does the upload. The upload, as you can see from code is handled by (http://bimpra.tk/uploader/upload/) upload function of uploader controller. The controller is here https://github.com/vishwakarma09/bimpra.tk/blob/master/application/controllers/Uploader.php

So, the final code to resize image is :

// Resizing parameters $resizeParams = array ( 'source_image' => $result['full_path'], 'new_image' => $result['full_path'], 'width' => $conf['max_width'], 'height' => $conf['max_height'] );

            // Load resize library
            $this->load->library('image_lib', $resizeParams);

            // Do resize
            $this->image_lib->resize();
RanaZubair commented 8 years ago

Thank for reply... @vishwakarma09 . Where should i paste this code snippet? i think bimpra.tk is another repository?

vishwakarma09 commented 8 years ago

Yes, that is a repository mirror of live. You can use any upload script and do resize using any of php functions. What is important is how you pass back upload information to jbimages. Check that the upload finally loads view that updates parent tinymce with upload information.

https://github.com/vishwakarma09/bimpra.tk/blob/master/application/views/ajax_upload_result.php

RanaZubair commented 8 years ago

@vishwakarma09 i downloaded the bimra but there is no db file in your repository where is the db file???

vishwakarma09 commented 8 years ago

I am uploading now

On Tue, Mar 15, 2016 at 10:46 AM, RanaZubair notifications@github.com wrote:

@vishwakarma09 https://github.com/vishwakarma09 i downloaded the bimra but there is no db file in your repository where is the db file???

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/vikdiesel/justboil.me/issues/13#issuecomment-196665351

Regards,

Sandeep Kumar vishwakarma09.github.io

vishwakarma09 commented 8 years ago

Man there is sql dump in root https://github.com/vishwakarma09/bimpra.tk/blob/master/bimpra.sql

bimpra.tk domain is expired, you can access directly by adding this vhost entry

52.33.136.205 bimpra.tk

On Tue, Mar 15, 2016 at 10:57 AM, sandeep kumar kkumar.sandeep89@gmail.com wrote:

I am uploading now

On Tue, Mar 15, 2016 at 10:46 AM, RanaZubair notifications@github.com wrote:

@vishwakarma09 https://github.com/vishwakarma09 i downloaded the bimra but there is no db file in your repository where is the db file???

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/vikdiesel/justboil.me/issues/13#issuecomment-196665351

Regards,

Sandeep Kumar vishwakarma09.github.io

Regards,

Sandeep Kumar vishwakarma09.github.io

RanaZubair commented 8 years ago

i am running it on localhost and change the base url to my local site its working fine. But where is the admin of the admin domain and what about the password encryption is it in md5 of password_hash function? please clearify?

vishwakarma09 commented 8 years ago

the admin is at http://bimpra.tk/administrator

passwords are md5 hashed, you can see that in login contoller bimpra.tk \application\controllers\administrator\Login.php

On Tue, Mar 15, 2016 at 12:11 PM, RanaZubair notifications@github.com wrote:

i am running it on localhost and change the base url to my local site its working fine. But where is the admin of the admin domain and what about the password encryption is it in md5 of password_hash function? please clearify?

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/vikdiesel/justboil.me/issues/13#issuecomment-196685277

Regards,

Sandeep Kumar vishwakarma09.github.io

Oliv- commented 8 years ago

@vishwakarma09 : no other plugin. My portrait images are display in landscape.

kressly commented 8 years ago

assuming i do my upload on my own and have a file name $image_url. How do i pass that variable to jusboil.me so that it may insert it into tinymce for me ?