<?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: Adding Custom Profile Fields</title>
<link>http://bbpress.org/forums/</link>
<description>bbPress Support Forums Topic: Adding Custom Profile Fields</description>
<language>en</language>
<pubDate>Fri, 09 Jan 2009 22:45:14 +0000</pubDate>

<item>
<title>cordoval on "Adding Custom Profile Fields"</title>
<link>http://bbpress.org/forums/topic/adding-custom-profile-fields#post-16607</link>
<pubDate>Wed, 04 Jun 2008 00:52:14 +0000</pubDate>
<dc:creator>cordoval</dc:creator>
<guid isPermaLink="false">16607@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;After spending some days I found a clear well laid out solution here: &#60;a href=&#34;http://bbpress.org/forums/topic/profile-user-specified-fields#post-2670&#34; rel=&#34;nofollow&#34;&#62;http://bbpress.org/forums/topic/profile-user-specified-fields#post-2670&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>cordoval on "Adding Custom Profile Fields"</title>
<link>http://bbpress.org/forums/topic/adding-custom-profile-fields#post-16497</link>
<pubDate>Wed, 28 May 2008 15:32:18 +0000</pubDate>
<dc:creator>cordoval</dc:creator>
<guid isPermaLink="false">16497@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;I have read this thread but it is not clear if there is a well established procedure to add custom fields to the user profile. I hope to sort it out but in the meantime maybe someone out there can add an ordered and well documented step by step procedure.&#60;/p&#62;
&#60;p&#62;Encouragements and many thanks!
&#60;/p&#62;</description>
</item>
<item>
<title>box87 on "Adding Custom Profile Fields"</title>
<link>http://bbpress.org/forums/topic/adding-custom-profile-fields#post-1847</link>
<pubDate>Sat, 02 Dec 2006 02:10:28 +0000</pubDate>
<dc:creator>box87</dc:creator>
<guid isPermaLink="false">1847@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;Alrighty, here's the scoop:&#60;br /&#62;
I added &#60;code&#62;&#38;lt;?php do_action(&#38;#39;extra_profile_info_display&#38;#39;, $user); ?&#38;gt;&#60;/code&#62; to my &#60;code&#62;profile.php&#60;/code&#62; file, right above the second to last line, &#60;code&#62;&#38;lt;?php profile_pages(); ?&#38;gt;&#60;/code&#62;.&#60;/p&#62;
&#60;p&#62;In my &#60;code&#62;template-functions.php&#60;/code&#62; file, I have the following:&#60;br /&#62;
&#60;code&#62;function extra_profile_edit() {&#60;br /&#62;
//Globals&#60;br /&#62;
global $user_id, $bb_current_user,$bbdb;&#60;br /&#62;
// Get dA username, if it exists&#60;br /&#62;
  $da_username = $bbdb-&#38;gt;get_var(&#38;quot;SELECT meta_value FROM $bbdb-&#38;gt;usermeta WHERE meta_key = &#38;#39;da_username&#38;#39; AND user_id = &#38;#39;$user_id&#38;#39;&#38;quot;);&#60;br /&#62;
// Get the user&#38;#39;s real name, if it exists&#60;br /&#62;
  $user_realname = $bbdb-&#38;gt;get_var(&#38;quot;SELECT meta_value FROM $bbdb-&#38;gt;usermeta WHERE meta_key = &#38;#39;user_realname&#38;#39; AND user_id = &#38;#39;$user_id&#38;#39;&#38;quot;);&#60;br /&#62;
// Input fields that have a default value of the set variable&#60;br /&#62;
echo &#38;quot;&#60;br /&#62;
&#38;lt;input&#60;br /&#62;
name=&#38;quot;da_username&#38;quot;&#60;br /&#62;
id=&#38;quot;da_username&#38;quot;&#60;br /&#62;
type=&#38;quot;field&#38;quot;&#60;br /&#62;
value=&#38;quot;$da_username&#38;quot; /&#38;gt;&#60;br /&#62;
.deviantart.com&#60;br /&#62;
&#38;lt;input name=&#38;quot;user_realname&#38;quot;&#60;br /&#62;
id=&#38;quot;user_realname&#38;quot;&#60;br /&#62;
type=&#38;quot;field&#38;quot;&#60;br /&#62;
value=&#38;quot;$user_realname&#38;quot;&#60;br /&#62;
/&#38;gt;&#38;quot;;&#60;br /&#62;
}&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;And now for the real meat of the thing:&#60;br /&#62;
&#60;code&#62;function extra_update() {&#60;br /&#62;
	global $user_id;&#60;br /&#62;
	bb_update_usermeta($user_id, &#38;quot;da_username&#38;quot;, $_POST[&#38;#39;da_username&#38;#39;]);&#60;br /&#62;
	bb_update_usermeta($user_id, &#38;quot;user_realname&#38;quot;, $_POST[&#38;#39;user_realname&#38;#39;]);&#60;br /&#62;
}&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;&#60;code&#62;add_action(&#38;#39;extra_profile_info&#38;#39;, &#38;#39;extra_profile_edit&#38;#39;);&#60;br /&#62;
add_action(&#38;#39;profile_edited&#38;#39;, &#38;#39;extra_update&#38;#39;);&#60;br /&#62;
add_action(&#38;#39;extra_profile_info_display&#38;#39;, &#38;#39;extra_display&#38;#39;);&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;My apologies for the length of the post...
&#60;/p&#62;</description>
</item>
<item>
<title>box87 on "Adding Custom Profile Fields"</title>
<link>http://bbpress.org/forums/topic/adding-custom-profile-fields#post-1845</link>
<pubDate>Sat, 02 Dec 2006 00:21:29 +0000</pubDate>
<dc:creator>box87</dc:creator>
<guid isPermaLink="false">1845@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;I think I've found a solution, by &#60;a href=&#34;http://bbpress.org/forums/search.php?q=extra_profile_info&#34;&#62;searching the forums&#60;/a&#62; (go figure).&#60;br /&#62;
&#60;a href=&#34;http://bbpress.org/forums/topic/313?replies=21#post-1672&#34; rel=&#34;nofollow&#34;&#62;http://bbpress.org/forums/topic/313?replies=21#post-1672&#60;/a&#62;&#60;br /&#62;
I quite like this plugin... I'm going to enable it on my forums.&#60;/p&#62;
&#60;p&#62;I should have realized... I'm adding an action, not a filter...&#60;/p&#62;
&#60;p&#62;[edit] OK, well I'm one step closer, kind of. I need to make a new row (?) for each new profile field.&#60;/p&#62;
&#60;p&#62;[another edit]&#60;br /&#62;
I'm closer: here's the function I need; &#60;code&#62;bb_update_usermeta&#60;/code&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>box87 on "Adding Custom Profile Fields"</title>
<link>http://bbpress.org/forums/topic/adding-custom-profile-fields#post-1844</link>
<pubDate>Fri, 01 Dec 2006 23:38:18 +0000</pubDate>
<dc:creator>box87</dc:creator>
<guid isPermaLink="false">1844@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;Hey there, I'm trying something out here... I made a plugin called &#60;code&#62;template-functions.php&#60;/code&#62; and I'm trying out one thing here.&#60;br /&#62;
If I put this line:&#60;br /&#62;
&#60;code&#62;add_filter(&#60;br /&#62;
&#38;#39;get_profile_info_keys&#38;#39;,&#60;br /&#62;
&#38;#39;extra_profile_info&#38;#39;&#60;br /&#62;
);&#60;br /&#62;
function extra_profile_info () {}&#60;/code&#62;&#60;br /&#62;
my profile info is gone, except for the username field and a password field.&#60;br /&#62;
I can only see the password field if I view the source... It's not visible...&#60;br /&#62;
Still working on it...&#60;/p&#62;
&#60;p&#62;edit: Oh boy, I guess the function extra_profile_info exists! Still going...&#60;br /&#62;
another edit:&#60;br /&#62;
Well now check this out:&#60;br /&#62;
&#60;a href=&#34;http://trac.bbpress.org/changeset/327&#34; rel=&#34;nofollow&#34;&#62;http://trac.bbpress.org/changeset/327&#60;/a&#62;&#60;br /&#62;
10/13/05... &#34;Hooks for extra fields&#34;?&#60;br /&#62;
This is more like it!
&#60;/p&#62;</description>
</item>
<item>
<title>ardentfrost on "Adding Custom Profile Fields"</title>
<link>http://bbpress.org/forums/topic/adding-custom-profile-fields#post-1843</link>
<pubDate>Fri, 01 Dec 2006 23:28:42 +0000</pubDate>
<dc:creator>ardentfrost</dc:creator>
<guid isPermaLink="false">1843@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;Mine is?  Try again, you might have seen it when I was fiddling with something and it errored out.
&#60;/p&#62;</description>
</item>
<item>
<title>Steven19 on "Adding Custom Profile Fields"</title>
<link>http://bbpress.org/forums/topic/adding-custom-profile-fields#post-1842</link>
<pubDate>Fri, 01 Dec 2006 23:11:29 +0000</pubDate>
<dc:creator>Steven19</dc:creator>
<guid isPermaLink="false">1842@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;Your site is down :(
&#60;/p&#62;</description>
</item>
<item>
<title>ardentfrost on "Adding Custom Profile Fields"</title>
<link>http://bbpress.org/forums/topic/adding-custom-profile-fields#post-1841</link>
<pubDate>Fri, 01 Dec 2006 21:59:58 +0000</pubDate>
<dc:creator>ardentfrost</dc:creator>
<guid isPermaLink="false">1841@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;lol, I'm actually working on a PM system as well :)  Post Preview is on my to-do list.&#60;/p&#62;
&#60;p&#62;You can actually view what I have done, am doing, and plan to do on my forums.  &#60;a href=&#34;http://www.rayd.org/forums/&#34; rel=&#34;nofollow&#34;&#62;http://www.rayd.org/forums/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Right now I'm putting some finishing touches down on a memberlist plugin with a really cool admin feature I think everyone will enjoy.&#60;/p&#62;
&#60;p&#62;As for my avatar plugin, I'd love to incorporate what you've done to make it more powerful, or maybe we can make your's pluggable and we can make them work together to make one good plugin :)
&#60;/p&#62;</description>
</item>
<item>
<title>box87 on "Adding Custom Profile Fields"</title>
<link>http://bbpress.org/forums/topic/adding-custom-profile-fields#post-1840</link>
<pubDate>Fri, 01 Dec 2006 21:13:12 +0000</pubDate>
<dc:creator>box87</dc:creator>
<guid isPermaLink="false">1840@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;Awesome, I'll give it a go.&#60;br /&#62;
Funny you mention your avatar plugin... I saw yours but I wasn't crazy about the modification of core files, so I wrote my own upload script. It uploads a JPG, GIF, or PNG file under 20kb, with a fixed resolution of 64x64 px. If any of these conditions aren't met, it spits out an error.&#60;br /&#62;
If your username is &#60;code&#62;UserName&#60;/code&#62;, then the file is named &#60;code&#62;username-avatar.gif&#60;/code&#62; or whatever image extension is.&#60;/p&#62;
&#60;p&#62;I have a simple detection script for the image in the file &#60;code&#62;post.php&#60;/code&#62;. It works for now, but I'd like something a little better. If you'd like a peek at the code just let me know.&#60;/p&#62;
&#60;p&#62;I'm working on a PM system, and a post preview &#34;plugin&#34;... it's slow going though, as college gets in the way quite a considerable bit.&#60;br /&#62;
Thanks,&#60;br /&#62;
Mike
&#60;/p&#62;</description>
</item>
<item>
<title>ardentfrost on "Adding Custom Profile Fields"</title>
<link>http://bbpress.org/forums/topic/adding-custom-profile-fields#post-1839</link>
<pubDate>Fri, 01 Dec 2006 20:34:12 +0000</pubDate>
<dc:creator>ardentfrost</dc:creator>
<guid isPermaLink="false">1839@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;If you go to bb-includes/functions.php you'll see a function called &#34;get_profile_info_keys()&#34;&#60;/p&#62;
&#60;p&#62;This function holds the data you want, but you don't want to adjust that file directly since it's a core file, however, in the current release of my avatar plug-in, you do have to change that line.&#60;/p&#62;
&#60;p&#62;But if you notice, it says &#60;code&#62;return apply_filters( &#38;#39;get_profile_info_keys&#38;#39;, yadda yadda );&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;Anywhere it says &#34;apply_filters&#34; you can make your own.&#60;/p&#62;
&#60;p&#62;So I haven't done this myself yet, though now that I look closer at it, I think I'm going to rerelease my avatar plugin with this change.&#60;/p&#62;
&#60;p&#62;Make a plug-in file in your my-plugins directory and put this in it:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;add_filter( &#38;#39;get_profile_info_keys&#38;#39;, array(&#38;#39;user_email&#38;#39; =&#38;gt; array(1, __(&#38;#39;Email&#38;#39;)), &#38;#39;user_url&#38;#39; =&#38;gt; array(0, __(&#38;#39;Website&#38;#39;)), &#38;#39;from&#38;#39; =&#38;gt; array(0, __(&#38;#39;Location&#38;#39;)), &#38;#39;occ&#38;#39; =&#38;gt; array(0, __(&#38;#39;Occupation&#38;#39;)), etc....&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;And just keep adding stuff til you have everything you want.  the '1' in the &#34;Email&#34; part means that it's required during registration.  Everything else is 0's because they are not required fields... you can, of course, change this.
&#60;/p&#62;</description>
</item>
<item>
<title>box87 on "Adding Custom Profile Fields"</title>
<link>http://bbpress.org/forums/topic/adding-custom-profile-fields#post-1838</link>
<pubDate>Fri, 01 Dec 2006 19:43:44 +0000</pubDate>
<dc:creator>box87</dc:creator>
<guid isPermaLink="false">1838@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;I'm trying to add custom fields to my bbPress profile page, like deviantArt username, real name, etc. How would I go about doing this?&#60;br /&#62;
I was checking out some WordPress custom meta plugins, but they weren't really cutting it.&#60;/p&#62;
&#60;p&#62;I'm running bbPress alongside WordPress, and I've got the integration running just fine.&#60;/p&#62;
&#60;p&#62;My guess is that there's an easy way of doing this. I was picking through the bbPress functions, and there's all kinds of good stuff available.&#60;/p&#62;
&#60;p&#62;Thank you in advance... I must run, I have class to get to.
&#60;/p&#62;</description>
</item>

</channel>
</rss>
