<?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 Tag: tabs</title>
<link>http://bbpress.org/forums/</link>
<description>bbPress support forums Tag: tabs</description>
<language>en</language>
<pubDate>Tue, 02 Dec 2008 05:26:22 +0000</pubDate>

<item>
<title>_ck_ on "Duplicate Messages Tab in Private Message Plugin"</title>
<link>http://bbpress.org/forums/topic/duplicate-messages-tab-in-private-message-plugin#post-15476</link>
<pubDate>Thu, 17 Apr 2008 09:31:00 +0000</pubDate>
<dc:creator>_ck_</dc:creator>
<guid isPermaLink="false">15476@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;I had the same problem with my plugins with the avatar tab too. It makes tabs duplicate.&#60;/p&#62;
&#60;p&#62;I'll have to lookup the workaround I did...&#60;/p&#62;
&#60;p&#62;Okay the bug fix I had to use was to wrap the function that adds a tab and check if $self was set.&#60;/p&#62;
&#60;p&#62;ie.&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;function add_tab(blah) {
global $self;
   if (!self) {
     // code that adds tab goes here
   }
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;So what you probably need to do is change this line like so:&#60;br /&#62;
&#60;code&#62;if (!$self &#38;#38;&#38;#38; bb_get_current_user_info( &#38;#39;id&#38;#39; ) == $user_id) {&#60;/code&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>djquinn on "Duplicate Messages Tab in Private Message Plugin"</title>
<link>http://bbpress.org/forums/topic/duplicate-messages-tab-in-private-message-plugin#post-15405</link>
<pubDate>Tue, 15 Apr 2008 17:55:59 +0000</pubDate>
<dc:creator>djquinn</dc:creator>
<guid isPermaLink="false">15405@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;I have the Private Messages plugin and the Avatar plugin both installed, and whenever I click on the Avatar tab in user profiles, I get two Messages tabs. I added the function suggested in the PM plugin forum:&#60;/p&#62;
&#60;p&#62;function add_pm_tab()&#60;br /&#62;
{&#60;br /&#62;
        global $user_id;&#60;br /&#62;
		global $self;&#60;/p&#62;
&#60;p&#62;        if (bb_get_current_user_info( 'id' ) == $user_id) {&#60;br /&#62;
                add_profile_tab(__('Messages'), 'edit_profile', '', 'pm.php');&#60;br /&#62;
        }&#60;br /&#62;
}&#60;br /&#62;
add_action( 'bb_profile_menu', 'add_pm_tab' );&#60;br /&#62;
bb_add_filter('get_bb_location', 'get_mess_bb_location');&#60;br /&#62;
bb_add_filter('get_bb_location', 'get_pm_bb_location');&#60;/p&#62;
&#60;p&#62;To display the PM message tab on the users' profiles. Any idea what's causing the tab to duplicate? It only happens when users click on the Avatar tab in their profile.
&#60;/p&#62;</description>
</item>
<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>
