Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
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
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
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
Re: Textpattern Forms outside of Textpattern
I’m not familiar with punBB – but a quick google search turned up this
Offline
Re: Textpattern Forms outside of Textpattern
renobird> freakin amazing, I did not know you could do that.
Offline
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
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
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
Re: Textpattern Forms outside of Textpattern
HTML and TXP tags
Offline
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
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
Re: Textpattern Forms outside of Textpattern
is your path to the textpattern files correct? Contents of txp-one.php may help troubleshoot the issue.
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline