Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#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
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
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
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