fonction import

More
13 years 3 months ago #29831 by tonnick
Replied by tonnick on topic fonction import
well I'm not speaking at all about description field of about record separators. So I don't know why you are speaking about it.

maybe the best way, as you said as you didn't test would be :

try to import a csv file without separator at the begining of each item >> for me it does not work

try to import a csv file using other separator than ~~ >> for me it does not work

Your exemple :

title ~~ text ~~ textfield3 ~~ emailfield6 ~~ weblinkfld8 ~~ single_value_field22 ~~ multi_value_field24
~~ title 1 ~~ description 1 ~~ textfield3 value ~~ [-email-]=usera@somedomain.com!![-text-]=usera ~~ www.somedomaina.com ~~ f22_valuea ~~ f24_value01%%f24_value02%%f24_value03

so try to import

title ; text ; textfield3 ; emailfield6 ; weblinkfld8 ; single_value_field22 ; multi_value_field24
title 1 ; description 1 ; textfield3 value ; [-email-]=usera@somedomain.com!![-text-]=usera ; www.somedomaina.com ; f22_valuea ; f24_value01%%f24_value02%%f24_value03

can you ?

thx

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #29835 by ggppdk
Replied by ggppdk on topic fonction import
ok, i have tested the parsing and it works with field separator ; and with record separator \n

in r1526 i have added
-- 1. extra parameters and
-- 2. also more debugging help,
so that people can debug it themselves:

if want to try them now (it should work, (but items.php file may have changes to other features not appropriate to your version) , so from it GET ONLY importcsv() function)

administrator/components/com_flexicontent/controllers/items.php

administrator/components/com_flexicontent/views/import/tmpl/import.php

administrator/components/com_flexicontent/views/import/view.html.php


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #29837 by tonnick
Replied by tonnick on topic fonction import
ok just to be sure, In the exemple you provide, there is no \n

then could you provide the csv used in order to parse, maybe there is some difference somewhere

thx in advance

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #29838 by ggppdk
Replied by ggppdk on topic fonction import
what do you mean there is no \n ???

\n is the newline character like \t is the unprintable horizontal tab character


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #29840 by ggppdk
Replied by ggppdk on topic fonction import
Usually "normal" csv files have \n (new line) for record separator and \t (tab) or ; or , for column separator,

our CSV parameters give you full flexibility to use custom (even multi-character) separators


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #29842 by tonnick
Replied by tonnick on topic fonction import
well here is the exemple on flexicontent


CSV example Format:
title ~~ text ~~ textfield3 ~~ emailfield6 ~~ weblinkfld8 ~~ single_value_field22 ~~ multi_value_field24
~~ title 1 ~~ description 1 ~~ textfield3 value ~~ [-email-]=usera@somedomain.com!![-text-]=usera ~~ www.somedomaina.com ~~ f22_valuea ~~ f24_value01%%f24_value02%%f24_value03
~~ title 2 ~~ description 2 ~~ textfield3 value ~~ [-email-]=userb@somedomain.com!![-text-]=userb ~~ www.somedomainb.com ~~ f22_valuea ~~ f24_value04%%f24_value05%%f24_value06
~~ title 3 ~~ description 3 ~~ textfield3 value ~~ [-email-]=userc@somedomain.com!![-text-]=userc ~~ www.somedomainc.com ~~ f22_valuea ~~ f24_value07%%f24_value08%%f24_value09
~~ title 4 ~~ description 4 ~~ textfield3 value ~~ userd@somedomain.com ~~ [-addr-]=www.somedomaind.com!![-text-]=somedomainD ~~ f22_valuea ~~ f24_value10%%f24_value11%%f24_value12
~~ title 5 ~~ description 5 ~~ textfield3 value ~~ usere@somedomain.com ~~ [-addr-]=www.somedomaine.com!![-text-]=somedomainE ~~ f22_valuea ~~ f24_value13%%f24_value14%%f24_value15

I don't see any /n

And anyway, if I use same syntax, it works, but it I don't put ~~ before each title item it does not work. for exemple :

title ~~ text ~~ textfield3 ~~ emailfield6 ~~ weblinkfld8 ~~ single_value_field22 ~~ multi_value_field24
title 1 ~~ description 1 ~~ textfield3 value ~~ [-email-]=usera@somedomain.com!![-text-]=usera ~~ www.somedomaina.com ~~ f22_valuea ~~ f24_value01%%f24_value02%%f24_value03
title 2 ~~ description 2 ~~ textfield3 value ~~ [-email-]=userb@somedomain.com!![-text-]=userb ~~ www.somedomainb.com ~~ f22_valuea ~~ f24_value04%%f24_value05%%f24_value06
title 3 ~~ description 3 ~~ textfield3 value ~~ [-email-]=userc@somedomain.com!![-text-]=userc ~~ www.somedomainc.com ~~ f22_valuea ~~ f24_value07%%f24_value08%%f24_value09
title 4 ~~ description 4 ~~ textfield3 value ~~ userd@somedomain.com ~~ [-addr-]=www.somedomaind.com!![-text-]=somedomainD ~~ f22_valuea ~~ f24_value10%%f24_value11%%f24_value12
title 5 ~~ description 5 ~~ textfield3 value ~~ usere@somedomain.com ~~ [-addr-]=www.somedomaine.com!![-text-]=somedomainE ~~ f22_valuea ~~ f24_value13%%f24_value14%%f24_value15

is NOT working


This why I opened this topic, to be simple, can we make it work on that way ?!

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #29846 by ggppdk
Replied by ggppdk on topic fonction import
\n
\t
etc are special characters
e.g. when there is line change it is the character \n (unix) or \r\n (windows)

i have tested parsing and it works with any separator not appearing inside the data, and i have taken time to add more parameters and debugging help in the files i provided, if you want you can use them now, or wait for a complete build, but there is nο bug in the import procedure


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #29847 by tonnick
Replied by tonnick on topic fonction import
ok then I'll try this new version and will try to import once again the second block.

thx for your support !

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #29849 by ggppdk
Replied by ggppdk on topic fonction import

ggppdk wrote: \n
\t
etc are special characters

these characters will never appear as \n or as \t inside your file, for \n you will see a line change and for \t 1 to 8 spaces


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #29853 by tonnick
Replied by tonnick on topic fonction import
well, to be honest I don't know why you persist on \n and \t. this is not the point.

my question was simple.

is you create for exemple, a table with excell and registered as CSV with ; raws separators and " item separators, and then edit with notedap :

"title1";"title2";"title3";"title4"
"content1";"content2";"content3";"content4"

there is no \n, no \t etc....

I couldn't import it

then to use system as you show it, I replaced ; by ~~

"title1"~~"title2"~~"title3"~~"title4
"content1"~~"content2"~~"content3"~~"content4"

it did not work neither

then I added at the begining of segon line ~~ as you put it

"title1"~~"title2"~~"title3"~~"title4
~~"content1"~~"content2"~~"content3"~~"content4"

and it works.

So, as you made moficiations, I hope with new version, I will be able to import directly file like

"title1";"title2";"title3";"title4"
"content1";"content2";"content3";"content4"

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Save