CodeIgniter Forums
grocerycrud on practice - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: grocerycrud on practice (/showthread.php?tid=65425)

Pages: 1 2


grocerycrud on practice - davy_yg - 06-10-2016

I try to utillize:

http://www.grocerycrud.com/image-crud/documentation

and I receive this error:

http://127.0.0.1/CompanyProfileCI/index.php/cpages/slideshowimages


-------------------------------------

Fatal error: Call to undefined method Cpages::_example_output() in C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyProfileCI\application\controllers\cpages.php on line 116
A PHP Error was encountered
Severity: Error
Message: Call to undefined method Cpages::_example_output()
Filename: controllers/cpages.php
Line Number: 116
Backtrace:


controllers/cpages.php



PHP Code:
    public function slideshowimages() 
    
        { 
 
    
        $image_crud 
= new image_CRUD();
    
        
$image_crud->set_primary_key_field('id');
        
$image_crud->set_url_field('url');
        
$image_crud->set_title_field('title');
        
$image_crud->set_table('example_4')
        ->
set_ordering_field('priority')
        ->
set_image_path('assets/uploads');
            
        
$output $image_crud->render();
    
        
$this->_example_output($output);
    
        
$this->load->view('slideshow_images'); 
    
        } 


How to fix the error?


RE: grocerycrud on practice - ciadmin - 06-10-2016

If you are using CI 3.0.6, controller filenames have to be UCfirst, i.e. Cpages.php
http://www.codeigniter.com/user_guide/general/controllers.html#let-s-try-it-hello-world

If you are just copying some GroceryCRUD stuff into your app, it is written for an older version of CI.


RE: grocerycrud on practice - davy_yg - 06-10-2016

How to make it works? Will it be compatible with the newer version?


I still get this error message:

Fatal error: Call to undefined method Cpages::_example_output() in C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyProfileCI\application\controllers\Cpages.php on line 116
A PHP Error was encountered
Severity: Error
Message: Call to undefined method Cpages::_example_output()
Filename: controllers/Cpages.php
Line Number: 116
Backtrace:

controllers/Cpages.php


RE: grocerycrud on practice - InsiteFX - 06-10-2016

It works, I guess you did not read the documentation by looking at your code.


RE: grocerycrud on practice - davy_yg - 06-11-2016

I cannot tell which documentation CI or imageCRUD?

http://www.grocerycrud.com/image-crud/documentation?

I cannot tell what is lack?


RE: grocerycrud on practice - InsiteFX - 06-11-2016

Well gee what are you talking about it's not CI is it.


RE: grocerycrud on practice - davy_yg - 06-11-2016

It is CI. I think the gallery is CI image CRUD.


RE: grocerycrud on practice - ciadmin - 06-11-2016

GroceryCRUD and ImageCRUD are *not* part of CI -- those are addins.


RE: grocerycrud on practice - davy_yg - 06-12-2016

Are you serious? Check this out: http://www.grocerycrud.com/

Why it mentions the best CRUD for CI?


RE: grocerycrud on practice - ciadmin - 06-12-2016

(06-12-2016, 03:09 AM)davy_yg Wrote: Are you serious?  Check this out:  http://www.grocerycrud.com/

Why it mentions the best CRUD for CI?

I am serious.

The developers of GroceryCRUD *claim* it is the best CRUD for CodeIgniter - they do not claim it *is* CodeIgniter.