10 years ago
5
Topic

Hi
First let me say that this plugin is a great addition to Seblod. Many things that were unfeasible just with the standard plugins can be very easily achieved with a BEFORE render or JS code!! With this plugin SEBLOD is even more powerful. You really can take control of Joomla!

My only concern is whether the AFTER and Before store methods are functional since I see no effect.

I didn't try to add a custom PHP file just the 'free' option where we can add php code.
For example any action on $fields[]->value has to effect.

may be there is some plugin order or an external setting to set so that these methods can work ?
thanks
cyril

Get a VIP membership
10 years ago
3
Level 1

Hello cyril,


for beforestore, if you want to modify a value which will be store, you must also modify the variable $config['storages'], for the good table on the good field. this variable contain all storages that will be perform.


For Afterstore, nothing else happen, so it's just for you, if you want to make some tasks like modify an other table manually, create some file, send email, ....


Regards.

Lionel

35 Posts
julien
10 years ago
2
Level 2
Hello Lionel,

First, congratulation for your CCK.
When you say "you must also modify the variable $config['storage'] for the good table on the good field.", can i do it with the admin interface of joomla in the part "stockage". I tried Standart, Json, free, nothing works. I can't modify a field with my php script for beforestore. Can you explain me please?

Cordially

Jul
10 years ago
1
Level 3
Hello
no, it's just in the code field itself.
if you only set the values of any field in the form without setting the $config array, values won't be updated.

For example if you want to modify the value of myField in your form, use a Before Storage code field.
To know where you should store the value in the $config array just write:
var_dump($config);die();
in your code
reload the page and press CTRL-U (to have a better and cleaner layout of the result).
then you will have to find the string of your variable . it will give you the right path to put in your code after the $config array

Cyril

35 Posts
julien
10 years ago
0
Level 4
Thanks cyril, i see the way with this manip.

I'm very newbie in php but i have some knowledge in C; So i understand array inside array like matrix.

So to newbies like me:
I have a form called "entreprise" and a field "adresse" inside site view.
In my field CodebeforeStore i put this php program to change the value of field adresse before store my content entreprise:


$config['storages']['#__cck_store_form_entreprise']['adresse']='the value i want!';

Jul.
10 years ago
0
Level 1

Hi Lionel

Thanks for this important answer! 

Cyril

Get a Book for SEBLOD