Ok, so I’ve figured out some more info to share…
First, the code posted above needs to reference the file type (.jpg, .jpeg, .gif, or .png). Right now the code only points to the avatars folder.
Next, I’ve figured out that the “avatar upload” plugin for bbpress does rename the images to the user’s username, but makes it all lowercase letters if there are any caps.
Hope that helps.
Thank you!!
This seems to happen any time I choose a localization file
I get a series of fatal errors saying ‘Cannot redeclare class CachedFileReader’ in bb/inlcudes/streams.php.
I’ve searched the forums, and it hasn’t yielded any solutions, is anyone experiencing the same issue?
I am running the latest bbPress 0.8.2, with WordPress config included.
No README or INSTALL files?
I’ve read the blog post and any pertinent thread, but I was hoping for some install/upgrade instructions, like WordPress supplies.
It is pointing to the correct folder, just isn’t pointing to any file like it should.
Forget about the PHP.
Where it just says “avatar” instead of displaying the image, open the page source (in FF: Ctrl + U, in IE: probably something), then search for “avatar” until you hit the right place. There should be an image tag. Look at the src
property. Does that URL point to a valid image file? If not, what does it read?
sorry, took a break. that looks right to me, given your wordpress blog is at http://www.sitenameishere.com/wp/
also, you’re missing the semi-colon at the end of the require line – after the end paren ); but you may just not have typed that in here. check for that, it would break a site. Otherwise, not sure. Assuming the bbpress install works fine with the default theme…
you’re putting that code as the first line of config.php and nowhere else?
it might be the way your wp header is set up in comparison to the bbpress templates. mine was completely simple:
1. add the ONE php require line to config.php
2. drop Aditya’s files into a subdirectory of my-templates with a style.css with a name section
3. add bbpress styles to my wordpress theme stylesheet
4. change template in the presentation dashboard
Now I wanted my wordpress sidebar so I also added a div tag and sidebar include to those template files but otherwise haven’t had to change anything else.
Thanks for the reply but I have followed those instructions to a T numerous times and nothing works, including downloading that template. This code
<?php require_once(‘/absolute/path/to/WordPress Parent Directory/wp-blog-header.php’) ?>
Breaks the forums completely. I only get a white page when going to the URL….
I’m working on this today too and followed Aditya’s instructions too and its got me in the right direction– I think what you missed is downloading his “my-template” that pulls all the wordpress header and footer info in for you automagically. It is in the last paragraph “..now you can just drop this template” and the link is:
http://www.adityanaik.com/download/bb-my-template.zip
Anyway, worked for me and only thing left is to customize the forum portions / content area.
oh, you do need the ‘<?php require_once(‘/absolute/path/to/WordPress Parent Directory/wp-blog-header.php’) ?>’ as the very FIRST line of your bbpress config.php
Hope that helps.
Update: Adding this – <?php require_once(‘/absolute/path/to/WordPress Parent Directory/wp-blog-header.php’) ?> gives me the blank page when going back to my forum
adding this – require_once( ‘/path/to/wordpress/config/file/wp-config.php’); puts this line of text on top of my forum and does nothing….
I put both lines in the correct place in config.php with the correct absolute path and neither works…any thoughts?
Please help. For the life of me I cant get my WP Header/Footer into BB. Ive followed the instructions here: http://www.adityanaik.com/bbpress-and-wordpress-integration/ but those seem to be old…Either way, ive gone into my template files and replaced bb_get_header() with get_header() and uploaded all of the files and a screenshot into a subfolder in my-templates. When I activate the theme, the theme activates but all i get is a blank page on my forums page…Any thoughts?
bb .81
I don’t know the php code. I followed what was stated above. The URI points to the right folder. When you upload an avatar using the bbpress upload avatar plugin, it renames the image you upload to your username.
$avatar[0] is the filename I believe. Have you checked what’s wrong with the urls?
well, this plugin names the images by username I think. It also has a default image if no avatar has been uploaded… shouldn’t there be some sort of code there to reference a person’s username?
The URL doesn’t point to a valid image file so it just displays the alt text. Check what’s wrong with the URL (and remove the pointless reference to $bbposter->user_login).
I’m confused… I activated that plugin and pasted what you put…but all that is there is the the word “avatar”…. 
I put in the url of the forum… did I do something wrong?
Thanks,
Kahil
Same database but not same codebase. However you can make bb load wp at the start, and you can make wp load bb at the start (that’s the other method). It’s not difficult but not guaranteed to work, because only a few people have done it. It might mean fiddling with things until they work. If you did that, you could do what you were trying.
<?php
/*
Plugin Name: WP Avatars
*/
function wp_aud( $felID ) {
$avatar = get_usermeta( $felID, 'avatar_file' );
$avatar = explode('|', $avatar );
$bburl = 'Plz enter the URL of your bb install here';
echo '<img alt="' . $bbposter->user_login . ' avatar" src="' . $bburl . '/avatars/' . $avatar[0] .'" class="avatar" />';
}
?>
Otherwise you could paste that in a new text file, save it in your plugins folder, activate it and then use this in wordpress:
<?php wp_aud( $comment->user_ID ); ?>
In theory.
I wouldn’t know where or how to insert something like you posted above. I thought that since both wordpress and bbpress were using the same database that all I’d have to do is paste the code. Like this for the avatar plugin I am using in bbpress:
<?php avatarupload_display($user->ID); ?>
I think I’m losing the plot..
just checked the bbpress hot tag and it points internally … so I suppose that while the question remains, the answer is probably “You can’t” – which in turn leads me to raise an enhancement request that such a facility (like the one in wordpress where you can add links to a blogroll on a sidebar)
In fact it would be more useful if these tags could be added on a per forum (or even per topic basis)
Didn’t see ganzua’s post, posted at the same time. 😮
When copy and pasting the code you have to remove any bb dependencies. For example, bb uses the $bbdb; wordpress uses the $wpdb, and for queries and the like you can just switch them. Note that $wpdb does not contain information about the names of bb tables, so $wpdb->topics or the like will not work. In other cases the function names are simply different; bb_get_option() or simply get_option() for example. This code is what I used in bbSync to integrate avatars:
function bbreplyavatar() {
global $bbposter, $opshuns;
$avatar = get_usermeta( $bbposter->ID, 'avatar_file' );
$avatar = explode('|', $avatar );
$bburl = $opshuns['bburl'];
echo '<img alt="' . $bbposter->user_login . ' avatar" src="' . $bburl . '/avatars/' . $avatar[0] .'" class="avatar" />';
}
Note that $opshuns and $bbposter need definition (or changing). bbSync could be quite useful to you actually.
What’s the specific problem you want to solve right now, and what have you tried?
the edit profile link, yes, that was resolved, but I just meant that statement as an example. There are other things from bbpress that I would like to have displayed in my wordpress sidebar.
Well, since you mentioned that the first option can be tricky, lets start with the latter? the php code?
Thanks,
Kahil
Okay, but which do you want to do? I don’t feel qualified to make that decision for you. Can you make a start on either?
“I would like to insert the “edit profile” link and some other stuff into my wordpress sidebar.”
-> I think we have solved this question in the other topic
I would appreciate any help. Whichever is the easiest and will work the best. I’m fairly new to coding myself, but I learn fast. yourkahil.com is where I’m doing this. I have a lil login form in that first box in the sidebar and once you login, it has a couple links now, like logout. I would like to be able to show the user’s avatar with the “upload avatar” plugin, the private message link(s) from the “private message” plugin.
Thanks for the help!
Kahil