Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2008-01-24 13:51:07

JonahC
Member
From: Toronto
Registered: 2007-09-23
Posts: 39
Website

Re: How to include a Textpattern form into an external PHP page?

Hi-

Could you have a default section that will be served if a section doesn’t exist — sort of like a 404 page. You can put the code in the form. Maybe this doesn’t work?


Jonah Calinawan
www.foodportraits.com

Offline

#14 2008-01-24 15:43:26

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

Re: How to include a Textpattern form into an external PHP page?

Hi Jonah… maybe I should give a slightly more detailed explanation

What I did was that i created pseudo sections- that is content without any head tags (A no-no in txp semantics I know-but very much the same as your example earlier in this thread:). Within them included code which I would normally use in forms. I the ‘call’ these ‘sections’ using your provided code in parts of pages in a second url…

example can be seen on neme-imca.org. The page ‘fetches the “NeMe Activities” and “Current NeMe Calls” using your code… also the sitemaps on neme.org and neme-imca.org are generated using the if_different tag and then brought together with your snippet:)

The reason I asked re suppression of errors is because i recently mistyped a section name and the whole page and when I tried to view the page the whole of it was blank as opposed to just the area was was supposed to be fetched. A typo can be corrected but a site failure due to server problems will cause both sites to go under.

Last edited by colak (2008-01-24 16:51:55)


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

Offline

#15 2008-01-24 17:20:09

JonahC
Member
From: Toronto
Registered: 2007-09-23
Posts: 39
Website

Re: How to include a Textpattern form into an external PHP page?

Hi-

Have you tried replacing “require” with “include”? The difference between require and include is how they handle errors. Maybe this would help?

Last edited by JonahC (2008-01-24 17:20:28)


Jonah Calinawan
www.foodportraits.com

Offline

#16 2008-01-24 18:51:29

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

Re: How to include a Textpattern form into an external PHP page?

that did it! Thanks Jonah!


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

Offline

Board footer

Powered by FluxBB