Topic: Help with integration into wordpress

I need help with this, 'cause I can't get it to work!!!

Website Integration
Integrating PunBB into your website code is easy if you know a little PHP. By including PunBB's script common.php, you gain access to all PunBB global variables such as $db and $pun_user. However, in order to include this file, you need to define a constant called PUN_ROOT. This constant should be set to the relative path to your PunBB forum directory. For example, if your website front page is located in /home/user/public_html/ and your forums are located in /home/user/public_html/forums/, your PUN_ROOT should be './forums/'. The PHP code to accomplish this could look something like this:

define('PUN_ROOT', './forums/');
require PUN_ROOT.'include/common.php';Once you've included common.php, you can access and utilize all of PunBB's global variables and functions. Typically, you will be most interested in the $pun_user array. This array holds information about the current user. Another interesting variable is the database object $db. How to use these variables in your own script is out of the scope of this document, but here's a small example showing you how to print a simple message greeting the current user on your website front page:

Hello <?php echo pun_htmlspecialchars($pun_user['username']); ?>!In addition to defining PUN_ROOT, you can define a number of other constants to alter the behaviour of PunBB when including common.php. The two most interesting of these constants are PUN_TURN_OFF_MAINT and PUN_QUIET_VISIT. If PUN_TURN_OFF_MAINT is defined when including common.php, PunBB will not exit and display the maintenance message if the forums are placed into maintenance mode. You generally don't want this message to appear on your website front page, so defining that constant is a good idea. The other constant, PUN_QUIET_VISIT, prevents PunBB from updating the current user's last visit data in the database so that a visit to the front page doesn't count as a visit in the forums. This is also desirable behaviour in most cases. It doesn't matter what value you set these constants to, but setting them to a value of 1 is probably a good idea. Example:

define('PUN_TURN_OFF_MAINT', 1);
define('PUN_QUIET_VISIT', 1);Please note that these constants must be defined before common.php is included.

I did everything what it says in the quote. I pasted the define into my wordpress headertemplate.

Al I get is an error that occured in the include/functions.php file...please help!

Re: Help with integration into wordpress

although i have not integrated wordpress i've seen others who have (quaker if remember correctly).  i would suggest posting your exact error messages and methodically fixing them.  (^.^)

Re: Help with integration into wordpress

eric you ranged? wp and punbb... evil grins....

pc of cake.....


Q

My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

Re: Help with integration into wordpress

ok peps.... here is how to get the punbb and wordpress to share the same theme..

this is the main.tpl inside the include/template folder.
please make a backup copy of your main.tpl before doing anything... rename it to main1.tpl
first we need to work on the looks and feel before we integrate the db....

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html dir="<pun_content_direction>">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<pun_char_encoding>" />
<pun_head>

<!-- Wordpress Template CSS -->
<link rel="stylesheet" type="text/css" media="screen" href="your wordpress css link/style.css" />
<link rel="stylesheet" type="text/css" media="screen" href="http://www.almosteffortless.com/wp/wp-content/themes/k2/styles/sample.css" />

<style type="text/css">
#brdtitle { display: none; }
#brdmenu  { padding-top: 0; }
#punwrap { padding: 0; padding-top: 10px; margin: 0; width: 760px; }
DIV.box {BORDER-COLOR: #3388CC; }
.pun H2, #brdmenu {BACKGROUND-COLOR: #3388CC; COLOR: #FFF; }
DIV.blockpost H2 {BACKGROUND-COLOR: #3388CC; }
#punwrap * { font-family: 'Lucida Grande', Verdana, Arial, Sans-Serif; }
DIV.blockpost DIV.box {BORDER-COLOR: #3388CC; }
.pun { font-size: 11px !important; }
</style>
<!-- Wordpress Template CSS -->

<!-- Mint -->
<!-- <script src='/mint/mint.js.php' type='text/javascript' language='javascript'></script> -->
<!-- Mint -->

</head>
<body>

<!-- Wordpress Template Header -->

put ur template header here

<!-- Wordpress Template Header -->

<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>

<!-- Wordpress Template Footer -->


put your wordpress footer here!


<!-- Wordpress Template Footer -->

</div>
</div>

</body>
</html>
My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!