Welcome Guest, Not a member yet? Register   Sign In
v 1.3.3 grocery CRUD - an automatic Codeigniter CRUD
#61

[eluser]ReyPM[/eluser]
Okey fine but what about with showed at first run (when get data from DB)? callback_field (http://www.web-and-development.com/groce...back_field)? Can you post a example of this?
#62

[eluser]web-johnny[/eluser]
[quote author="ReyPM" date="1303762049"]Okey fine but what about with showed at first run (when get data from DB)? callback_field (http://www.web-and-development.com/groce...back_field)? Can you post a example of this?[/quote]

(The callback_field is for both add and edit field).

I have it in the example is : callback_edit_field . You don't need callback_add_field because when you insert a code you don't have to decrypt it because ... its empty ;-).

But if you still wanted you can do it like this:

Code:
$this->grocery_crud->callback_field('usuario',array($this,'username_decrypt'));
    $this->grocery_crud->callback_field('pass',array($this,'password_decrypt'));
The only thing you will change is the below code , because the add field is empty :
Code:
function username_decrypt($value = '' /* Just insert this line */)
{
    $enc = new EncryptDecrypt();
$value = $enc->Decrypt($value);
    return '<input type="text" maxlength="50" value="'.$value.'" name="usuario" style="width:462px">';
}

function password_decrypt($value = '' /* Just insert this line */)
{
    $enc = new EncryptDecrypt();
$value = $enc->Decrypt($value);
    return '<input type="text" maxlength="50" value="'.$value.'" name="pass" style="width:462px">';
}
#63

[eluser]ReyPM[/eluser]
I mean in this screen http://www.dropmocks.com/mUUyg notice the encrypted at Usuario column this is what I'm need to show unencrypted. How?
#64

[eluser]web-johnny[/eluser]
[quote author="ReyPM" date="1303762838"]I mean in this screen http://www.dropmocks.com/mUUyg notice the encrypted at Usuario column this is what I'm need to show unencrypted. How?[/quote] This is the callback_column and its at : http://www.web-and-development.com/groce...ack_column . I have an example there to unserstand.
#65

[eluser]ReyPM[/eluser]
Thanks a lot it works perfectly. Now I have another question: How I can change default language from English to Spanish? Or better maintain two different files: one for Spanish and the other for English and relies the selection in config.php language key?
#66

[eluser]web-johnny[/eluser]
[quote author="ReyPM" date="1303763374"]Thanks a lot it works perfectly. Now I have another question: How I can change default language from English to Spanish? Or better maintain two different files: one for Spanish and the other for English and relies the selection in config.php language key?[/quote]
I still don't support multi-languages. Is only English for now on. You can view my future plans to the url : http://www.web-and-development.com/groce...e_features
#67

[eluser]ReyPM[/eluser]
Ups I can't use this then because I need this to be in spanish Sad
#68

[eluser]web-johnny[/eluser]
[quote author="ReyPM" date="1303835975"]Ups I can't use this then because I need this to be in spanish Sad[/quote]

You can simply go the the grocery CRUD library and change the default messages to spanish. It will be quite easy I think . Try it , till I make it like "multilingual"
#69

[eluser]web-johnny[/eluser]
ReyPM I think I misunderstood what do you mean. The multilangual for you frontend it is supported in CRUD. You can simply add a language id to your table and set a relation to a table that you named it for example: "languages". Hope it helps
#70

[eluser]tieungao[/eluser]
hi web-johny,

When u done the future features of grocery?




Theme © iAndrew 2016 - Forum software by © MyBB