Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-06-10 17:20:34

jim_klee
New Member
Registered: 2007-01-21
Posts: 2

Importing HTML code to new articles in TXP

Hi all,

Quick question from a n00b

I have like 600 pages in html format that i’d like to import, and i’d like to know if there is a way to import them into my textpattern database via some script or plugin. i don’t want to copy and paste each page by hand by using the ‘Write’ tab forms.

i’d write a php script that uses SQL query commands but i’m afraid i don’t know how to fill all the fields in the textpattern table properly.

can anyone help with tips or advice?

thanks,
jim

Offline

#2 2007-06-10 17:55:53

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

Re: Importing HTML code to new articles in TXP

Perhaps some columns that you have to be aware of when inserting stuff in the textpattern table:

  • Title => put your title here.
  • Title_html => not used at the moment
  • Body => put your HTML text here, but add one space at the beginning of each line!
  • Body_html => put your HTML text here
  • uid => put a random number here (it’s a random md5 string)

As for the other columns in the textpattern table, add a normal article through textpattern and you’ll see how they are used.

Last edited by ruud (2007-06-10 17:56:08)

Offline

Board footer

Powered by FluxBB