⚠ 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 forum is read-only and soon will be archived. ⚠


Laurent Nunenthal

Member Since 03 Apr 2016
Offline Last Active Mar 15 2017 01:11 PM
-----

Topics I've Started

Default enum value, bootstrap V4 theme

01 March 2017 - 07:13 AM

Hello,

 

What is the better way to set a default value for an enum field in the add form ?

 

and

 

How to remove the search field in the v4 bootstrap theme for the enum field with a few number of responses ?

 

 

Thank for your help.

 

 


How to debug callback function

20 February 2017 - 03:42 PM

Hello,

 

I'm new in GC, after 3 days of work, I created a little backend which is working, with some ajax function called, image resizing and more. All is working and it's clear than GC is a good piece of code, thank's

 

My problem is that I have a little complicated code which is called by a callback, and there is no error diplayed when it's occurs. So, it's very difficult to debug. What is the best method to get the error message.

 

Thank's for all.


File uploaded can't be deleted

19 February 2017 - 05:39 PM

Hello,the rec

 

I cant upload a file without problem, but when i delete the record in list view the record is deleted but the file stay on the server.

 

I can delete it with php, I test this little script, and this work, so it's seem that is not a server problem.

 

<?php
 
if (unlink ('assets/estimation_image/e0a75-img_4950.jpg'))
{
    echo 'ok';
}
 else 
 {
     echo 'bad';
 }
 ?>
 

The problem is that I have absolutely no error message, what I can doing.

 

Please help.


Best way to insert image and display it.

18 February 2017 - 05:57 PM

Hello,
 
this is a recurent question.
I search how to insert, modify an image.
 
When the file is uploaded, a thumbnail mus be displayed before to submit the form.
A thumbnail must be displayed in the list view.
A thumbnail must be displayed in the modify view too.
 
Just for one file at once.
 
What is the right way ?

 


I'm desperate (error loading library image crud)

05 April 2016 - 01:30 PM

I'm totally new in CI. I installed the library Image_CRUD as I do for GC, and I can load the grocery_CRUD Library, but if I uncomment $this->load->library('image_CRUD') I get this error : Unable to load the requested class: Image_CRUD

and an error 500 if I read the http error. I put all the image Crud files as I did for the GroceryCrud library with is ok.

Any idea ?

 

<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

 
class Main extends CI_Controller {
 
    function __construct()
    {
        parent::__construct();
 
        /* Standard Libraries of codeigniter are required */
        $this->load->database();
        $this->load->helper('url');
        /* ------------------ */ 
 
        $this->load->library('grocery_CRUD');
        //$this->load->library('image_CRUD');
        //$this->load->library('Image_moo');
 
    }
 
    public function index()
    {
        echo "<h1>Welcome to the world of Codeigniter</h1>";//Just an example to ensure that we get into the function
                die();
    }
 
    public function carburant()
    {
        $this->grocery_crud->set_table('carburant');
        
        $output = $this->grocery_crud->render();
 
        $this->_example_output($output);        
    }
 
    function _example_output($output = null)
 
    {
        $this->load->view('our_template.php',$output);    
    }
    
    public function marque()
    {
        $image_crud = new image_CRUD();
 
    $image_crud->set_table('marque');
 
    //If your table have by default the "id" field name as a primary key this line is not required
    $image_crud->set_primary_key_field('id');
 
    $image_crud->set_url_field('path');
    $image_crud->set_image_path('assets/uploads');
 
    $output2 = $image_crud->render();
 
 
        $this->_example2_output($output2);        
    }
 
    function _example2_output($output = null)
 
    {
        $this->load->view('our_template.php',$output);    
    }
}
 
/* End of file main.php */
/* Location: ./application/controllers/main.php */