ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

v 1.3.3 grocery CRUD - an automatic Codeigniter CRUD

April 11, 2011 3:24am

Subscribe [77]
  • #241 / Dec 10, 2011 11:30am

    Tanver

    29 posts

    I have read somewhere in this thread about grocery_crud template .. templates/custom_cms/template.php .. but am unable to find a path where I can download it. I am keen on testing this or a similar template which lets me have different sections like header, menubar, breadcrumb, sidebar and footer. I will appreciate if anyone from the community can help me find something like this which is easy to implement with grocery_crud and CI.
    TIA

  • #242 / Dec 10, 2011 11:37am

    web-johnny

    235 posts

    I have read somewhere in this thread about grocery_crud template .. templates/custom_cms/template.php .. but am unable to find a path where I can download it. I am keen on testing this or a similar template which lets me have different sections like header, menubar, breadcrumb, sidebar and footer. I will appreciate if anyone from the community can help me find something like this which is easy to implement with grocery_crud and CI.
    TIA

    Template controller does not exist anymore to grocery CRUD since version 1.1 . You can find this one to older versions of grocery CRUD but it’s totally different from the CRUD. You can use the phil sturgeon template controller http://philsturgeon.co.uk/demos/codeigniter-template/user_guide/ or whatever controller you like. Template controller MUST be in a different place of the CRUD.

  • #243 / Dec 10, 2011 9:35pm

    rtan

    5 posts

    Hi,

    I would like to congratulate and thank you for such good CRUD.
    I am been playing around with php/ci for a while and your library is the best one I have found and used it in a few of my projects.

    I would like you to kindly advise me regarding adding a footer to the table.
    My present project shows something like annual salary details of an employee and I need to show the total of whole year on bottom of the table.

    I have made a few changes in the following files like:

    In grocery_crud.php
    at class declaration added

    protected $footer   = false;

    at function showList added

    $data->footer    = $this->footer;

    A new function is added in class

    /**
      * sets the footer in the list
      * 
      * @return void
      */
     public function footer($str="")
     {
      $this->footer = $str;  
      return $this;
     }

    added following lines in datatables theme file grocery_crud\themes\datatables\views\list.php

    <?php if($footer)
     echo $footer ?>

    And used these lines to add the footer contents to the table by adding

    $this->grocery_crud->footer($this->_gen_income_total_table());

    the above function outputs similar to
    <tfoot><tr><th></th></tr></tfoot>

    This is working fine for me but I wish to know if this is the way to do it.
    I also need some advise in how to handle bulky data in your crud.

    Thanks again.

    Regards.

  • #244 / Dec 11, 2011 6:19am

    web-johnny

    235 posts

    Hi,

    I would like to congratulate and thank you for such good CRUD.
    I am been playing around with php/ci for a while and your library is the best one I have found and used it in a few of my projects.

    I would like you to kindly advise me regarding adding a footer to the table.
    My present project shows something like annual salary details of an employee and I need to show the total of whole year on bottom of the table.

    I have made a few changes in the following files like:

    In grocery_crud.php
    at class declaration added

    protected $footer   = false;

    at function showList added

    $data->footer    = $this->footer;

    A new function is added in class

    /**
      * sets the footer in the list
      * 
      * @return void
      */
     public function footer($str="")
     {
      $this->footer = $str;  
      return $this;
     }

    added following lines in datatables theme file grocery_crud\themes\datatables\views\list.php

    <?php if($footer)
     echo $footer ?>

    And used these lines to add the footer contents to the table by adding

    $this->grocery_crud->footer($this->_gen_income_total_table());

    the above function outputs similar to
    <tfoot><tr><th></th></tr></tfoot>

    This is working fine for me but I wish to know if this is the way to do it.
    I also need some advise in how to handle bulky data in your crud.

    Thanks again.

    Regards.

    For now there is not another way to do it for your footer.

    If I understood the declaration of “bulky data”, bulky data is already handle in grocery CRUD 😉 . Actually there are two themes for now. There is datatables and flexigrid. Datatables is on client side so there are all the data rendering one only time. And there is flexigrid that is server side scripting that you can handle bulky data.  You can see an example of 1000 items at http://www.grocerycrud.com/examples/index.php/examples/film_management with 2 relations n-n . It’s a quite quick query for so many rows. You can also handle as many data as you like. All the request in flexigrid is ajax request so you will not have any problem with this.

  • #245 / Dec 20, 2011 9:02pm

    Liu Guoqing

    13 posts

    It’bad ! AO no!!

  • #246 / Dec 20, 2011 10:40pm

    thedarkside

    1 posts

    hi,
    thank you for the grocery crud, but i try to get it work for postgresql, its not compatible right? since the model uses lot of mysql command.

    regards

  • #247 / Dec 21, 2011 2:23am

    web-johnny

    235 posts

    hi,
    thank you for the grocery crud, but i try to get it work for postgresql, its not compatible right? since the model uses lot of mysql command.

    regards

    http://www.grocerycrud.com/forums/topic/50-postgresql-and-grocery-crud/page__view__findpost__p__148

  • #248 / Dec 23, 2011 1:31am

    jackoon

    4 posts

    Hi,

    May i know how to change the height and width of the tinymce?

    Thanks.

  • #249 / Dec 23, 2011 1:48am

    web-johnny

    235 posts

    Hi,

    May i know how to change the height and width of the tinymce?

    Thanks.

    You can go to assets/grocery_crud/js/jquery_plugins/config/jquery.tine_mce.config.js and change the configuration of tinymce there.

    With a quick google search I found that the parameter is height (  http://www.tinymce.com/wiki.php/Configuration:height ) and ... width ( http://www.tinymce.com/wiki.php/Configuration:width )

  • #250 / Dec 23, 2011 3:04am

    jackoon

    4 posts

    anyone here customize GroceryCRUD to be able to upload photos to server and store the path in the db?

    Thanks.

  • #251 / Dec 23, 2011 3:21am

    web-johnny

    235 posts

  • #252 / Dec 27, 2011 10:57pm

    jackoon

    4 posts

    i had tried the customization.
    it work greats

    thanks @web-johnny

  • #253 / Dec 28, 2011 9:18am

    Attrox

    2 posts

    Hi,

    I need help with my grocery CRUD application.

    http://domain-name/secret-link/manufacturer/index is working correctly to display my Manufacturer table in a grid.

    Clicking the edit link brought me correctly to http://domain-name/secret-link/manufacturer/index/edit/1 with the right information filled in.

    But for some reason if I hit update, it’s not saving at all and there’s no error message.

    I checked http://domain-name/secret-link/manufacturer/index/update/1 and I get Internal Server Error 500.

    All the examples does not mentioned the need for me to create an update function to update the database so I am assuming I have something wrong with my configuration?

    PS: All my database fields are texts except the MFGID INT(6) PRIMARY KEY NOT NULL AUTO_INCREMENT and UpdateDateTime TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP. Not sure if this default TIMESTAMP is causing problem or not?

    Please help.

    Thank you.

    Attrox

  • #254 / Dec 29, 2011 4:28am

    Attrox

    2 posts

    Never mind, I found the problem.

    Jquery failed all the post due to CSRF protection that is enabled. Need to include the CSRF security string as a hidden input field.

    As a temporary solution I just white list my CRUD script in the config.php to set $config[‘csrf_protection’] = FALSE;

  • #255 / Dec 29, 2011 7:18pm

    web-johnny

    235 posts

    Never mind, I found the problem.

    Jquery failed all the post due to CSRF protection that is enabled. Need to include the CSRF security string as a hidden input field.

    As a temporary solution I just white list my CRUD script in the config.php to set $config[‘csrf_protection’] = FALSE;

    Hello @Attrox and sorry for the delayed answer. Yes this is actually the problem and I already have included to the known issues for grocery crud - http://www.grocerycrud.com/crud/view/known-issues

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases