Beispiel #1
0
 public function __construct()
 {
     parent::Controller();
     $this->load->library('image_lib');
     $this->load->library('session');
     $this->load->library('tinycimm');
     $this->load->library('tinycimm_image');
     $this->load->library('tinycimm_media');
     $this->load->model('tinycimm_model');
     $this->load->config('tinycimm');
     $this->load->helper('url');
     TinyCIMM::check_paths();
     // add your user auth check here to secure tinycimm
     // eg $this->auth->is_logged_in() or die('Access denied.');
 }
Beispiel #2
0
 public function get_folders_html()
 {
     parent::get_folders_html('media');
 }
Beispiel #3
0
 /**
  * resizes an image
  **/
 public function save_image_size($image_id, $width, $height, $quality = 90, $update = true)
 {
     $ci =& get_instance();
     if (!(int) $width or !(int) $height) {
         TinyCIMM::response_encode(array('outcome' => false, 'message' => 'Incorrect dimensions supplied. (Cant have value of 0)'));
     }
     $response = $this->resize_asset($ci->tinycimm_model->get_asset($image_id), $width, $height, $quality, true, $update);
     $response->outcome = true;
     $response->message = 'Image size successfully saved.';
     $this->response_encode($response);
 }