[bbDev] bbPress users?

Nigel Johnson deviant at dr-deviant.net
Fri Dec 30 08:37:51 GMT 2005


Depends on what you mean by integrate the two ;)

I am just doing the same thing.

in your bb-config.php file, you can add the following (just after the bit that says "/* stop editing */" and before the bit that says "define('BBPATH', dirname(__FILE__) . '/' );" - it needs to go here so the WP functions get loaded first as they do not have if(function_exists()) round their functions - BBPress does ;)

/* stop editing */

/**************************
 *  Start WP integration
 **************************/
// My bbpress is in a subdirectory of my WP install... must bew a nicer way of doing this??
if(file_exists("../wp-settings.php"))
{
  // loads the functions and wp config
  require_once "../wp-config.php";
  require_once "../wp-settings.php";

  // use the WP user table for your bbpress user list
  define('CUSTOM_USER_TABLE', 'wp_users');
  
  // your $bb->domain must match your wp domain exactly or the hash won't work and users will not authenticate.
  $myhash = md5($bb->domain); 
  $bb->usercookie = 'wordpressuser_' . $myhash;
  $bb->passcookie = 'wordpresspass_' . $myhash;
  
  // Use the same cookie as WP
  $bb->cookiepath = '/';
}
/**************************
 *  End WP integration
 **************************/

define('BBPATH', dirname(__FILE__) . '/' )

You still need to build a my-templates, but you can now use all wp commands for example bloginfo() - very useful :). And you can use your current WP theme style by using the following in your header <head></head>...

    <!-- use WP theme for standard content -->
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen, projection" />


    <!-- install a local them for new bits not in WP for example threadpost, user-recent etc, and to overide anything in WP -->
    <style type="text/css">
            @import url("./my-templates/style.css");
    </style>

I am trying to put the blix theme into BBPress, so far, not to bad, but the layout of some bits are bad... and my CSS is a bit hit and miss :)

Good luck, hope this helps.
Cheers
Nigel.

P.s. if you think of anything else, please share :)


----- Original Message ----- 
From: "Joost Korff de Gidts" <joost at korff-design.com>
To: "bbPress Development" <bbdev at lists.bbpress.org>
Sent: Thursday, December 29, 2005 11:34 PM
Subject: [bbDev] bbPress users?


> Hello everbody,
> 
> I now have installed WP2 final.
> Please can some bbPress / wordPress users share there informatie how to 
> intregrate the two?
> 
> Here is my wb2:
> http://korff-design.com/huis/wp/
> 
> and bbpress:
> http://korff-design.com/huis/bbpress/
> 
> Many many thx,
> 
> Joost
> 
> P.s.
> http://comox.textdrive.com/pipermail/bbdev/2005-November/thread.html#410
> This did not work for me.
> 
> 
> _______________________________________________
> bbDev mailing list
> bbDev at lists.bbpress.org
> http://lists.bbpress.org/mailman/listinfo/bbdev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://comox.textdrive.com/pipermail/bbdev/attachments/20051230/da670423/attachment.htm


More information about the bbDev mailing list