9 years ago
4
Topic

Hi all

I can't use the seblod importer to fill seblod contents with fieldX and groupX.

Maybe there is something I miss but I don't find how to tell the importer to fill complex fields such as fieldX/GroupX.

For example with resumes, you generally have several job experiences and training/school items. Such items are defined with groupX in the seblod resume. We have CSV files of the resumes but even if the CSV file has each job experience in a separate column (and for each of them separate sub colums), I don't know how we can dispatch each job in each field of the groupX.

FOr instance each job experience could be defined by:

* name of the company you worked in

* start and end dates

* name of your position in this company

* description of what you did there

In the CSV file we could have (if we limit the number of jobs to 3):

company_name1; start_date1;end_date1;position1;description1; company_name2 start_date2;end_date2;position2;description2;company_name3; start_date3;end_date3;position3;description3;

but in the seblod RESUME content type we could have one groupX 'job exeperience' with sub fields (company_name; start_date;end_date;position;description;)

Shold we write our own PHP routine to import such contents or can the seblod importer do the job please?

thanks

cyril

Get a VIP membership
4229 Posts
Kadministrator
9 years ago
2
Level 1

Hi,

  theoretical you can import groupx data, first you need to create groupx field with storage like

Custom-article-fieldname

Then you can import data to this database/colum, as groupx field is just a text, but , of course this data needs to be in Seblod custom format like

<br />::grxdbtest::2::/grxdbtest::<br /><br />::cck_grxdbtest::feild_x_test::/cck_grxdbtest::<br />::user_gender|0|grxdbtest::M::/user_gender|0|grxdbtest::<br />::art_title|0|grxdbtest::a::/art_title|0|grxdbtest::<br />::user_email|0|grxdbtest::a::/user_email|0|grxdbtest::<br />::user_first_name|0|grxdbtest::a::/user_first_name|0|grxdbtest::<br />::class_test_text_field|0|grxdbtest::a::/class_test_text_field|0|grxdbtest::<br />

etc..

You would also need a second form matching your fields and converter to get your data to this custom format. Format is not very complex so this can be done - but unfortunately there is no direct support for it in Seblod importer.

9 years ago
1
Level 2

Thanks for your answer Klas, i understand what you just said, but my question was specifically how do i get the regex who could give me this "not very complex" format ?
I hoped i could get some functions like getGroupXRegex or somethin in these lines, but i just couldn't see any of it in the source code plugins/cck_field/group_x/group_x.php =/

4229 Posts
Kadministrator
9 years ago
0
Level 3

Hi,

you need to look into cck_storage/custom.php and related functions from libraries/cck/content/content.php

9 years ago
0
Level 1

Hi,

Thanks for your answer, to be honest i already looked at these functions in libraries/cck/content/content.php ( getRegex() , getRegex_Field or getRegex_Group ) but when i tried to use it i just can't make it work >__<

I therefore looked for a way to use these functions instead of doing it by hand like i do yet, but i didn't found any simple code using these functions i the purpose to create data before recording these,...

Any help would be greatly appreciated, 

Thank you again

Get a Book for SEBLOD