Note the upgraded forum! If you are experiencing issues logging in, you may need to reset your password which should send an email. If the email doesn't arrive, be sure to check your spam folder just in case.

Grocery Crud

Hi everyone,
is anyone using Grocery/Image Crud within a custom module in Fuel?
I'm trying to implement a custom module with image Crud but I have no luck... Are the 2 things compatible each other? They should be since Fuel is based on CI and Grocery Crud!

Thanks in advance

Comments

  • edited 1:40AM
    I have not used it but it looks pretty nice. In general, it sounds like you are probably wanting to know what areas you can extend FUEL. In your case, you may want to look into ways to extend FUEL to integrate it. Maybe a little explanation of what you are trying to do may help steer you in the right direction (e.g. are you storing the photo names in a database or does it need to be part of an image field in a model?).
  • edited 1:40AM
    Thanks for your answer. What I am trying to do is extending fuel with modules that it doesn't have native, such as an image gallery, or a feature photo for a page. What I understood from the guide is that it's not suggested to extend/change existing modules because of the upgrades... that then wouldn't be compatible.
    Also, I'm having some difficulties with the frontend part: once I've set everything up in my backend, how do I pull the data out of the database and show it in my pages? Do I have to create models for that or I have some methods and objects that I can use?
  • edited 1:40AM
    I would recommend creating an advanced module to hold all the models, views controllers, etc needed to run Crud. You can think of an advanced module as another "application" directory:
    http://docs.getfuelcms.com/modules/advanced

    The following will create a folder under fuel/modules/crud:
    php index.php fuel/generate/advanced crud

    If you wind up needing to create a table that needs to be directly managed by FUEL (a simple module), you can create a simple module by running the following which will create a table called crud_gallery and a corresponding crud_gallery_model in the fuel/modules/crud/models/ folder:
    php index.php fuel/generate/simple crud_gallery crud

    You can check out some other advanced modules found under our GitHub page as exemples:
    https://github.com/daylightstudio?tab=repositories
  • edited 1:40AM
    Ok. I've created the new module, set up everything and apparently everything is up 'n' running. I'm having javascript issues among the 2 things (grocery crud and fuel).
    When I render the page where the CRUD is using $this->fuel->admin->render() I have jquery-ui conflicts. Otherwise if I just try with $this->load->view() it works...
    I think it's going to be hard to integrate Grocery Crud and FUEL together...
  • edited 1:40AM
    To debug the javascript issue, it may be best to use the non-minified version. If you look at the fuel/modules/fuel/config/fuel.php file, you'll see a $config['fuel_javascript'] with a comment out array of javascript files. If you uncomment those out and comment out the 'fuel' => 'fuel/fuel.min', you can play around with various javascript files individually. Additionally if you want to do this outside of the main fuel.php config file, you can copy the contents of $config['fuel_javascript'] and replicate them in the fuel/application/config/MY_fuel.php file which simply overwrites any values in the main fuel.php config file.
Sign In or Register to comment.