Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: jmd_csv: Batch-import articles from a CSV
Hi Karl
In the image there is title, body,excerpt, section;
I use Title, Excerpt,.. The first letter must be uppercase (i think), try if it works!
Cheers
Offline
Re: jmd_csv: Batch-import articles from a CSV
works like a charm! thank you very much for your great import script!
Offline
Re: jmd_csv: Batch-import articles from a CSV
i have a question. what will happen if there are two or more duplicated articles in .csv?
Offline
Offline
Re: jmd_csv: Batch-import articles from a CSV
When we add new article manually in txp! we will get this message Article posted. The same URL-only title is used by 2 different articles.
when we try to add another article with the same URL-only title
so i wonder if there is a way to prevent duplicated articles with URL-only title?!
Offline
Re: jmd_csv: Batch-import articles from a CSV
function check_url_title($url_title)
{
// Check for blank or previously used identical url-titles
if (strlen($url_title) === 0)
{
return gTxt('url_title_is_blank');
}
else
{
$url_title_count = safe_count('textpattern', "url_title = '$url_title'");
if ($url_title_count > 1)
{
return gTxt('url_title_is_multiple', array('{count}' => $url_title_count));
}
}
return '';
}
finally, i found the one i need in txp_article.php
i’ll try to modify the script to fit my need! _
Last edited by HAC (2009-12-16 10:19:57)
Offline
#31 2010-08-25 19:52:15
- Jaro
- Member
- From: S/F
- Registered: 2004-11-18
- Posts: 89
Re: jmd_csv: Batch-import articles from a CSV
Would it be difficult to modify the plugin to include keywords import?
Offline
#32 2010-08-25 20:04:02
- Jaro
- Member
- From: S/F
- Registered: 2004-11-18
- Posts: 89
Re: jmd_csv: Batch-import articles from a CSV
Jaro wrote:
Would it be difficult to modify the plugin to include keywords import?
Nevermind. I just tried the import and the keywords are imported although it’s not mentioned in the plugin documentation. Great stuff!
Offline
Re: jmd_csv: Batch-import articles from a CSV
I had a bunch of events that I brought in with jmd_csv. They all needed specific timestamps, which are currently unsupported, so here is my workaround.
- put a timestamp in an unused custom field then
- run this sql to replace the exiting timestamp with the new one.
UPDATE `textpattern` SET `Posted` = `custom_1`;
UPDATE `textpattern` SET `custom_1` = NULL;
worked pretty well.
Last edited by mrdale (2010-08-25 23:32:22)
Offline
Re: jmd_csv: Batch-import articles from a CSV
with the Posted – I just commented out these line:
/*
feed_time=now(),
Posted=now(),
LastMod=now(),
*/
And added it to the csv headers – works perfectly :)
(apart from the fact that all my articles are to be to be posted in 2031 because I got the date wrong :) )
Offline
Re: jmd_csv: Batch-import articles from a CSV
cool, can you post your csv header and one line just for the hell of it
Offline
Re: jmd_csv: Batch-import articles from a CSV
Sure – Here you go
The format date is fixed on this one, I didn’t put a time stamp, but you can.
Let me know if it works.
Offline