Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-03-28 08:10:21

marvincooper
Member
Registered: 2004-10-13
Posts: 43

Use a txp form outside of textpattern (in punbb)?

I have txp and punbb running on my site, with punbb sharing the css from txp.

To get the punbb pages to look and function the same as the txp pages, I have pasted html from a couple of my txp forms into the punbb template file. What would be much better would be to pull the contents of these 2 forms into punbb, so that if I change, say, a section menu in txp, punbb would automatically pick up the change.

Anyone know how I could do this?
ta
marv

Offline

#2 2009-03-28 08:43:07

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

Re: Use a txp form outside of textpattern (in punbb)?

here’s a method I use.

I created a section in txp which has its own page template (no head- just the body).

I insert that in my ‘other installs’ (both txps and punBB) by using:

<?php include($DOCUMENT_ROOT . "http://my-txp-site.tld/ext-section/"); ?>

The caveat is that I have to take care for the section not to show in any of the menus.

>>>>>>>>>> It would be great if there was an include method using forms instead. Maybe someone might offer a solution.

> edit – here’s how in punBB 1.3.x

  1. Create a php document. Call it txpimport.php
  2. Within it add <?php include($DOCUMENT_ROOT . "http://my-txp-site.tld/ext-section/"); ?>
  3. upload it in include/user/
  4. Go to include/template/ and open main.tpl
  5. Add <!-- forum_include "txpimport.php" -->

This might work too… Skip steps 1-3

  • Go to include/template/ and open main.tpl
  • Add <!-- forum_include "http://my-txp-site.tld/ext-section/" -->

Last edited by colak (2009-03-28 08:57:33)


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 2009-03-28 22:47:02

marvincooper
Member
Registered: 2004-10-13
Posts: 43

Re: Use a txp form outside of textpattern (in punbb)?

Thanks, I’ll give that a try. I need to restructure my forms a bit and I think it could work. Will let you know.

I guess the alternative is to write a php query to pull the form db record into main.tpl but your solution is fine for me and I’m not able to write any sort of php query off the top of my head.

Thanks
marv

Offline

Board footer

Powered by FluxBB