<?xml version="1.0" encoding="UTF-8"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>bbPress support forums Topic: bbpress info in wordpress?</title>
<link>http://bbpress.org/forums/</link>
<description>bbPress support forums Topic: bbpress info in wordpress?</description>
<language>en</language>
<pubDate>Wed, 03 Dec 2008 03:17:58 +0000</pubDate>

<item>
<title>neyoung on "bbpress info in wordpress?"</title>
<link>http://bbpress.org/forums/topic/bbpress-info-in-wordpress#post-11083</link>
<pubDate>Mon, 24 Sep 2007 19:26:18 +0000</pubDate>
<dc:creator>neyoung</dc:creator>
<guid isPermaLink="false">11083@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;Kahil, your method works well if your users use their login name as their display name.  However if a user who's login is user23 changes his display name to John Doe then your code looks for this image.  /forum/avatars/John Doe.jpg instead of the correct avatar image which would be /forum/avatars/user23.jpg.  I couldn't figure out a clean way to fix this (I'm using wpmu, not wordpress).  But here's a dirty hack.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php
$comment_author_dn = get_comment_author();
$comment_author = $wpdb-&#38;gt;get_row(&#38;quot;SELECT &#38;lt;code&#38;gt;user_login&#38;lt;/code&#38;gt; FROM &#38;lt;code&#38;gt;wp_users&#38;lt;/code&#38;gt; WHERE &#38;lt;code&#38;gt;display_name&#38;lt;/code&#38;gt; = &#38;#39;$comment_author_dn&#38;#39;&#38;quot;);
echo &#38;#39;&#38;lt;img id=&#38;quot;comment-avatar&#38;quot; height=&#38;quot;50&#38;quot; width=&#38;quot;50&#38;quot; src=&#38;quot;/forums/avatars/&#38;#39; . (empty($comment_author-&#38;gt;user_login) ? &#38;quot;default&#38;quot; : $comment_author-&#38;gt;user_login) . &#38;#39;&#38;quot; alt=&#38;quot;avatar&#38;quot; /&#38;gt;&#38;#39;;
?&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;That code should find images for a user if they use a display name or not.  &#60;/p&#62;
&#60;p&#62;/shrug&#60;/p&#62;
&#60;p&#62;I haven't fully tested it, but it seems to work ok.
&#60;/p&#62;</description>
</item>
<item>
<title>Kahil on "bbpress info in wordpress?"</title>
<link>http://bbpress.org/forums/topic/bbpress-info-in-wordpress#post-8585</link>
<pubDate>Thu, 28 Jun 2007 22:07:48 +0000</pubDate>
<dc:creator>Kahil</dc:creator>
<guid isPermaLink="false">8585@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;an update...&#60;/p&#62;
&#60;p&#62;I didn't know until I tried, but you can leave that .jpg out and it will load any image file that matches that query.
&#60;/p&#62;</description>
</item>
<item>
<title>Kahil on "bbpress info in wordpress?"</title>
<link>http://bbpress.org/forums/topic/bbpress-info-in-wordpress#post-8385</link>
<pubDate>Thu, 21 Jun 2007 23:58:53 +0000</pubDate>
<dc:creator>Kahil</dc:creator>
<guid isPermaLink="false">8385@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;YAY!!!  I figured it out!&#60;/p&#62;
&#60;p&#62;&#38;lt;?php global $user_identity;&#60;br /&#62;
get_currentuserinfo();&#60;/p&#62;
&#60;p&#62;if ($user_identity == '') {&#60;br /&#62;
echo('Welcome Guest');&#60;br /&#62;
} else {&#60;br /&#62;
echo('&#38;lt;img src=&#34;/forum/avatars/' . strtolower($user_identity) . '.jpg&#34; alt=&#34;avatar&#34; /&#38;gt;');&#60;br /&#62;
}&#60;br /&#62;
?&#38;gt;
&#60;/p&#62;</description>
</item>
<item>
<title>Kahil on "bbpress info in wordpress?"</title>
<link>http://bbpress.org/forums/topic/bbpress-info-in-wordpress#post-8273</link>
<pubDate>Tue, 19 Jun 2007 21:16:03 +0000</pubDate>
<dc:creator>Kahil</dc:creator>
<guid isPermaLink="false">8273@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;I got to thinking...  being that it renames the image to their usernames, I thought that the following might work, but it doesn't...&#60;/p&#62;
&#60;p&#62;&#38;lt;img src=&#34;http://yourkahil.com/forum/avatars/&#38;lt;?php echo $strtolower($user-&#38;gt;user_identity); ?&#38;gt;.jpg&#34; alt=&#34;avatar&#34; /&#38;gt;&#60;/p&#62;
&#60;p&#62;Shouldn't that work?  I'm trying to get it to display the current username of the person visiting the site, provided they are logged in.  If they aren't logged in it shouldn't display anything.  Later I'd like to figure out how to do an if else statement so that if the visitor isn't logged it, it will display a default image.
&#60;/p&#62;</description>
</item>
<item>
<title>Kahil on "bbpress info in wordpress?"</title>
<link>http://bbpress.org/forums/topic/bbpress-info-in-wordpress#post-8222</link>
<pubDate>Tue, 19 Jun 2007 04:15:09 +0000</pubDate>
<dc:creator>Kahil</dc:creator>
<guid isPermaLink="false">8222@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;by looking at the code for the &#34;upload avatar&#34; plugin I found this...&#60;/p&#62;
&#60;p&#62;        strtolower($user-&#38;gt;user_identity);&#60;/p&#62;
&#60;p&#62;This is what I have now, but nothing displays for the filename, just yourkahil.com/forum/avatars/.jpg&#60;/p&#62;
&#60;p&#62;&#38;lt;?php&#60;br /&#62;
/*&#60;br /&#62;
Plugin Name: WP Avatars&#60;br /&#62;
*/&#60;/p&#62;
&#60;p&#62;function wp_aud( $felID ) {&#60;br /&#62;
        $avatar = strtolower($user-&#38;gt;user_identity);&#60;br /&#62;
	$bburl = 'http://yourkahil.com/forum';&#60;br /&#62;
	echo '&#38;lt;img alt=&#34;avatar&#34; src=&#34;' . $bburl . '/avatars/' . $avatar . '.jpg&#34; class=&#34;avatar&#34; /&#38;gt;';&#60;br /&#62;
}&#60;br /&#62;
?&#38;gt;
&#60;/p&#62;</description>
</item>
<item>
<title>Kahil on "bbpress info in wordpress?"</title>
<link>http://bbpress.org/forums/topic/bbpress-info-in-wordpress#post-8218</link>
<pubDate>Tue, 19 Jun 2007 03:46:43 +0000</pubDate>
<dc:creator>Kahil</dc:creator>
<guid isPermaLink="false">8218@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;Ok, so I've figured out some more info to share...&#60;/p&#62;
&#60;p&#62;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.  &#60;/p&#62;
&#60;p&#62;Next, I've figured out that the &#34;avatar upload&#34; plugin for bbpress does rename the images to the user's username, but makes it all lowercase letters if there are any caps.&#60;/p&#62;
&#60;p&#62;Hope that helps.&#60;/p&#62;
&#60;p&#62;Thank you!!
&#60;/p&#62;</description>
</item>
<item>
<title>Kahil on "bbpress info in wordpress?"</title>
<link>http://bbpress.org/forums/topic/bbpress-info-in-wordpress#post-8184</link>
<pubDate>Mon, 18 Jun 2007 16:29:52 +0000</pubDate>
<dc:creator>Kahil</dc:creator>
<guid isPermaLink="false">8184@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;It is pointing to the correct folder, just isn't pointing to any file like it should.
&#60;/p&#62;</description>
</item>
<item>
<title>fel64 on "bbpress info in wordpress?"</title>
<link>http://bbpress.org/forums/topic/bbpress-info-in-wordpress#post-8172</link>
<pubDate>Mon, 18 Jun 2007 09:15:45 +0000</pubDate>
<dc:creator>fel64</dc:creator>
<guid isPermaLink="false">8172@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;Forget about the PHP.&#60;/p&#62;
&#60;p&#62;Where it just says &#34;avatar&#34; instead of displaying the image, open the page source (in FF: Ctrl + U, in IE: probably something), then search for &#34;avatar&#34; until you hit the right place. There should be an image tag. Look at the &#60;code&#62;src&#60;/code&#62; property. Does that URL point to a valid image file? If not, what does it read?
&#60;/p&#62;</description>
</item>
<item>
<title>Kahil on "bbpress info in wordpress?"</title>
<link>http://bbpress.org/forums/topic/bbpress-info-in-wordpress#post-8159</link>
<pubDate>Sun, 17 Jun 2007 22:17:07 +0000</pubDate>
<dc:creator>Kahil</dc:creator>
<guid isPermaLink="false">8159@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;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.
&#60;/p&#62;</description>
</item>
<item>
<title>fel64 on "bbpress info in wordpress?"</title>
<link>http://bbpress.org/forums/topic/bbpress-info-in-wordpress#post-8152</link>
<pubDate>Sun, 17 Jun 2007 17:09:24 +0000</pubDate>
<dc:creator>fel64</dc:creator>
<guid isPermaLink="false">8152@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;$avatar[0] is the filename I believe. Have you checked what's wrong with the urls?
&#60;/p&#62;</description>
</item>
<item>
<title>Kahil on "bbpress info in wordpress?"</title>
<link>http://bbpress.org/forums/topic/bbpress-info-in-wordpress#post-8150</link>
<pubDate>Sun, 17 Jun 2007 17:01:01 +0000</pubDate>
<dc:creator>Kahil</dc:creator>
<guid isPermaLink="false">8150@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;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?
&#60;/p&#62;</description>
</item>
<item>
<title>fel64 on "bbpress info in wordpress?"</title>
<link>http://bbpress.org/forums/topic/bbpress-info-in-wordpress#post-8144</link>
<pubDate>Sun, 17 Jun 2007 09:12:52 +0000</pubDate>
<dc:creator>fel64</dc:creator>
<guid isPermaLink="false">8144@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;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-&#38;gt;user_login).
&#60;/p&#62;</description>
</item>
<item>
<title>Kahil on "bbpress info in wordpress?"</title>
<link>http://bbpress.org/forums/topic/bbpress-info-in-wordpress#post-8133</link>
<pubDate>Sat, 16 Jun 2007 23:21:12 +0000</pubDate>
<dc:creator>Kahil</dc:creator>
<guid isPermaLink="false">8133@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;I'm confused...  I activated that plugin and pasted what you put...but all that is there is the the word &#34;avatar&#34;....  :(&#60;/p&#62;
&#60;p&#62;I put in the url of the forum...  did I do something wrong?&#60;/p&#62;
&#60;p&#62;Thanks,&#60;br /&#62;
Kahil
&#60;/p&#62;</description>
</item>
<item>
<title>fel64 on "bbpress info in wordpress?"</title>
<link>http://bbpress.org/forums/topic/bbpress-info-in-wordpress#post-8132</link>
<pubDate>Sat, 16 Jun 2007 23:02:06 +0000</pubDate>
<dc:creator>fel64</dc:creator>
<guid isPermaLink="false">8132@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;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.&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php
/*
Plugin Name: WP Avatars
*/

function wp_aud( $felID ) {
	$avatar = get_usermeta( $felID, &#38;#39;avatar_file&#38;#39; );
	$avatar = explode(&#38;#39;&#124;&#38;#39;, $avatar );
	$bburl = &#38;#39;Plz enter the URL of your bb install here&#38;#39;;
	echo &#38;#39;&#38;lt;img alt=&#38;quot;&#38;#39; . $bbposter-&#38;gt;user_login . &#38;#39; avatar&#38;quot; src=&#38;quot;&#38;#39; . $bburl . &#38;#39;/avatars/&#38;#39; . $avatar[0] .&#38;#39;&#38;quot; class=&#38;quot;avatar&#38;quot; /&#38;gt;&#38;#39;;
}
?&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Otherwise you could paste that in a new text file, save it in your plugins folder, activate it and then use this in wordpress:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#38;lt;?php wp_aud( $comment-&#38;gt;user_ID ); ?&#38;gt;&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;In theory.
&#60;/p&#62;</description>
</item>
<item>
<title>Kahil on "bbpress info in wordpress?"</title>
<link>http://bbpress.org/forums/topic/bbpress-info-in-wordpress#post-8131</link>
<pubDate>Sat, 16 Jun 2007 22:27:30 +0000</pubDate>
<dc:creator>Kahil</dc:creator>
<guid isPermaLink="false">8131@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;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:&#60;/p&#62;
&#60;p&#62;      &#38;lt;?php avatarupload_display($user-&#38;gt;ID); ?&#38;gt;
&#60;/p&#62;</description>
</item>
<item>
<title>fel64 on "bbpress info in wordpress?"</title>
<link>http://bbpress.org/forums/topic/bbpress-info-in-wordpress#post-8128</link>
<pubDate>Sat, 16 Jun 2007 20:37:11 +0000</pubDate>
<dc:creator>fel64</dc:creator>
<guid isPermaLink="false">8128@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;Didn't see ganzua's post, posted at the same time. :o&#60;/p&#62;
&#60;p&#62;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-&#38;gt;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:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;function bbreplyavatar() {
	global $bbposter, $opshuns;
	$avatar = get_usermeta( $bbposter-&#38;gt;ID, &#38;#39;avatar_file&#38;#39; );
	$avatar = explode(&#38;#39;&#124;&#38;#39;, $avatar );
	$bburl = $opshuns[&#38;#39;bburl&#38;#39;];
	echo &#38;#39;&#38;lt;img alt=&#38;quot;&#38;#39; . $bbposter-&#38;gt;user_login . &#38;#39; avatar&#38;quot; src=&#38;quot;&#38;#39; . $bburl . &#38;#39;/avatars/&#38;#39; . $avatar[0] .&#38;#39;&#38;quot; class=&#38;quot;avatar&#38;quot; /&#38;gt;&#38;#39;;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Note that $opshuns and $bbposter need definition (or changing). bbSync could be quite useful to you actually.&#60;/p&#62;
&#60;p&#62;What's the specific problem you want to solve right now, and what have you tried?
&#60;/p&#62;</description>
</item>
<item>
<title>Kahil on "bbpress info in wordpress?"</title>
<link>http://bbpress.org/forums/topic/bbpress-info-in-wordpress#post-8125</link>
<pubDate>Sat, 16 Jun 2007 20:20:59 +0000</pubDate>
<dc:creator>Kahil</dc:creator>
<guid isPermaLink="false">8125@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;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.&#60;/p&#62;
&#60;p&#62;Well, since you mentioned that the first option can be tricky, lets start with the latter? the php code?&#60;/p&#62;
&#60;p&#62;Thanks,&#60;br /&#62;
Kahil
&#60;/p&#62;</description>
</item>
<item>
<title>fel64 on "bbpress info in wordpress?"</title>
<link>http://bbpress.org/forums/topic/bbpress-info-in-wordpress#post-8121</link>
<pubDate>Sat, 16 Jun 2007 18:14:40 +0000</pubDate>
<dc:creator>fel64</dc:creator>
<guid isPermaLink="false">8121@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;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?
&#60;/p&#62;</description>
</item>
<item>
<title>ganzua on "bbpress info in wordpress?"</title>
<link>http://bbpress.org/forums/topic/bbpress-info-in-wordpress#post-8119</link>
<pubDate>Sat, 16 Jun 2007 18:02:40 +0000</pubDate>
<dc:creator>ganzua</dc:creator>
<guid isPermaLink="false">8119@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;&#34;I would like to insert the &#34;edit profile&#34; link and some other stuff into my wordpress sidebar.&#34;&#60;/p&#62;
&#60;p&#62;-&#38;gt; I think we have solved this question in the other topic ;-)
&#60;/p&#62;</description>
</item>
<item>
<title>Kahil on "bbpress info in wordpress?"</title>
<link>http://bbpress.org/forums/topic/bbpress-info-in-wordpress#post-8116</link>
<pubDate>Sat, 16 Jun 2007 17:41:23 +0000</pubDate>
<dc:creator>Kahil</dc:creator>
<guid isPermaLink="false">8116@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;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 &#34;upload avatar&#34; plugin, the private message link(s) from the &#34;private message&#34; plugin. &#60;/p&#62;
&#60;p&#62;Thanks for the help!&#60;/p&#62;
&#60;p&#62;Kahil
&#60;/p&#62;</description>
</item>
<item>
<title>fel64 on "bbpress info in wordpress?"</title>
<link>http://bbpress.org/forums/topic/bbpress-info-in-wordpress#post-8093</link>
<pubDate>Fri, 15 Jun 2007 18:00:27 +0000</pubDate>
<dc:creator>fel64</dc:creator>
<guid isPermaLink="false">8093@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;Yeah. That's because WP doesn't load bb and all the associated functions. You have two options: you could set up wp to always load bb, or you could recreate the functionality yourself. The first could be tricky and fiddly, the latter means coding the PHP yourself. We can help with either.
&#60;/p&#62;</description>
</item>
<item>
<title>Kahil on "bbpress info in wordpress?"</title>
<link>http://bbpress.org/forums/topic/bbpress-info-in-wordpress#post-8088</link>
<pubDate>Fri, 15 Jun 2007 17:16:33 +0000</pubDate>
<dc:creator>Kahil</dc:creator>
<guid isPermaLink="false">8088@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;Those two plugins don't help at all.  Basically if you have a lil php code that you have in your bbpress theme to display anything from display names, profile info or the avatar when using upload avatar plugin....when you paste that code on the wordpress side you get an error.
&#60;/p&#62;</description>
</item>
<item>
<title>pravin on "bbpress info in wordpress?"</title>
<link>http://bbpress.org/forums/topic/bbpress-info-in-wordpress#post-8080</link>
<pubDate>Fri, 15 Jun 2007 06:55:25 +0000</pubDate>
<dc:creator>pravin</dc:creator>
<guid isPermaLink="false">8080@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;Try this link &#60;a href=&#34;http://bbpress.org/documentation/faq/#integration-plugins&#34; rel=&#34;nofollow&#34;&#62;http://bbpress.org/documentation/faq/#integration-plugins&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>Kahil on "bbpress info in wordpress?"</title>
<link>http://bbpress.org/forums/topic/bbpress-info-in-wordpress#post-8078</link>
<pubDate>Fri, 15 Jun 2007 04:59:04 +0000</pubDate>
<dc:creator>Kahil</dc:creator>
<guid isPermaLink="false">8078@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;How do I insert info from bbpress into wordpress?  I would like to insert the &#34;edit profile&#34; link and some other stuff into my wordpress sidebar.&#60;/p&#62;
&#60;p&#62;Thanks
&#60;/p&#62;</description>
</item>

</channel>
</rss>
