Search Results for 'bp_get_displayed_user_nav'
-
AuthorSearch Results
-
May 28, 2011 at 1:00 am #113229
AlexKalopsia
MemberSorry, looks like I made triple thread -.-
April 11, 2011 at 5:51 pm #110035April 10, 2011 at 9:44 pm #109947r-a-y
Keymaster@nahummadrid – This is a known bug. Using bp_core_remove_nav_item() will remove access to those pages as well. Right now, I’d suggest hiding the nav item via CSS or by hacking the $bp global to remove the item.
April 10, 2011 at 11:43 am #109906Nahum
Participant`function boone_remove_groups_nav() {
bp_core_remove_nav_item( ‘groups’ );
}
add_action( ‘bp_setup_nav’, ‘boone_remove_groups_nav’, 15 );
`
When I put in functions it doesn’t work at all. The only way i get this to work is putting it in the BP-Custom but then it cuts off all access to groups and forum subpages….can’t figure whyMarch 11, 2011 at 4:09 pm #107545In reply to: Customizing profile page navigation strip
nigelanderson
MemberI’ve made some headway but still need help if anyone is able…
I’ve been editing the CSS of my child theme to simply set the display property of the items I want to omit (eg ‘blogs’) to ‘none’ so that they do not show up.
I have also used this to add the logged-in-user-specific links I want to my navigation bar:
<li><a href="#"></a> <ul> </ul> </li>which now displays. I don’t have fine control over it, eg changing the text or altering the order, though I can live with that. But, my CSS trick of locating the element’s id and setting its display property to none doesn’t work in my drop-down menu.
It seems as if I need to actually have bp_get_displayed_user_nav() return a different list than it does by default.
Any ideas?
Thanks!
March 11, 2011 at 11:08 am #107526In reply to: Customizing profile page navigation strip
nigelanderson
MemberPartly answering my own question, from the default buddypress theme I’ve found that the navigation strip is generated by this bit of code:
<div class="item-list-tabs no-ajax" id="object-nav"> <ul> </ul> </div>Could someone explain a little about how this works? I’ve located bp_get_displayed_user_nav() in the bp-core-templatetags file. I’m not sure about the next line.
Thanks!
March 8, 2011 at 10:14 pm #107237IntownWebPros
MemberI tried the solution posted here https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/how-to-remove-and-add-items-in-bp_get_displayed_user_nav#post-71009 and it is not working for me. Is it possible that the code changed with the recent update (I think it was 1.2.
?I could really use some help here.
Thanks in advance.
March 5, 2011 at 2:34 am #106865imjscn
ParticipantLast year Boone’s code worked (I used it in bp-custom.php), now, after several BP upgrades, it generate error message.
Currently, I get erro of “in ……/plugins/invite-anyone/by-email/by-email.php on line 390”February 14, 2011 at 11:51 pm #105425In reply to: Hide Notification Settings
pcwriter
ParticipantTo remove the notifications subnav item, add the following snippet to your functions.php file:
`function remove_notifications_subnav(){
global $bp;
if ( $bp->current_component == $bp->settings->slug ) {
bp_core_remove_subnav_item($bp->settings->slug, ‘notifications’);
}
}
add_action( ‘wp’, ‘remove_notifications_subnav’, 2 );`This is a simple function taken from this post by @mariochampion
https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/how-to-remove-and-add-items-in-bp_get_displayed_user_nav/?topic_page=2&num=15#post-71265Hope this helps!
February 9, 2011 at 7:03 pm #105033In reply to: Where are the functions
modemlooper
Moderatorhas_members()
next_member()
rewind_members()
members()
the_member()
bp_rewind_members()
bp_has_members( $args = ” )
‘type’ => $type,
‘page’ => $page,
‘per_page’ => 20,
‘max’ => false,
‘include’ => false, // Pass a user_id or comma separated list of user_ids to only show these users
‘user_id’ => $user_id, // Pass a user_id to only show friends of this user
‘search_terms’ => $search_terms, // Pass search_terms to filter users by their profile data
‘populate_extras’ => true // Fetch usermeta? Friend count, last active etc.bp_the_member()
bp_members()
//Misc
bp_members_pagination_count()
bp_members_pagination_links()
bp_member_user_id()
bp_get_member_user_id()
bp_member_user_nicename()
bp_get_member_user_nicename()
bp_member_user_login()
bp_get_member_user_login()
bp_member_user_email()
bp_get_member_user_email()
bp_member_is_loggedin_user()
bp_member_avatar( $args = ” )
bp_get_member_avatar( $args = ” )
‘type’ => ‘thumb’,
‘width’ => false,
‘height’ => false,
‘class’ => ‘avatar’,
‘id’ => false,
‘alt’ => __( ‘Member avatar’, ‘buddypress’ )bp_member_permalink()
bp_member_link()
bp_get_member_link()
bp_member_name()
bp_get_member_name()
bp_member_last_active()
bp_get_member_last_active()
bp_member_latest_update( $args = ” )
bp_get_member_latest_update( $args = ” ) {
‘length’ => 15bp_member_profile_data( $args = ” )
‘field’ => false, // Field name
bp_member_registered()
bp_get_member_registered()
bp_member_add_friend_button()
bp_add_friend_button( $members_template->member->id, $friend_status )
bp_member_total_friend_count()
bp_get_member_total_friend_count()
bp_member_random_profile_data()
bp_member_hidden_fields()
bp_directory_members_search_form()
bp_total_site_member_count()
bp_get_total_site_member_count()
//Check bp-core-templatetags.php for comments about nav tags
bp_get_loggedin_user_nav()
bp_get_displayed_user_nav()
bp_get_options_nav()
bp_get_options_title()
//Avatar Tags
bp_has_options_avatar()
bp_get_options_avatar()
bp_comment_author_avatar()
bp_post_author_avatar()
bp_loggedin_user_avatar( $args = ” )
bp_get_loggedin_user_avatar( $args = ” ) {
‘type’=> ‘thumb’,
‘width’=> false,
‘height’=> false,
‘html’=> truebp_displayed_user_avatar( $args = ” )
bp_get_displayed_user_avatar( $args = ” )
‘type’=> ‘thumb’,
‘width’=> false,
‘height’=> false,
‘html’=> truebp_avatar_admin_step()
bp_get_avatar_admin_step()
bp_avatar_to_crop()
bp_get_avatar_to_crop()
bp_avatar_to_crop_src()
bp_get_avatar_to_crop_src()
bp_avatar_cropper()
//Other
bp_site_name()
bp_core_get_wp_profile()
bp_get_profile_header()
bp_exists( $component_name )
bp_format_time( $time, $just_date = false )
bp_word_or_name( $youtext, $nametext, $capitalize = true, $echo = true )
bp_your_or_their( $capitalize = true, $echo = true )
bp_get_plugin_sidebar()
bp_page_title()
bp_get_page_title()
bp_styles()
bp_has_custom_signup_page()
bp_signup_page()
bp_get_signup_page()
bp_has_custom_activation_page()
bp_activation_page()
bp_get_activation_page()
bp_search_form_enabled()
bp_search_form_action()
bp_search_form_type_select()
bp_search_form()
bp_log_out_link()
bp_custom_profile_boxes()
bp_custom_profile_sidebar_boxes()
bp_create_excerpt( $text, $excerpt_length = 55, $filter_shortcodes = true )
bp_is_serialized( $data )
bp_total_member_count()
bp_get_total_member_count()
bp_signup_username_value()
bp_get_signup_username_value()
bp_signup_email_value()
bp_get_signup_email_value()
bp_signup_with_blog_value()
bp_get_signup_with_blog_value()
bp_signup_blog_url_value()
bp_get_signup_blog_url_value()
bp_signup_blog_title_value()
bp_get_signup_blog_title_value()
bp_signup_blog_privacy_value()
bp_get_signup_blog_privacy_value()
bp_signup_avatar_dir_value()
bp_get_signup_avatar_dir_value()
bp_current_signup_step()
bp_get_current_signup_step()
bp_signup_avatar( $args = ” )
bp_get_signup_avatar( $args = ” ) {
‘size’ => BP_AVATAR_FULL_WIDTH,
‘class’ => ‘avatar’,
‘alt’ => __( ‘Your Avatar’, ‘buddypress’ )
bp_signup_allowed()
bp_get_signup_allowed()
bp_blog_signup_allowed()
bp_get_blog_signup_allowed()
bp_account_was_activated()
bp_registration_needs_activation()
bp_mentioned_user_display_name( $user_id_or_username )
bp_get_mentioned_user_display_name( $user_id_or_username )
bp_get_option( $option_name )
bp_ajax_querystring( $object = false )
bp_last_activity( $user_id = false, $echo = true )
bp_user_has_access()
bp_user_firstname()
bp_get_user_firstname()
bp_loggedin_user_link()
bp_get_loggedin_user_link()
bp_loggedinuser_link()
bp_displayed_user_link()
bp_get_displayed_user_link()
bp_user_link()
bp_displayed_user_id()
bp_current_user_id()
bp_loggedin_user_id()
bp_displayed_user_domain()
bp_loggedin_user_domain()
bp_displayed_user_fullname()
bp_get_displayed_user_fullname()
bp_user_fullname() { echo bp_get_displayed_user_fullname()
bp_loggedin_user_fullname()
bp_get_loggedin_user_fullname()
bp_displayed_user_username()
bp_get_displayed_user_username()
bp_loggedin_user_username()
bp_get_loggedin_user_username()
bp_current_component()
bp_current_action()
bp_current_item()
bp_action_variables()
bp_root_domain()
bp_get_root_domain()
//Conditionals
bp_is_blog_page()
bp_is_my_profile()
bp_is_home()
bp_is_front_page()
bp_is_activity_front_page()
bp_is_directory()
bp_is_page($page)
bp_is_active( $component )
bp_is_profile_component()
bp_is_activity_component()
bp_is_blogs_component()
bp_is_messages_component()
bp_is_friends_component()
bp_is_groups_component()
bp_is_settings_component()
bp_is_member()
bp_is_user_activity()
bp_is_user_friends_activity()
bp_is_activity_permalink()
bp_is_user_profile()
bp_is_profile_edit()
bp_is_change_avatar()
bp_is_user_groups()
bp_is_group()
bp_is_group_home()
bp_is_group_create()
bp_is_group_admin_page()
bp_is_group_forum()
bp_is_group_activity()
bp_is_group_forum_topic()
bp_is_group_forum_topic_edit()
bp_is_group_members()
bp_is_group_invites()
bp_is_group_membership_request()
bp_is_group_leave()
bp_is_group_single()
bp_is_user_blogs()
bp_is_user_recent_posts()
bp_is_user_recent_commments()
bp_is_create_blog()
bp_is_user_friends()
bp_is_friend_requests()
bp_is_user_messages()
bp_is_messages_inbox()
bp_is_messages_sentbox()
bp_is_notices()
bp_is_messages_compose_screen()
bp_is_single_item()
bp_is_activation_page()
bp_is_register_page()
bp_the_body_class()
bp_get_the_body_class( $wp_classes, $custom_classes = false )November 16, 2010 at 1:53 pm #98397Justin Frydman
ParticipantHey guys,
Regarding @nuprn1 post, bp_get_displayed_user_nav() is not displaying any tabs on this custom page.
Any ideas?
November 3, 2010 at 9:42 am #97326Roger Coathup
Participant@boonebgorges – given the bug fix / re-engineering is scheduled for 1.3, I’m guessing the best short term workaround is to hard code our own bespoke user nav
October 2, 2010 at 10:10 pm #94072Paul Wong-Gibbs
KeymasterIt is a bug, we have a ticket: https://trac.buddypress.org/ticket/2644
October 2, 2010 at 8:11 pm #94059Patrik
Participant@youngmicroserf I’m having the same issue with the example that @mariochampion provided.
mariochampion or anyone else who knows; it would be very helpfull if you could tell what to change. I assume it’s the xprofile.php file we should copy and edit since I can’t find a file named xprofile-setting.php.
September 25, 2010 at 10:23 am #93364sebastian
ParticipantI have found a solution.
This did what I wanted:
https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/how-to-remove-and-add-items-in-bp_get_displayed_user_nav#post-71009all I had to add was:
if (! is_user_logged_in)Thanks!
September 21, 2010 at 5:09 pm #93042youngmicroserf
ParticipantI’m bumping this because the @-mention above didn’t work, apparently.
for some reason, your suggested solution doesn’t work. I suppose it has to do with the hook, but using bp_core_remove_nav_item(‘groups’) doesn’t work at ‘bp_setup_nav’, while it does work at the point @mariochampion suggested.
Here’s a problem, though, in my installation, when I remove the nav link, I am no longer able to access group pages. I can access the group directory and groups will be displayed there, but clicking on a group will take me to the front page. Is this a bug? It seems like it, since the function is supposed to only remove the navigation item, not access to the feature, am I right? Or am I not getting something? Is there a better way to remove the navigation item?
September 21, 2010 at 6:05 am #92986youngmicroserf
ParticipantHmm. Is this the intended effect? I removed the “groups” element from the navigation bar on the profile using the bp_core_remove_nav_item-function, but after doing that I was no longer able to access any group and after directly entering the group’s URL I will be redirected to the homepage. Is there any way to remove items from the *navigation* but keep them available for direct access? Bizarrely, I am able to display the groups directory page when the bp_core_remove_nav_item(‘groups’)-function is active, but not individual group homepages. Clicking on a group name will take me to the homepage.
Are there other options for menu item removal?
Thanks!
September 21, 2010 at 5:44 am #92984youngmicroserf
Participant@Boone Gorges,
using bp_core_remove_nav_item( ‘blogs’ ) at bp_setup_nav didn’t work for me. But putting it in mariochampions function right after “global $bp” did – any idea why?
sorry, but I’m new to BP, and I can’t find the xprofile-settings.php you’re referring to above – could you give me a hand? Could you also indicate where you changed the slugs in the copied file?
Thanks!
September 20, 2010 at 6:54 am #92908In reply to: Subpage for a users profile
Roger Coathup
ParticipantSeptember 19, 2010 at 4:43 pm #92865Roger Coathup
Participantdetails on removing from the nav bar:
https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/how-to-remove-and-add-items-in-bp_get_displayed_user_nav/September 8, 2010 at 4:41 pm #91885mariochampion
Participantone quick update:
the double add_action is actually taken from an example at bp-core-settings.php (in the bp_core_add_settings_nav() function) NOT bp-xprofile.php, which does in fact use bp_setup_nav to hook into for setting up profile nav/sub-nav items.my guess is bp_core_new_subnav_item adds to an array, and includes a dupe check to the array (if !array_key_exists or some such) because the sub-nav items only show once…
ahh, hooks — a bit like magic!
September 8, 2010 at 4:09 pm #91883Boone Gorges
KeymasterThanks for the example code, @mariochampion. Action order can be a bit mystifying. I assume that your action is working because it’s getting loaded after BP is, otherwise I don’t think it would work. In any case, it’s very helpful to have more data points.
September 8, 2010 at 3:12 pm #91877mariochampion
Participantjust to add to this discussion, concerning what hook to link it to…this is what works for me. i didnt have luck with bp_setup_nav for some reason. i dont recall where i got this example, but think its bp-xprofile.php itself. this worked in both theme>functions.php and in my own mmc_functions.php which i “require()” in functions.php
just to add a hint of background, we are moving these two items to the ‘settings’ tab from the profile tab. the removing is trivial, the adding is trivial, the getting all the right functions/themes/forms called, not so much. but its done and it works.
here is the code for removing sub-tabs — aka options:
`
//removes in a structural way.. no change to bp-xprofile.phpfunction mmc_bpsetupnav_removefromprofile(){
global $bp;if ( $bp->current_component == $bp->profile->slug ) {
bp_core_remove_subnav_item($bp->profile->slug, ‘edit’);
bp_core_remove_subnav_item($bp->profile->slug, ‘change-avatar’);}//end if
}//end function
add_action( ‘wp’, ‘mmc_bpsetupnav_removefromprofile’, 2 );
`here is my code for adding them to the settings tab
`
////////////////////////////////////////////////////////////
////// functions for moving to Settings tab the editprofile/change avatar sub-tabsfunction mmc_bpsetupnav_forsettings(){
global $bp;if ( $bp->current_component == $bp->settings->slug ) {
//define ( ‘BP_XPROFILE_SLUG’, ‘settings’ );//didnt have desirable effects. left her for documentation//this is essentially a clone of xprofile-settings.php, but with tweaks to change BP_XPROFILE_SLUG references tp BP_SETTINGS_SLUG
//that way didnt change any core files, and moved it out of the upgrade stream
require_once( WP_PLUGIN_DIR.’/mmc_misc/functions_xprof_settings_mmc.php’);$profile_link = $bp->loggedin_user->domain . $bp->profile->slug . ‘/’;
$settings_link = $bp->loggedin_user->domain . $bp->settings->slug . ‘/’;//EDIT PROFILE
bp_core_new_subnav_item( array(
‘name’ => __( ‘Edit Profile’, ‘buddypress’ ),
‘slug’ => ‘edit’,
‘parent_url’ => $settings_link,
//’parent_slug’ => $bp->profile->slug, //left for documentation
‘parent_slug’ => $bp->settings->slug,
‘screen_function’ => ‘xprofile_screen_edit_profile_mmc’,
‘position’ => 50, //magic number based on current items already there in SETTINGS tab
‘user_has_access’ => bp_is_my_profile() //ADDED, NOT IN ORIGINAL WHEN IN BP-XPROFILE.PHP
) );//CHANGE AVATAR
bp_core_new_subnav_item( array(
‘name’ => __( ‘Change Avatar’, ‘buddypress’ ),
‘slug’ => ‘change-avatar’,
‘parent_url’ => $settings_link,
//’parent_slug’ => $bp->profile->slug, //left for documentation
‘parent_slug’ => $bp->settings->slug,
‘screen_function’ => ‘xprofile_screen_change_avatar_mmc’,
‘position’ => 60, //magic number based on current items already there in SETTINGS tab
‘user_has_access’ => bp_is_my_profile() //ADDED, NOT IN ORIGINAL WHEN IN BP-XPROFILE.PHP
) );}//end if
}//end function
add_action( ‘wp’, ‘mmc_bpsetupnav_forsettings’, 2 );
add_action( ‘admin_menu’, ‘mmc_bpsetupnav_forsettings’, 2 );
`note the TWO add-actions at the end. also taken from example at bp-xprofile.php. why this and not bp_setup_nav.. i dont know!
ggod luck
marioSeptember 8, 2010 at 2:16 pm #91873Roger Coathup
ParticipantIs it an order of activation issue? i.e. needing to make sure the items are removed after BP has finished adding them, and not before… bp-config.php and functions.php are ‘called’ at different points in the initialisation.
September 8, 2010 at 12:50 pm #91863thekmen
Participant@boonebgorges thanks, got it working by adding it to plugins/bp-custom.php.
wouldn’t work from my own themes functions.php for some reason. -
AuthorSearch Results