<?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: Profile Tabs</title>
<link>http://bbpress.org/forums/</link>
<description>bbPress support forums Topic: Profile Tabs</description>
<language>en</language>
<pubDate>Fri, 10 Oct 2008 23:38:00 +0000</pubDate>

<item>
<title>fel64 on "Profile Tabs"</title>
<link>http://bbpress.org/forums/topic/profile-tabs#post-7130</link>
<pubDate>Mon, 30 Apr 2007 13:48:13 +0000</pubDate>
<dc:creator>fel64</dc:creator>
<guid isPermaLink="false">7130@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;Note that you will have to get rid of the filename check and that all that $user_id business is unnecessary and stopped my script executing. Just grab the global $user.
&#60;/p&#62;</description>
</item>
<item>
<title>louisedade on "Profile Tabs"</title>
<link>http://bbpress.org/forums/topic/profile-tabs#post-7129</link>
<pubDate>Mon, 30 Apr 2007 10:05:52 +0000</pubDate>
<dc:creator>louisedade</dc:creator>
<guid isPermaLink="false">7129@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;Aha!   Thank you Sam!  As fel has already discovered I abandoned any attempt at having &#34;Upload Avatar&#34; as a profile tab.  It's definitely going into the next version.
&#60;/p&#62;</description>
</item>
<item>
<title>fel64 on "Profile Tabs"</title>
<link>http://bbpress.org/forums/topic/profile-tabs#post-7112</link>
<pubDate>Sun, 29 Apr 2007 18:27:37 +0000</pubDate>
<dc:creator>fel64</dc:creator>
<guid isPermaLink="false">7112@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;Should really have been more familiar with the code - there's a check to see if it's the correct file, otherwise it simply redirects to the front page. Getting rid of that made it work.&#60;/p&#62;
&#60;p&#62;Thanks for all your help, Sam! :D
&#60;/p&#62;</description>
</item>
<item>
<title>sambauers on "Profile Tabs"</title>
<link>http://bbpress.org/forums/topic/profile-tabs#post-7111</link>
<pubDate>Sun, 29 Apr 2007 16:39:32 +0000</pubDate>
<dc:creator>sambauers</dc:creator>
<guid isPermaLink="false">7111@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;I tested the second method on the latest build and it passes the bb_repermalink tests and loads.&#60;/p&#62;
&#60;p&#62;I tried using standard URLs and both types of permalinks.&#60;/p&#62;
&#60;p&#62;I didn't try to load a template. I used a file called avatar-upload.php containing the following:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php
require_once(&#38;#39;./bb-load.php&#38;#39;);

bb_repermalink(); // The magic happens here.

echo &#38;#39;test&#38;#39;;
?&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;My test plugin contained:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php
/*
Plugin Name: Test for fel64
Plugin URI:
Description: Test profile tab addition
Author: Scooby Doo
Version: 0.0.1
Author URI:
*/

$bb-&#38;gt;debug = 1;

function felavatartab()
{
	add_profile_tab(__(&#38;#39;Avatar&#38;#39;), &#38;#39;edit_profile&#38;#39;, &#38;#39;moderate&#38;#39;, &#38;#39;avatar-upload.php&#38;#39;);
}

add_action( &#38;#39;bb_profile_menu&#38;#39;, &#38;#39;felavatartab&#38;#39; );
?&#38;gt;&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>fel64 on "Profile Tabs"</title>
<link>http://bbpress.org/forums/topic/profile-tabs#post-7108</link>
<pubDate>Sun, 29 Apr 2007 12:48:41 +0000</pubDate>
<dc:creator>fel64</dc:creator>
<guid isPermaLink="false">7108@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;Cheers Sam, that's definitely the way to do it, but I can't quite make it work. Adding the tab is easy, but following the link dumps you on the front page (if using &#60;code&#62;add_profile_tab()&#60;/code&#62;) or in your profile (if adding the tab manually).&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function felavatartab()
{
	global $profile_menu, $profile_hooks;
	$profile_tab = array(__(&#38;#39;Avatar&#38;#39;), &#38;#39;edit_profile&#38;#39;, &#38;#39;moderate&#38;#39;, &#38;#39;avatar-upload.php&#38;#39;, &#38;#39;avatar&#38;#39;);
	$profile_menu[] = $profile_tab;
	if ( can_access_tab( $profile_tab, bb_get_current_user_info( &#38;#39;id&#38;#39; ), $user_id ) )
		$profile_hooks[bb_tag_sanitize($profile_tab[4])] = $profile_tab[3];
}
add_action( &#38;#39;bb_profile_menu&#38;#39;, &#38;#39;felavatartab&#38;#39; );&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;OR&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;function felavatartab()
{
	add_profile_tab(__(&#38;#39;Avatar&#38;#39;), &#38;#39;edit_profile&#38;#39;, &#38;#39;moderate&#38;#39;, &#38;#39;avatar-upload.php&#38;#39;);
}
add_action( &#38;#39;bb_profile_menu&#38;#39;, &#38;#39;felavatartab&#38;#39; );&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;I've got the file &#60;code&#62;avatar-upload.php&#60;/code&#62; in my root directory, which loads the template &#60;code&#62;avatar.php&#60;/code&#62;. If instead you give &#60;code&#62;avatar.php&#60;/code&#62; as your argument the tab doesn't show up at all.&#60;/p&#62;
&#60;p&#62;See it &#60;a href=&#34;http://forums.loinhead.net/profile/fel64&#34;&#62;here&#60;/a&#62;. Any idea?
&#60;/p&#62;</description>
</item>
<item>
<title>sambauers on "Profile Tabs"</title>
<link>http://bbpress.org/forums/topic/profile-tabs#post-7105</link>
<pubDate>Sun, 29 Apr 2007 11:53:02 +0000</pubDate>
<dc:creator>sambauers</dc:creator>
<guid isPermaLink="false">7105@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;Look at the function global_profile_menu_structure.&#60;/p&#62;
&#60;p&#62;You just need to create a function that pulls in the array variable $profile_menu as a global. Then add to that array in the manner specified in the comments of the function global_profile_menu_structure.&#60;/p&#62;
&#60;p&#62;Should be downhill from there.&#60;/p&#62;
&#60;p&#62;p.s. Would be nice if you could add an entry for it at bbPulp when you are done.
&#60;/p&#62;</description>
</item>
<item>
<title>fel64 on "Profile Tabs"</title>
<link>http://bbpress.org/forums/topic/profile-tabs#post-7062</link>
<pubDate>Fri, 27 Apr 2007 23:42:38 +0000</pubDate>
<dc:creator>fel64</dc:creator>
<guid isPermaLink="false">7062@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;How do you add a tab to the three tabs - &#34;Profile&#34;, &#34;Edit&#34; and &#34;Favourites&#34; - visible only in the profile? I want to add a tab for the avatar and am fairly sure there's a hook &#60;code&#62;bb_profile_menu&#60;/code&#62; but I'm not sure what to do with it. The API certainly supports adding them, the code's there, but I'm not sure how to do it. Anyone know?
&#60;/p&#62;</description>
</item>

</channel>
</rss>
