- Title: New member
- Status: Offline
- Registered: 2008-06-30
- Posts: 5
Topic: Integrating the forum into my site
Ok, I know this has been discussed a zillion times;), but all the replies did not really help me that much.
I am clueless when it comes to php (I'm an old timer C++/Java kind of guy). I have a decent basic knowledge of html, however (I know it's xhtml now a days).
Anyway, can a big hearted pro guide me through this painful process?
Feel free to email me!
Last edited by citation (2008-06-30 07:31:05)
- Title: Member
- Status: Offline
- From: clacton
- Registered: 2008-06-25
- Posts: 24
Re: Integrating the forum into my site
Im new as hell here and to punbb, but all you really need is like 2 lines of code?
http://punbb.informer.com/docs/dev.html#integration
- Title: New member
- Status: Offline
- Registered: 2008-06-30
- Posts: 5
Re: Integrating the forum into my site
Thanks GodsDead!
I saw that, but how to do you go about defining that Pun_Root function?
- Title: Senior Member
- Status: Offline
- From: South Yorkshire, England
- Registered: 2007-03-15
- Posts: 1578
Re: Integrating the forum into my site
citation wrote:I saw that, but how to do you go about defining that Pun_Root function?
It's near the top of every file you uploaded. Copy the code from one of the files, i.e:
Last edited by MattF (2008-06-30 18:29:16)
- Title: New member
- Status: Offline
- Registered: 2008-06-30
- Posts: 5
Re: Integrating the forum into my site
MattF wrote:citation wrote:I saw that, but how to do you go about defining that Pun_Root function?
It's near the top of every file you uploaded. Copy the code from one of the files, i.e:
ok, but then what do I do with it, and where should I copy it to?
- Title: Senior Member
- Status: Offline
- From: South Yorkshire, England
- Registered: 2007-03-15
- Posts: 1578
Re: Integrating the forum into my site
What exactly are you wanting to do? Integration of what? Styles or user functions/info?
- Title: New member
- Status: Offline
- Registered: 2008-06-30
- Posts: 5
Re: Integrating the forum into my site
MattF wrote:What exactly are you wanting to do? Integration of what? Styles or user functions/info?
Only styles. I want the forum to look as if it's part of my site.
- Title: PunBB Donor
- Status: Offline
- Registered: 2005-03-07
- Posts: 304
Re: Integrating the forum into my site
You need to look in "include/template/main.tpl":
main.tpl wrote:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="<pun_content_direction>">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<pun_char_encoding>" />
<pun_head>
</head>
<body>
ADD YOUR WEBSITES HTML HEADER HERE
<div id="punwrap">
<div id="pun<pun_page>" class="pun">
<div id="brdheader" class="block">
<div class="box">
<div id="brdtitle" class="inbox">
<pun_title>
<pun_desc>
</div>
<pun_navlinks>
<pun_status>
</div>
</div>
<pun_announcement>
<pun_main>
<pun_footer>
</div>
</div>
ADD YOUR WEBSITE FOOTER HTML HERE
</body>
</html>
That is only a basic example that will literally drop PunBB into your design. Search both here and www.punres.org for more detailed documentation on integrating PunBB into your website. If you understand a little CSS you can drop Pun into your website then edits Punbbs stylesheets so that the colours match those of your site.
Hope this helps 
Last edited by downliner (2008-07-01 01:31:55)
- Title: New member
- Status: Offline
- Registered: 2008-06-30
- Posts: 5
Re: Integrating the forum into my site
downliner wrote:You need to look in "include/template/main.tpl":
main.tpl wrote:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="<pun_content_direction>">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<pun_char_encoding>" />
<pun_head>
</head>
<body>
ADD YOUR WEBSITES HTML HEADER HERE
<div id="punwrap">
<div id="pun<pun_page>" class="pun">
<div id="brdheader" class="block">
<div class="box">
<div id="brdtitle" class="inbox">
<pun_title>
<pun_desc>
</div>
<pun_navlinks>
<pun_status>
</div>
</div>
<pun_announcement>
<pun_main>
<pun_footer>
</div>
</div>
ADD YOUR WEBSITE FOOTER HTML HERE
</body>
</html>
That is only a basic example that will literally drop PunBB into your design. Search both here and www.punres.org for more detailed documentation on integrating PunBB into your website. If you understand a little CSS you can drop Pun into your website then edits Punbbs stylesheets so that the colours match those of your site.
Hope this helps 
Thanks alot downliner. I'll try this and let you know!
- Title: Member
- Status: Offline
- Registered: 2008-07-05
- Posts: 13
Re: Integrating the forum into my site
I've got a problem, I've uploaded my forums to http://ooka.pokelounge.com and I'm trying to integrate PunBB into http://pokelounge.com.
I inserted this:
<?php
define('PUN_ROOT', 'http://ooka.pokelounge.com/');
require PUN_ROOT.'include/common.php';
?>
and I get this error:
"The constant PUN_ROOT must be defined and point to a valid PunBB installation root directory."
Any help?
- Title: PunBB Support Manager
- Status: Offline
- From: Croydon
- Registered: 2007-02-09
- Posts: 520
Re: Integrating the forum into my site
Isnt pun_root just / or something??
- Title: Member
- Status: Offline
- Registered: 2008-07-05
- Posts: 13
Re: Integrating the forum into my site
Well, I don't have it uploaded to a folder, it's uploaded to the SubDomain Root, so I figured I would have to put that there.
- Title: Senior Member
- Status: Offline
- From: South Yorkshire, England
- Registered: 2007-03-15
- Posts: 1578
Re: Integrating the forum into my site
Ooka wrote:Well, I don't have it uploaded to a folder, it's uploaded to the SubDomain Root, so I figured I would have to put that there.
If you have uploaded the files, then they are in a directory, (folder). As Matt mentioned, set the root path correctly: define('PUN_ROOT', './'); That is the path relative to the directory in which the files reside, and has to be a local path.
Last edited by MattF (2008-07-05 19:43:17)
- Title: Member
- Status: Offline
- Registered: 2008-07-05
- Posts: 13
Re: Integrating the forum into my site
Yes, but I'm trying to link to the forums from http://pokelounge.com. The forums are under http://forum.pokelounge.com. If I do it how you guys are saying I receive this error:
http://pokelounge.com/
- Title: Senior Member
- Status: Offline
- From: South Yorkshire, England
- Registered: 2007-03-15
- Posts: 1578
Re: Integrating the forum into my site
It was a general reference, not exact information for your specific setup, seeing as you never mentioned those specifics. What is the directory structure of your site? If the forum directory you uploaded is in the web root dir, in a directory called forum, and you are referencing the file from a file in the web root dir, then the define should be: define('PUN_ROOT', './forum');
Only you know the directory layout. Adjust the path accordingly.
- Title: Member
- Status: Offline
- Registered: 2008-07-05
- Posts: 13
Re: Integrating the forum into my site
Ooka wrote:I've got a problem, I've uploaded my forums to http://ooka.pokelounge.com and I'm trying to integrate PunBB into http://pokelounge.com.
I inserted this:
<?php
define('PUN_ROOT', 'http://ooka.pokelounge.com/');
require PUN_ROOT.'include/common.php';
?>
and I get this error:
"The constant PUN_ROOT must be defined and point to a valid PunBB installation root directory."
Any help?
I actually had said it before ._.
Anyways, I did adjust it accordingly, and ended up with the error 
- Title: Senior Member
- Status: Offline
- From: South Yorkshire, England
- Registered: 2007-03-15
- Posts: 1578
Re: Integrating the forum into my site
What is your PUN_ROOT defined as at the moment?
- Title: Member
- Status: Offline
- Registered: 2008-07-05
- Posts: 13
Re: Integrating the forum into my site
Right now PunBB is uploaded to my Root Directory at http://ooka.pokelounge.com.
- Title: Senior Member
- Status: Offline
- From: South Yorkshire, England
- Registered: 2007-03-15
- Posts: 1578
Re: Integrating the forum into my site
That isn't what I asked. In the file which is showing that error, what is the definition of PUN_ROOT?
- Title: Member
- Status: Offline
- Registered: 2008-07-05
- Posts: 13
Re: Integrating the forum into my site
Well then I've already posted that. Just look up 3 posts.
- Title: Senior Member
- Status: Offline
- From: South Yorkshire, England
- Registered: 2007-03-15
- Posts: 1578
Re: Integrating the forum into my site
Ooka wrote:Well then I've already posted that. Just look up 3 posts.
If this:
define('PUN_ROOT', 'http://ooka.pokelounge.com/');
is how you still have it defined, I give up. I ain't gonna spend all night plaiting snuff.
- Title: Member
- Status: Offline
- Registered: 2008-07-05
- Posts: 13
Re: Integrating the forum into my site
Lmao, when I changed it to ./ it just made problems worse.
- Title: Senior Member
- Status: Offline
- From: South Yorkshire, England
- Registered: 2007-03-15
- Posts: 1578
Re: Integrating the forum into my site
Ooka wrote:Lmao, when I changed it to ./ it just made problems worse.
As one would expect. Which part of this did you not understand?
What is the directory structure of your site? If the forum directory you uploaded is in the web root dir, in a directory called forum, and you are referencing the file from a file in the web root dir, then the define should be: define('PUN_ROOT', './forum');
Only you know the directory layout. Adjust the path accordingly.
Posts [ 23 ]
Guest posting is disabled. You must login or register to post a reply.