⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Watermark whith Image Crud and Codeigniter



Gracekweb
  • profile picture
  • Member

Posted 16 May 2015 - 13:27 PM

Hi guys ... I am new to the forum and are a beginner in the development with codeigniter and image crud ... I'm using for the creation of gallery ... but I need to use the watermark in each photo with image crud ... provides this possibility ?

Thanks in advance and congratulations for the forum full of information
 

sorry for my poor english

 

this is my code

 

function photogalleryshow()
	{  
            
            if (!$this->ion_auth->logged_in())
		{
			//redirect them to the login page
			redirect('auth/login', 'refresh');
		}
		elseif (!$this->ion_auth->is_admin()) //remove this elseif if you want to enable this for non-admins
		{
			//redirect them to the home page because they must be an administrator to view this
			return show_error('You must be an administrator to view this page.');
		}
		else
		{
                    
                  $image_crud = new image_CRUD();
	
		$image_crud->set_primary_key_field('id');
		$image_crud->set_url_field('url');
		$image_crud->set_table('photogallery')
		->set_relation_field('category_id')
		->set_ordering_field('priority')
		->set_image_path('images/photogallery');
			
		$output = $image_crud->render();
	
		$this->_photogallery_output($output);
                }
	}

Gracekweb
  • profile picture
  • Member

Posted 18 May 2015 - 18:55 PM

any suggestions? or my question is stupid ?

 


Amit Shah
  • profile picture
  • Member

Posted 22 May 2015 - 02:30 AM

heres the answer to your query...

http://www.grocerycrud.com/documentation/options_functions/callback_after_upload

 

 

the example gives an ability to resize..

what you can do is attach your watermark code to the same.


Amit Shah
  • profile picture
  • Member

Posted 22 May 2015 - 02:30 AM

heres the answer to your query...

http://www.grocerycrud.com/documentation/options_functions/callback_after_upload

 

 

the example gives an ability to resize..

what you can do is attach your watermark code to the same.