Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-01-24 23:32:22

shilmy
Member
Registered: 2006-04-29
Posts: 49

Populating Textpattern powered site with Articles from MySQL database?

Hello,

I have data/articles in mysql database that I want to convert it into textpattern site. So I guess I can insert the data into textpattern system with some modification to match the column table.

When I look at textpattern table, there is a uid column. Can someone tell me what data it is? How can we generate data for this column?

Thanks
Sjarief Hilmy

Offline

#2 2008-01-25 07:12:01

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

Re: Populating Textpattern powered site with Articles from MySQL database?

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

Offline

#3 2008-01-25 07:32:52

shilmy
Member
Registered: 2006-04-29
Posts: 49

Re: Populating Textpattern powered site with Articles from MySQL database?

Thanks, but can you tell me what the purpose of this column? Can I just leave it blank?

Offline

#4 2008-01-25 07:39:48

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

Re: Populating Textpattern powered site with Articles from MySQL database?

IIRC, it’s used in the RSS/Atom feeds. It should be a unique number.

Offline

#5 2008-01-25 10:13:22

shilmy
Member
Registered: 2006-04-29
Posts: 49

Re: Populating Textpattern powered site with Articles from MySQL database?

Oh Ok, thanks

Offline

#6 2008-01-30 00:43:10

shilmy
Member
Registered: 2006-04-29
Posts: 49

Re: Populating Textpattern powered site with Articles from MySQL database?

Rather than creating new thread, I think it’s better to continue this thread about importing articles to txp

Now, the articles (text only) is in textpattern table, in Body column. My question is how to convert this article text to html to fill Body_html column in textpattern table?

Regards,
Sjarief Hilmy

Offline

#7 2008-01-30 19:14:13

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

Re: Populating Textpattern powered site with Articles from MySQL database?

You may want to look at the /textpattern/include/txp_article.php code to see how TXP itself deals with that column.

Offline

Board footer

Powered by FluxBB