The sequence of the fields should not be a problem. To be honest, I’ve not tried importing into dropdown list fields - I’d expect it to import into the database ok, but there might be problems viewing it in the Control Panel if the value has not been set up as a value in the custom field
I am having issues with getting it to recognize Author. My csv file is formatted as follows…
dwergs 2002-07-01 00:00:00 AM CEST MSN Messenger 4.7.0036 <b>MSN Messenger 4.7.0036</b> has been extracted from a service pack beta. If you'd like to have this unofficial release as well as the <b>new polygamy patch</b> for it, pay a visit to <a href="http://mess.localdispute.com/_scripts/track/odtrack.php3?url=http://users.pandora.be/heavyk/" class="noUnderlines" target="_blank" rel="noopener">Heavy K</a>'s.
dwergs 2002-07-04 00:00:00 AM CEST downloads fixed Downloads fixed (thanks to all the people who reported this!).
Marcus 2002-07-05 00:00:00 AM CEST msn mobile <span class="boldText">MSN Mobile</span><span class="normalText"> now officially launched in <a href="http://www.msn.be/gsm/smsservices/" class="noUnderlines" target="_blank" rel="noopener">Belgium</a> and the <a href="http://www.msn.nl/mobiel/hotmailsms/" class="noUnderlines" target="_blank" rel="noopener">Netherlands</a>.
And my template is formatted as follows…
{exp:csvgrab url="path to file name here"
delimiter="TAB"
weblog="3"
title="4"
date="2"
author="1"
use="5"
fields="simplecontent"
}
As you can see I am throwing out the time as I don’t really care about it I just want to date. The Date, Title, and Simple Content field are all importing as desired but the Author is not being picked up. I have tried the Author tag and importig using the use tag.
Help! M.
I am having issues with getting it to recognize Author.
Unfortunately, the author parameter does not work like that. The author= parameter just takes a value which is the id of the EE member, it cannot use a value from the CSV file (although it is a sensible thing to try and do - I’ll add it to my to do list)
Andrew
Andrew and Dan - thanks for your great work on this so far - potentially a very useful function. After several hours of testing I have almost got this plug in to update a sites diary system - which will make it much easier for the client to update his site. However the dairy system I have out together in EE includes a custom field for the event date (a simple date field) and this seems to be causing me some problems.
In my spreadsheet I have a list of the event dates - I even formatted them just like Andrews instructions: (YYYY-MM-DD) so my exampe is: 2009-02-06
However when the template is run and the entry is reviewed the date in the custom field is showing the following: 1969-12-31 17:00 - which is a good few years before the date of each event!
Any ideas would be appreciated!
( I am using Dans zip file as it seems to bethe latest version and I also upgraded EE tonight from 1.6.3 to 1.6.6 in the hope that it would shake the tree on this issue - but I still have the problem.)
The plugin does not currenlty handle putting dates into custom fields, only into the entry’s entry_date field.
You could try (I have never tried this) opening the CSV file in a spreadsheet and creating an extra column to store the date as a UNIX timestamp (this is how EE stores the date internally), and then import this column into your custom date field.
In Excel, I think the formula to convert from a YYYY-MM-DD format to a UNIX timestamp is: =(A1-DATE(1970,1,1))*86400 where the original YYYY-MM-DD date is stored is the cell A1
This might help…
Andrew
A caution: Andrew’s idea might work in principle, but the UNIX timestamps that are stored in the database are offset by the server’s local time: they are not standard timestamps. (At the moment, I can’t remember if the offset is subtracted or added). So I think the times will be off by a few hours, unless you offset the time by 3600*timezoneoffset.
It certainly did help Andrew - many thanks!
I am using Dan’s version as it has the expiry date function but I am getting a couple of errors on the ‘go’ page -
Notice: strtotime(): Called with empty time parameter in /home/public_html/system/plugins/pi.csvgrab.php on line 270
Checking: No Friday meeting 28-Nov-2008
Notice: Undefined index: event date in /home/public_html/system/plugins/pi.csvgrab.php on line 612
Found new entry: No Friday meeting 28-Nov-2008
(don’t worry that’s not the real paths to the plug in file!) This might be some hidden white space in the spreadsheet though - will clean it up later.
However - it’s seems to be working just great - the entries are being built and the dates are now all correct for the entry date, event_date (a custom field) and the expiry date My spread sheet already had some function in as I cut and past the diary events from a newsletter and I need to change the title by adding the date to it (found a concatenation formula for Excel to do that).
This is going to save me a ton of time in the future (admittedly I was up to 4am this morning trying to get it to work but in the long run there will be a pay off!)
Hi,
I just tried out the plugin but I can’t get it to work somehow. I must be overlooking something. Nothing happends at all when I run the go template. My code is:
{exp:csvgrab url="http://www.my-domain.com/import.csv"
weblog="3"
title="1"
delimiter=";"
skip="1”
use="2|3"
fields="website|description" }
I also use the feedgrab plugin, same principle, and that works fine. Any help on this would be great!
regards, Tammo
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.