⚠ 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. ⚠


goFrendiAsgard

Member Since 11 Nov 2011
Offline Last Active Jan 28 2014 08:33 AM
-----

#9909 what is the effect of hmvc on grocerycrud?

Posted goFrendiAsgard on 03 November 2013 - 11:11 PM

- Are there grocerycrud functions that would not work properly with hmvc installed?

Yes, there are. As you mention, callback on set_rules() function. This is related to CodeIgniter form_validation class. You can apply this: http://www.mahbubblo...in-codeigniter/ or http://www.grocerycr...tion/#entry3020. However you will need to rewrite some of your existing code.

Or you might also want to try this solution (I apply it to No-CMS and it is work):

  1. Add this file: https://github.com/g..._validation.php and this file: https://github.com/g...rocery_CRUD.php

     

  2. Make a MY_Controller.php in /application/core, and put this:
class MY_Controller extends MX_Controller{
    public function __construct__(){
        $this->load->library('form_validation');
        $this->form_validation->CI =& $this;
        $this->load->library('Extended_Grocery_CRUD');
        // resolve HMVC set rule callback problem
        $crud->form_validation = $this->form_validation;
    }
}
Now, you can just relax. and do this in your function: $crud = $this->crud;

 

- What are some things we should remember to do or not do when we use codeigniter/hmvc/grocercrud?
Just as my answer for your first question.
 

- Does grocerycrud work better and faster with hmvc libraries installed in codeigniter?
No, it is a bit slower since HMVC not only check "application" directory, but also everything in "modules" directory. But not that slow...




#9758 Bug in the search

Posted goFrendiAsgard on 15 October 2013 - 06:58 AM

Amit Shah Great job. Because of your code, I don't need to spend hours to solve this




#8118 Problem inserting and updating datetime with callbacks

Posted goFrendiAsgard on 22 June 2013 - 04:49 PM

Hi, Carloco.
Sorry, I don't really get your point. You have tbl_resultados and once you insert something to it, you call a procedure to insert something to it again.

What do you intend to do?

 

I'm not sure if I can help, but I think the problem laid on php & mysql different date format.

MySQL use 'yyyy-mm-dd'. So how about change your code a bit:

function _updateResultado($post,$pk) {
        if(($post['res_equ_local'] == $post['res_equ_visit'])) {
            //$this->lib_utils->mensaje('Error al actualizar');
            return false;
        }
        else {
            $sp = "CALL sp_update_resultado(?,?,?,?,?,?,?,?,?,?)";
            return $this->db->query($sp,array(
                                          'res_id' => $pk,
                                          'res_num_fecha' => $post['res_num_fecha'],
                                          'res_equ_local' => $post['res_equ_local'],
                                          'res_equ_visit' => $post['res_equ_visit'],
                                          'res_gol_local' => $post['res_gol_local'],
                                          'res_gol_visit' => $post['res_gol_visit'],
                                          'res_fecha' => date('Y-m-d H:i:s', strtotime(str_replace('-', '/', ;$post['res_fecha']))),
                                          'res_estadio' => $post['res_estadio'],
                                          'res_estado' => $post['res_estado'],
                                          'res_incidencias' => $post['res_incidencias']));
        }
    }



#8058 Praise for Grocery Crud

Posted goFrendiAsgard on 19 June 2013 - 09:24 AM

It is a rare to see a "pure praise" topic. But at least I've see one :)




#8046 Add function

Posted goFrendiAsgard on 18 June 2013 - 02:21 PM

Okay Robert
Is this what you want?
Selection_031.jpegJust add this CSS:

.form-field-box{
    float:left;
    display:block;
    width:45%;
}
.pDiv{
    width:100%;
}

and it is.

 

Here is the complete view code:

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8" />
<?php
foreach($css_files as $file): ?>
	<link type="text/css" rel="stylesheet" href="<?php echo $file; ?>" />
<?php endforeach; ?>
<?php foreach($js_files as $file): ?>
	<script src="<?php echo $file; ?>"></script>
<?php endforeach; ?>
<style type='text/css'>
body
{
	font-family: Arial;
	font-size: 14px;
}
a {
    color: blue;
    text-decoration: none;
    font-size: 14px;
}
a:hover
{
	text-decoration: underline;
}

.form-field-box{
    float:left;
    display:block;
    width:45%;
}
.pDiv{
    width:100%;
}
</style>
</head>
<body>
	<div>
		<a href='<?php echo site_url('examples/customers_management')?>'>Customers</a> |
		<a href='<?php echo site_url('examples/orders_management')?>'>Orders</a> |
		<a href='<?php echo site_url('examples/products_management')?>'>Products</a> |
		<a href='<?php echo site_url('examples/offices_management')?>'>Offices</a> |
		<a href='<?php echo site_url('examples/employees_management')?>'>Employees</a> |
		<a href='<?php echo site_url('examples/film_management')?>'>Films</a> |
		<a href='<?php echo site_url('examples/film_management_twitter_bootstrap')?>'>Films (Twitter Bootstrap Theme)</a> |
		<a href='<?php echo site_url('examples/multigrids')?>'>Multigrid</a>

	</div>
	<div style='height:20px;'></div>
    <div>
		<?php echo $output; ?>
    </div>
</body>
</html>




#8044 Grocery CRUD with Pyrocms Add-Ons

Posted goFrendiAsgard on 18 June 2013 - 10:39 AM

PyroCMS is not using stable CodeIgniter. They use CodeIgniter 3.0 dev.
Therefore, the standard groceryCRUD won't work. There is a bit incompatibility between CI 3.0 and groceryCRUD 1.3.3.

It has been a long time since I don't play around with pyrocms.

A bit hint: PyroCMS has different directory structure. If you want to put grocery CRUD on it, put it on /system/cms

 

 

Look at this: https://github.com/s...y-crud/pull/194 . Personally I also need sometime to convert my project into CI 3.0 dev :rolleyes: .

 

 

If you want to build project from scratch, maybe you can take a look on http://www.getnocms.com (disclaimer: I'm the creator).




#7989 Add function

Posted goFrendiAsgard on 16 June 2013 - 12:18 AM

Robert

Okay. Let's have a short css lesson course  :)

In groceryCRUD, your input will be looks like this


<div class="form-field-box odd" id="group_name_field_box">
<div class="form-display-as-box" id="group_name_display_as_box">
Group<span class="required">*</span>  :
</div>
<div class="form-input-box" id="group_name_input_box">
<input id="field-group_name" name="group_name" type="text" value="Admin" maxlength="45"> </div>
<div class="clear"></div> 
</div>

You might be surprised, but yes. groceryCRUD has some "magical" function to write those html.

 

Any html tag can has id or class. This one:

<div class="form-field-box odd" id="group_name_field_box"></div>

has 2 classes (form-field-box and odd) and an id (group_name_field_box).

 

To do some magic with css, we need to know the id or the class of our tags.

The # symbol can be used to refer id, and the .  (dot) symbol can be used to refer class.

So if you want to make an html tag with form-field-box have 150px width, you can add this to your view:

<style type="text/css">
.form-field-box{
    width:150px;
    
}
</style>

And this is probably what you really want:

<style type="text/css">
.form-field-box{
    width:40%;
    display:block;
‚Äč    float:left    
}
</style>

There are plenty resources in the internet to learn css & javascript. It is really useful to know both.
One of my first-time-learning resource is http://w3schools.com/css/default.asp

 

 

 

 




#7981 GroceryCRUD with Various Database Support.

Posted goFrendiAsgard on 15 June 2013 - 12:57 PM

You might probably right with "instability" issue.

But PDO drive in CodeIgniter 2.1.3 is "hopeless".
Doing "$this->db->field_data();" with PDO driver will always produce an error.
But CodeIgniter 3.0 seems to have a "stable enough" PDO support (with the same API).

Right now I'm working with CodeIgniter 3.0 and groceryCRUD 1.3.3.
So far, there is no problem (I use PDO driver to connect to MySQL database). So, what I need to do is repair some query so that it is also works for generic database. I'll post the fork link (maybe tomorrow) 




#7938 owner permissions

Posted goFrendiAsgard on 13 June 2013 - 07:33 AM

For the first question, you might use http://www.grocerycr...functions/where

And as davidoster said, no groceryCRUD is just about CRUD, there is no login module.




#7520 using tinymce with grocery crud

Posted goFrendiAsgard on 19 May 2013 - 05:54 AM

Inderpreet Singh: I believe davidoster has answer your question here: http://www.grocerycr...itor/#entry5542

Go to application/config/grocery_crud.php and modify this

//You can choose 'ckeditor','tinymce' or 'markitup'
$config['grocery_crud_default_text_editor'] = 'tinymce';
//You can choose 'minimal' or 'full'
$config['grocery_crud_text_editor_type'] = 'minimal'; 

heruprambadi: By default groceryCRUD use CKEditor, instead of TinyMCE




#7493 No-CMS Forum

Posted goFrendiAsgard on 17 May 2013 - 08:47 AM

First I want to clarify this:
No-CMS = CodeIgniter + groceryCRUD + some other components + my codes.
So, the problem you have when using No-CMS is sometimes not even related to groceryCRUD, nor it is related to CodeIgniter. Therefore, post your No-CMS specific problem here will sometime make some confusion.

If you think that your problem is groceryCRUD issue, please post it in this forum.
But, if you think that your problem is specific to No-CMS (e.g: user authentication, navigation management, making new widget, themes and modules), it'll be better that you post your problem in No-CMS forum here: http://www.getnocms.com/forum/

 

Thanks :)

 

 




#7455 No-CMS and grocery-CRUD master-detail form

Posted goFrendiAsgard on 16 May 2013 - 08:15 AM

Great,.... thank you davidoster :)




#7452 No-CMS and grocery-CRUD master-detail form

Posted goFrendiAsgard on 16 May 2013 - 08:00 AM

davidoster: I see. Your argument seems to be valid, and I can fully understand what you mean. Right now I can only use github and email. I'll try to make something like ticketing system or another in near future.
Thanks.




#7390 No-CMS and grocery-CRUD master-detail form

Posted goFrendiAsgard on 14 May 2013 - 12:52 AM

I see. My previous post should work well. Just adjust the table and field names.
The key is you must add a "detail one to many" field in productos table




#7198 No-CMS tutorial

Posted goFrendiAsgard on 07 May 2013 - 04:03 AM

Long time not visit this forum. I was (and am still) busy with my thesis.
I've write some tutorial about No-CMS, so that people can get idea about how to use it.
Please visit https://github.com/g...diAsgard/No-CMS

Some new features and bug-fix has been added.
Also, I've get my another paypal activated, so people can support by send little donation ;)