Topic: Embed forum in website

Hi.

I´ll have to tell you, I´m more of a "cut-n-paste" developer than anything else. But I know what I want smile

I was hoping that you can help me.

Ett Annat Lopp is an mountainbike race and event organizer and we are adding some functionality to our website.
We are going to include forums so that our visitors can discuss our races and events. You know, create the "buzz" before the event and for our contestants to discuss it afterwards.
Anyway, I want to include the PunBB forum in our current layout. Any ideas on how I can do that in a good way?

We have the site at: http://www.ettannatlopp.nu and the forum at http://ettannatlopp.nu/forum

The idea I had was that on the startpage, ie ettannatlopp.nu have a link to the complete forum and on each of the competition websites, ie http://ettannatlopp.nu/fid and http://ettannatlopp.nu/somnlos have a link direct to that forum.

Am I way out on left feild here or is it doable?

/Mattias
Project manager Ett Annat Lopp
http://www.ettannatlopp.nu

2 (edited by MarcB 2004-02-17 09:17)

Re: Embed forum in website

Almost everything is doable. THe only problem I see is with the login, but what you require is easy.

Main site point to the forum (and please take a look at extern.php which has functions that you can use to already provide some content), and I'd suggest also a login page (if you don't already have a membership system, in which case you'd have to make them both compatible, which is also doable but requires extra work).

Sub-pages/sites point to each section with a link very much like:
http://www.yourdomain.com/punBB/viewforum.php?id=6
where the last number is the id of the forum, check on the DB or do some trial & error

If the user has already logged in, he'll have the appropiate rights, otherwise, he'll have guest rights, however you've defined them.

Re: Embed forum in website

Hmm... It´s a good start but I cant get it to work with our layout.

I want the users to see something like http://ettannatlopp.nu/forum/test_php_include.php

And when they click on anything I want them to still be "within" our site layout, but that the forum content would change. Do I make sense?

As it is now, the visitor "jumps out" from our layout and only sees the forum if he clicks anything.

/Mattias

/Mattias
Project manager Ett Annat Lopp
http://www.ettannatlopp.nu

Re: Embed forum in website

Have a look at the files in include/template/. Especially main.tpl.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

5

Re: Embed forum in website

Yep, that's the way to go, modify the forum's layout so that it's like your website. There's a couple of sublteties there, but it's the easiest solution then.

6 (edited by Paul 2004-02-17 11:17)

Re: Embed forum in website

You can cheat. Take one of your sites pages, remove the middle content and replace it with the relevant parts of main.tpl. You will also have to tinker with the head and body to include the relevant bits from main.tpl. Now rename the page main.tpl and put it in the include/template folder. Finally copy the relevant parts of your sites style sheet to whichever PunBB style sheet you will be using (or vice versa). You may have to rename some items in the stylesheet to remove conflicts.

A final wrinke which I have started to use is to put the admin interface on a different template largely because it is more sensitive to restrictions on the amount of space available to it and there is no good reason why the admin interface has look like the rest of your site.

Re: Embed forum in website

Wow, thanks a bunch y'all. I got it to work smile *wooohooo*

/Mattias

/Mattias
Project manager Ett Annat Lopp
http://www.ettannatlopp.nu

8

Re: Embed forum in website

@Paul:
Yes, there is: if you're not administering it yourself wink

9

Re: Embed forum in website

MarcB wrote:

@Paul:
Yes, there is: if you're not administering it yourself wink

Ok so you might some site identification e.g. the site logo and colour scheme. What I was getting at is you don't need to have it wedged in the middle column of a three column layout.

10

Re: Embed forum in website

Aw, you're right, and especially with my layout, I'd rather not... too many items on the menu :-)

I was just teasing, you're right, of course. A little corporate identity is ok, but it's not that critical there.