Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Textpattern front end to PunBB forum
Guntards.net is basically a PunBB forum, but I wanted to front-end the forum with Textpattern as a way to provide news and announcements, maybe run a little guntard blog.
There are three possible approaches to a job like this:
1. Hack Textpattern to look more like PunBB;
2. Hack PunBB to look more like Textpattern; or
3. Hack them both to look like something completely new and fresh and different.
Well, 3 was out of the question for me, and since PunBB’s CSS is so bizarre and baroque, I decided to make a Texpattern site look pretty much like default PunBB.
Contrary to the suggestions in the Punres wiki, I changed the header graphic in the main.tpl template rather than the imported CSS file, but I made a lot of additions (almost no other changes) to the PunBB CSS.
Textpattern, of course, was a joy to work with and presented no problems.
By the way, if you think you might be a guntard, feel free to register at the forum. You will be one of the first official guntards!
Last edited by redneck (2007-02-15 04:53:28)
Offline
Re: Textpattern front end to PunBB forum
TxP & Pun,

a shotgun wedding?
We Love TXP . TXP Themes . TXP Tags . TXP Planet . TXP Make
Offline
Re: Textpattern front end to PunBB forum
hcgtv wrote:
a shotgun wedding?
That’s Gun Luv!
Last edited by redneck (2007-02-15 14:46:07)
Offline
Re: Textpattern front end to PunBB forum
Lock, stock and two smoking BBs :)
Offline
Re: Textpattern front end to PunBB forum
Damn, first issue. Might be a simple syntax problem (I’m very rusty with PHP).
I’m trying to use PunBB’s syndication feature, which calls a script called extern.php. I’m using the following syntax in my TxP template:
<txp:php> include('http://www.guntards.net/forum/extern.php?action=new&show=3'); </txp:php>
I know the URL syntax is correct, since it gives me the proper output when used at the command line (you can check it out yourself). I guess simply inserting the include() function in the template isn’t enough.
Anyone have any ideas what’s happening?
Offline
Re: Textpattern front end to PunBB forum
I do it like this:
<txp:php> include 'http://phpxref.net/extern.php?action=new&show=15&fid=2'; </txp:php>
We Love TXP . TXP Themes . TXP Tags . TXP Planet . TXP Make
Offline
Re: Textpattern front end to PunBB forum
I see that you have removed the parentheses. Still no joy for me.
Is there something I missed?
Offline
Re: Textpattern front end to PunBB forum
Might be an issue with your host not allowing includes.
We Love TXP . TXP Themes . TXP Tags . TXP Planet . TXP Make
Offline
Re: Textpattern front end to PunBB forum
hcgtv wrote:
Might be an issue with your host not allowing includes.
Thanks. That’s it. I’m hosting with DreamHost.
Offline
Re: Textpattern front end to PunBB forum
Ooo. A question I can answer!
This is how I got around Dreamhost’s no includes:
<txp:php>
$ch = curl_init(“http://my.domain/forum/extern.php?action=active&show=3”);
curl_exec($ch);
curl_close($ch);
</txp:php>
Work just fine…
Cheers
Offline
Re: Textpattern front end to PunBB forum
NeilA wrote:
Ooo. A question I can answer! This is how I got around Dreamhost’s no includes:
Yay! That worked great! Thanks a lot!
Offline
#12 2007-03-21 02:41:33
- TTD
- New Member
- Registered: 2007-03-21
- Posts: 3
Offline
Re: Textpattern front end to PunBB forum
TTD wrote:
Love the clean design and the simple way you integrated the recent topics, etc from punbb. I’ve been playing with PunBB and like what I see so far.
Thanks for the kind words.
As I mentioned, the design owes more to PunBB’s default style since I felt it would be easier to hack TextPattern into shape than PunBB.
Getting the recent topics to work actually was a lot more difficult on my particular host. They kept capturing the code in the POST query, even after I made the change I mentioned above. In the end I had to place the code directly in the database using phpMySQL.
I can’t recommend PunBB highly enough. It literally takes less than five minutes to install, and maybe another five or ten minutes to configure the forums and member groups. It seems to be pretty secure, and I’ve seen it used successfully for extremely high volume forums. Plus it looks good (speaking of which, what’s up with that ugly Simple Machines Forum I’m starting to see everywhere? Yuck!).
Offline
#14 2007-05-27 15:08:07
- azw
- Member
- Registered: 2007-01-29
- Posts: 279
Re: Textpattern front end to PunBB forum
Yep, your site is clean looking.
How do you like PunBB now that you’ve used it for a while?
Does your forum require a separate login from TextPattern?
Could you give us a step-by-step for how to adapt a PunBB to TextPattern?
Offline
Re: Textpattern front end to PunBB forum
PunBB is excellent. My only concern is that I have been on other PunBB forums that have sustained spam bot attacks and other abuses, so I am a little worried about security. But I don’t have enough traffic for that to become an issue with my site for a long time.
There is no linkage between PunBB and Textpattern, so separate login is required.
There is supposed to be a project afoot to integrate the two tools. All I would really like to see is some mechanism that automatically starts a new PunBB thread every time you post an article in Textpattern, so you can link to the thread instead of using the comments interface (there’s no commenting on Guntards.net; instead, readers are invited to comment in the PunBB forum). That would be enough to make me happy. I’m pretty sure it would be easy for Textpattern consultants like Zem to implement something like that if I offered to pay them for it.
I didn’t adapt PunBB to Textpattern it was the other way around. I had to set up a style sheet so that Textpattern looked like PunBB (Textpattern styles are far easier to modify that PunBB’s, which are fairly convoluted and spread over multiple files).
One big change I made to PunBB was adding the common header, which I did using the suggestion described here.
I also wanted to include active topics on the front page of Guntards.net. PunBB has a tool for this, extern.php, which is easy to use. I had a problem with it, however, because my hosting company did not like seeing it uploaded in my Textpattern script, so in the end I had to add the code by opening the Textpattern database (fooling the hosting company’s POST filter and trap). I documented that issue here.
Offline