Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2018-06-12 09:46:17

jpdupont
Member
Registered: 2004-10-01
Posts: 752

Fill a textpattern site with external data

I am currently working on a tourist office website, which can draw some of its information from the databases of an official regional tourism organization.

The raw data is received in xml form. Synchronization must be done overnight automatically by cron tasks, or forced anytime.

What is the best way to integrate the data into the Textpattern site?

  • By php read the xml files saved on the server to display them in pages, independently of the Textpattern tables ?
  • Or insert the xml data received into Textpattern articles? The computer scientist of the regional office tells me that usually he inserts the data in WordPress posts …
    If this is the right solution, is the table “textpattern” the only one to fill? Should we call some functions of the core to create an article by programming correctly?

Offline

#2 2018-06-12 09:59:43

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: Fill a textpattern site with external data

Hi JP,

Would smd_xml be of help?


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#3 2018-06-12 10:01:37

jpdupont
Member
Registered: 2004-10-01
Posts: 752

Re: Fill a textpattern site with external data

Hello Yiannis,

Thanks for the link ! The doc give me all what I need !

Jean-Pol

Last edited by jpdupont (2018-06-12 10:04:32)

Offline

#4 2018-06-12 17:09:38

towndock
Member
From: Oriental, NC USA
Registered: 2007-04-06
Posts: 329
Website

Re: Fill a textpattern site with external data

Textpattern really can excel in a site like you mention.

On one Textpattern site I operate every page is inserted content from another source. Textpattern basically acts a searchable framework. Some content is inserted using Bloke’s great plugin smd_xml (a great tool), but most content is integrated using <txp:php>. Content is converted using cron driven shell scripts as needed to make it compatible. Here is an example page (the site has over 2,000 pages):

marineweather.net/tide/boston-light-boston-harbor-ma-tides

Last edited by towndock (2018-06-12 23:18:08)

Offline

#5 2018-06-12 18:58:51

jpdupont
Member
Registered: 2004-10-01
Posts: 752

Re: Fill a textpattern site with external data

Yes, towndock ! I really appreciate Textpattern because it allows me to do most of what I want, simply, or with plug-ins such as smd_query or here smd_xml.
I recently had to immerse myself in WP at the request of customers who wanted it, but the return in Textpattern is a breath of fresh air on a sweet summer evening :-)))

Offline

Board footer

Powered by FluxBB