Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-09-16 16:29:53

driz
Member
From: Huddersfield, UK
Registered: 2008-03-18
Posts: 441
Website

Textpattern Forms outside of Textpattern

Hi,

Is it possible to use a Textpattern form outside of Textpattern? So say for instance I had a forum, and I wanted it to use the same header, could I get it use the header from my Textpattern website?

Thanks. x


~ Cameron

Offline

#2 2008-09-16 16:56:08

renobird
Member
From: Gainesville, Florida
Registered: 2005-03-02
Posts: 786
Website

Re: Textpattern Forms outside of Textpattern

Yep.

To include TXP tags in external pages add this before anything in your page (before doctype)

<?php define("txpinterface", "public"); include './textpattern/config.php'; include $txpcfg['txpath'].'/publish.php'; ob_start();?>

Then all the way at the botttom after </html> add:
<?php $output = ob_get_clean(); echo parse($output);?>

Now you can use TXP tags on that page.

Offline

#3 2008-09-16 17:09:08

driz
Member
From: Huddersfield, UK
Registered: 2008-03-18
Posts: 441
Website

Re: Textpattern Forms outside of Textpattern

Okies cool, problem I have is that I’m wanting to do this on PunBB, yet the template files are .tpl and not .php
Do you by any chance know where abouts to add the php code you have listed to allow me to use txp tags in my forum design. Thanks. x


~ Cameron

Offline

#4 2008-09-16 17:13:11

renobird
Member
From: Gainesville, Florida
Registered: 2005-03-02
Posts: 786
Website

Re: Textpattern Forms outside of Textpattern

I’m not familiar with punBB – but a quick google search turned up this

Offline

#5 2008-09-16 17:13:14

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: Textpattern Forms outside of Textpattern

renobird> freakin amazing, I did not know you could do that.

Offline

#6 2008-09-16 17:14:33

renobird
Member
From: Gainesville, Florida
Registered: 2005-03-02
Posts: 786
Website

Re: Textpattern Forms outside of Textpattern

mrdale wrote:

renobird> freakin amazing, I did not know you could do that.

Dale, That’s an old trick that Dean and Reid (I think) helped me with YEARS ago!
It’ll let you do some really cool stuff. : )


T

Last edited by renobird (2008-09-16 17:15:26)

Offline

#7 2008-09-16 17:17:06

renobird
Member
From: Gainesville, Florida
Registered: 2005-03-02
Posts: 786
Website

Re: Textpattern Forms outside of Textpattern

P.S. I pretty much use that method exclusively for my index.php.
That way I can code everything in Textmate and remain happy and calm.

)

Offline

#8 2008-09-16 17:34:40

driz
Member
From: Huddersfield, UK
Registered: 2008-03-18
Posts: 441
Website

Re: Textpattern Forms outside of Textpattern

renobird wrote:

P.S. I pretty much use that method exclusively for my index.php.
That way I can code everything in Textmate and remain happy and calm.

)

what does that do? what are you coding in index.php (just curious :) )


~ Cameron

Offline

#9 2008-09-16 17:38:21

renobird
Member
From: Gainesville, Florida
Registered: 2005-03-02
Posts: 786
Website

Re: Textpattern Forms outside of Textpattern

HTML and TXP tags

Offline

#10 2008-09-16 17:58:04

driz
Member
From: Huddersfield, UK
Registered: 2008-03-18
Posts: 441
Website

Re: Textpattern Forms outside of Textpattern

I’m getting this error: http://www.simplecandy.com/forum/

txp-one.php is the first line of code and txp-two.php is the second line of code, and they are positioned at the top and bottom of the template file. But I’m getting that error? :S

Last edited by driz (2008-09-16 18:07:17)


~ Cameron

Offline

#11 2008-09-16 18:07:03

renobird
Member
From: Gainesville, Florida
Registered: 2005-03-02
Posts: 786
Website

Re: Textpattern Forms outside of Textpattern

You need to adjust the paths in my example above.
The easiest way is to use the full system path to your TXP install (ask your hosting provider if you don’t know it).

It’ll be something like:
home/www/public_html/textpattern/config.php

Offline

#12 2008-09-16 18:07:49

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: Textpattern Forms outside of Textpattern

is your path to the textpattern files correct? Contents of txp-one.php may help troubleshoot the issue.


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

Board footer

Powered by FluxBB