Search Results for 'code'
-
Search Results
-
Hi,
I’ve been searching this forums yet but could’nt find any explanation to my problem so here it goes:
I’m a newbie at developping for bbpress, and trying to customize it for my needs.
First, I’m running bbPress 0.9.4; I’m also using a copy of the default theme that i’m modifying (located in my-templates/mysite).
I’ve attached a hook to the action ‘bb_index.php_pre_db’ which is ran on bbpress/index.php; My goal is to display only forums (without latest discussions and sticky topics) so i’ve copied the content of index.php and removed calls to latest discussions and sticky topics:
add_action('bb_index.php_pre_db', 'home');
function home(){
$forums = get_forums(); // Comment to hide forums
do_action( ‘bb_index.php’, ” );
bb_load_template( ‘front-page.php’);
exit();
}
The problem is that once in the file front-page.php, the $forums variable doesnt exists anymore. Actually i tried to print it out in the bb_load_template as well and the variable is empty too. It seems that because i’m using a hook (called by do_action), globals variable do not exists anymore in this context. I might be wrong but i’m actually stuck to this point and can’t really move forward. Any tips?
Cheers.
Topic: New deep integration method?
Recently I’d been trying to deep integrate WP 2.8 and bb 1.0-rc1 together. I had previously managed to do it successfully with WP 2.5.1 and bb 0.9.0.4, so I tried porting the same method to the newer version.
Unfortunately however, it doesn’t seem to work. With the addition of backPress, the old method of deep integration no longer works as some functions get called twice, triggering a fatal error.
[Wed Jun 17 02:56:20 2009] [error] [client 86.45.179.252] PHP Fatal error: Cannot redeclare _mb_substr() (previously declared in */wordpress/wp-includes/compat.php:86) in */forums/bb-includes/backpress/functions.compat.php on line 108, referer: *
So, mainly I was wondering whether anyone else had managed to find a new method of deep integration, or whether it’s now not possible at all?
I think I found a bug with the third RC of bbPress 1.0 and WordPress 2.8, I checked around the forums and in Trac and didn’t see this specific issue mentioned elsewhere.
I have WordPress installed in a subdirectory, with bbPress installed below that.
WordPress: http://www.mydomain.com/beta/
bbPress: http://www.mydomain.com/beta/forums
So aside from having WordPress installed in a subdirectory for testing purposes, there is nothing out of the ordinary about my install. I don’t have WordPress set up to run in the root from the subdirectory or anything, it’s totally standard.
The issue is that when I am logged in through WordPress, I am unable to access the backend of WordPress. Any attempt to access the Dashboard or any other page on the admin area is redirected to the login page of WordPress, even though I am already logged in.
I am able to access the admin area of bbPress, but I am unable to logout from either WordPress or bbPress.
When I login through bbPress, I am able to access the backend of both WordPress and bbPress. I am able to logout from bbPress, but not WordPress.
I have followed along with Sam’s basic integration screencast a few times now, I believe I am installing everything correctly, and the results are consistent.
I have a live install of WordPress running in the root of this particular domain, so I am unable to do a test install in the root, but I have a feeling that it would run fine there and that this issue is the result of installing from a subdirectory.
The only difference that I can see between the screencast and what I am seeing on my end is the manual cookie settings code that bbPress asks you to add to wp-config.php at the end. In the screencast, bbPress lists this code:
define('COOKIEPATH', '/');
But in my install, bbPress lists this code:
define('COOKIEHASH', 'e49cd3ef5873cd2d82bbc6a99b41ebfa');
define('COOKIE_DOMAIN', '.www.mydomain.com');
define('SITECOOKIEPATH', '/beta/wp-admin');
define('COOKIEPATH', '/beta/');
When I delete those three extra line from my wp-config.php file, leaving only the fourth line, the issue is resolved and I am able to login in and out from either WordPress or bbPress, and access both admin areas.
Has anyone else encountered a problem like this? Am I skipping a step, or is one of the paths that bbPress giving incorrect?