Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-11-28 23:06:02

typeshige
Member
From: USA
Registered: 2005-08-11
Posts: 151
Website

Importing Articles from MySQL table to Txp

Hi,

I’m migrating content from a custom MySQL table into TextPattern and I’d like to write a simple program to generate the SQL statements. It looks pretty straightforward except for the ‘uid’ field in the textpattern table.

Can someone tell me how this is generated?

Or are there docs on writing converters to import data into Txp?

Do I just need to add to this table to add content?

Thanks,
Shige

Offline

#2 2007-11-28 23:22:24

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Importing Articles from MySQL table to Txp

From /textpattern/include/txp_article.php:

$uid = md5(uniqid(rand(),true));

Yes, just adding a row to the textpattern table is enough to add an article

Offline

#3 2007-11-28 23:47:56

typeshige
Member
From: USA
Registered: 2005-08-11
Posts: 151
Website

Re: Importing Articles from MySQL table to Txp

Thanks a bunch. I had just gone to the code myself and saw that.

Our group is developing a pretty big site using Txp. I can’t want to show it here once we have all it all worked out.

Offline

Board footer

Powered by FluxBB