fonction import

More
12 years 1 month ago #29820 by tonnick
Replied by tonnick on topic fonction import
ok nice ! I'll try it ! thx

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

More
12 years 1 month ago #29821 by ggppdk
Replied by ggppdk on topic fonction import
The next thing to do for import is to add a debug step where the user will be presented with how his/her data will were parsed, and thus how they will be inserted into the Database this required just a little more time and was not done ... will be ...


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

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

More
12 years 1 month ago #29823 by tonnick
Replied by tonnick on topic fonction import
well, ok, using echo shows me how does it parse. great.

>> when I put something else than ~~ as separators (; in my case) it just confirm what I said, i does not work. but this is not my question. I do not have pb to use ~~.

But maybe I was not enough clear in english. question is, why, in field names rows, there is no need to begin with separators, while, for item, we need to begin rows with separators. once again, this is not the way to build a csv.

how can we change that ?

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

More
12 years 1 month ago #29825 by ggppdk
Replied by ggppdk on topic fonction import
You are importing articles which have a description field which can be 100 lines etc !!!

The description field (or other fields too)
-- may contain new lines
-- make contain quotes
-- may contain ~
etc !!!

the is why the initial suggestion of record separator is \n~~

ALL Separators are just SUGGESTIONS, and can be configured to use other characters, plus you have the flexibility of using multi-character separators

so, ANY setting will work you can use \n !!!
i have just test with record separator \n the ~~ in the begin of the line is not obligatory in any way !!!!!

But if you select a particular record (item) separator must not appear inside the record , e.g if you use \n as record separator then you cannot have \n inside the record

You can use any CSV file !!! just configure the separators.

And also remember you imported data must correspond to correct field names too


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

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

More
12 years 1 month 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
12 years 1 month 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...

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.994 seconds
Save
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