Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'Hide Admin'

Viewing 25 results - 401 through 425 (of 691 total)
  • Author
    Search Results
  • rizingsun
    Participant

    Thanks @bphelp !

    I’m trying to make it so that a user’s “Friends” tab is only visible to that specific user (like “Settings” and “Messages”).

    I think your advice would still enable a user’s friends to see their other friends.

    Is there any way to make it so that the a user’s “Friends” tab is only visible to said user?

    bp-help
    Participant

    You can use this tutorial http://wpmu.org/how-to-add-profile-privacy-to-buddypress/
    its meant for profiles but it can be adapted for friends. Follow it exactly but instead of putting

    3. Edit your theme file to include the friendship check:
    To restrict profile info, open up /members/single/profile.php and add this at the top of the page:

    add that code in 3. instead to /members/single/friends.php

    You may also want to change the test in 2. step to:
    You must be friends in order to access users friends.

    #154620
    bp-help
    Participant

    http://www.mediafire.com/download.php?u6oos92g344485f
    This plugin does not hide the activity tab in the main nav or in the profile activity tab but it does make activity friend only unless your the admin in which case it shows sitewide activity. To test it you would have to create two accounts that are not admins and not friends and put come activity in on both and you will see that as long as your not friends you can not see the others activity.

    #153622
    haughtam
    Participant

    It’s been a while since my original post, but I think I’ve figured this out and I hope this helps someone else.  The original problem changed a bit too.  Basically, now I want to show a profile group based on the value in an xprofile field (when editing a profile).  So, if my User Category field for a logged in user says Recruiter, then I want to show the profile group called “Recruiter” (show this for admins too).  Otherwise, I want to hide this profile group through php.

    Thanks to the hint above, I was able to come up with a function in my child theme’s function.php file.

    I’m just learning php/wordpress, and I don’t have a clear understanding why this works.  I do know that $group_name[3] is the Recruiter profile group.  Also, I do realize this snippet uses awful coding practices.  If anyone has improvements, please let me know.

    function my_recruit($group_name){

    if ( is_site_admin() || xprofile_get_field_data( “User Category”)===”Recruiter”) {

    echo $group_name[0];

    echo $group_name[1];

    echo $group_name[2];

    echo $group_name[3];

    }

    else {

    echo $group_name[0];

    echo $group_name[1];

    echo $group_name[2];

    }

    }

    add_filter(‘xprofile_filter_profile_group_tabs’,’my_recruit’);

    danbpfr
    Participant

    Go to your admin > Pages and delete the register and empty the trash

    Do the same if you have a Login page.

    Then go to settings > buddypress.

    – Tab Component and check the one you want.

    – Tab Pages and create a page from there for each component.

    Save.

    Now BP is correctly configured.

    Check also settings > permalinks and choose something other as default.

    If you created some custom menus before installing BP, double check them to have the new pages.

    Done !

    #148378
    Paul Wong-Gibbs
    Keymaster

    Easiest way is to go to wp-admin on the site you want to hide, go to the Settings > Reading menu, and tick the “Discourage search engines from indexing this site” option. Of course, this will also ask search engines to not index that site.

    #148177
    voopress
    Participant

    That doesn’t seem to hide the main site’s wp-admin login. Each time a user who owns a blog clicks on the main site item at the top left hand side, they are sent to the admin of the top site.

    >You do not have sufficient permissions to access this page.

    #147819

    If you want to hide stuff but want it to be available to Google, you could use CSS and/or jQuery to hide things. Check out this post about how to add BuddyPress-specific body classes:

    CSS Body Class for BuddyPress Group Moderators and Admins

    Here is a post that might help if you want to hide everything from Google: http://premium.wpmudev.org/forums/topic/buddypress-how-do-i-hide-community-elements-from-non-members

    #147394
    Adam
    Participant

    hi there, i have a similar problem on my wordpress multisite, however, unchecking “Show the admin bar for logged out users” doesn’t work for me.
    what’s really weird is, on some websites on my multisite the admin bar shows up but not on others.
    any ideas?

    thanks,
    Adam

    #147244
    mreeder
    Participant

    I solved this problem.

    The plugin “BuddyPress Friends Only Activity Stream” claimed to only show activity from your friends and the admins only. I guess since you can’t be friends with yourself, it hides your activity as well. :/

    I may look into the plugin’s files later to see if there’s a workaround for this, but as of right now it’s staying deactivated.

    #145683
    Ben Hansen
    Participant

    streams are not related to profile fields. stream is created by site activity. i don’t think theres a decent way to hide that other then for admin users using a plugin or by modifying code stuff.

    #145072

    In reply to: Hide My Account Menu

    hughshields
    Participant

    The name of the menu is ‘my-account-buddypress’. This is a buddypress menu and therefore you cannot find it in the wordpress adminbar.php file. It is added when you installed buddypress. You can remove it by adding the following to your theme’s functions.php file:

    function remove_bp_adminbar() {
    global $wp_admin_bar;
    $wp_admin_bar->remove_menu(‘my-account-buddypress’);
    }
    add_action( ‘wp_before_admin_bar_render’, ‘remove_bp_adminbar’ );

    If someone knows the names of the submenus in this buddypress menu I would like to know them so that I can remove the redundant ones (media, forms, friends etc).

    #144322
    David Cavins
    Keymaster

    I think a better bet is to collect that info on the BP registration page and then not display it on the user profile (that way you’ll still be able to use it in other ways). With BP 1.6. you can change the visibility of each xprofile field to friends only, logged-in users, or public (and force that level or allow the user to override your selection). (Visible to admin only is coming in BP 1.7, btw, which would totally fix you up.) At the moment, you can modify your theme template file (themes/yourtheme/members/single/profile/profile-loop.php) to hide some fields like this:
    `about line 17:

    <?php $no_display_fields = array( // Enter the field name of any field that you don't want to appear on the user profile.
    ‘E-mail’,
    ‘Name of Field Hide’,
    ‘Another’
    );

    if ( bp_field_has_data() && !in_array( bp_get_the_profile_field_name(), $no_display_fields ) ) : ?>`

    It’s a hack, but it works for me (until BP 1.7).

    #144223
    meg@info
    Participant

    Hi @wpmirwin, this part of code above is from buddypress Notifcation manager plugin.
    https://wordpress.org/extend/plugins/buddypress-notifications-manager/
    mybe this plugin can help you.

    this function hide the notifications subnav, and it should work in bp 1.5 and bp 1.6

    function bp_hide_notifications_subnav(){
    global $bp;
    bp_core_remove_subnav_item($bp->settings->slug, ‘notifications’);

    if ( bp_use_wp_admin_bar() ) {
    add_action( ‘wp_before_admin_bar_render’, create_function(
    ”, ‘global $bp, $wp_admin_bar; $wp_admin_bar->remove_menu( “my-account-settings-notifications” );’ ) );
    }
    }

    //if is not bp 1.5
    if ( version_compare( BP_VERSION, ‘1.5’ ) < 0 )
    add_action( ‘wp’, ‘bp_hide_notifications_subnav’);
    else
    add_action( ‘bp_setup_nav’, ‘bp_hide_notifications_subnav’ );

    #143525
    benzine
    Participant

    I’m in despair for such a solution right now. So, I think it’s better to have all custom fields mandatory while members can decide whether to hide or show them in public such that they can edit any fields later if they want to. Also, re-register from front end all manually created profiles from dashboard. This is the most plausible solution to me at this time.

    Thanks for your time.

    #143498
    trailmix5
    Participant

    Thanks @modemlooper

    I was able to comment out the entire form with /* and */, but the user is still directed to a general settings page (that is now blank except for the title “General Settings”). Granted this is better than having the password and email field, but is there a way for me to bypass that tab and go straight to the notifications?

    Also, I have settings checked in the admin panel because I want the user to be able to change the notification and privacy preferences. Is that correct?

    I’m not sure why I didn’t think of this before, but I could just hide the tab in CSS (like I did previously) and then use a 301 redirect match in my htaccess from settings to settings/notifications. Huh, is that a viable way to achieve this?

    #143465
    modemlooper
    Moderator

    In BP-default folder you can edit the file members/single/settings/general.php

    Just comment out the form for the settings. BTW did you uncheck settings option in admin?

    Thanks for the rating.

    #142995
    staceym
    Participant

    Here is a solution that works in BuddyPress 1.6. This will prevent new activities from being added and will also prevent the user from showing as recently active. The first option is for admins, the second is for a specific username.

    `
    // Don’t record activity by the site admins or show them as recently active
    function my_admin_stealth_mode(){
    if ( is_site_admin() ) {
    global $bp;
    remove_action(‘wp_head’,’bp_core_record_activity’);
    delete_user_meta($bp->loggedin_user->id, ‘last_activity’);
    }
    }
    add_action(‘init’,’my_admin_stealth_mode’);

    // Don’t record activity for a user or show them as recently active
    function my_user_stealth_mode(){
    $current_user = wp_get_current_user();
    if(is_user_logged_in()) {
    if(‘YourUsername’ == $current_user->user_login) {
    remove_action(‘wp_head’,’bp_core_record_activity’);
    delete_user_meta($current_user->ID, ‘last_activity’);
    }
    }
    }
    add_action(‘init’,’my_user_stealth_mode’);
    `

    #142776
    haagsekak
    Participant

    Awesome, thank you for the great support that you provide.

    I am trying to get away from using the top admin bar and having to go to the dashboard to access the posts, comments and media. So I was able to add the link within your file so that when you logged in you would see the link.

    Below is some of the code I added to your bp-profile-menu.php menu structure between line 33 and 59 sub menu items.
    $items .= '<li id="menu-item" class="menu-item"><a href="http://thevillageblog.com/wp-admin/edit.php">My Articles</a></li>';

    **NOTE: trying to include the code in this post but it shows as html instead of text. If you want I can email the code to you or is there another way to include code in a post and show it as text?

    I tried the same concept using the menu panel instead but did not get the same effect. If you have a trick as to how to hide the links until the user has logged in then I would be very grateful. Otherwise the only thing I can think of is to edit your code again which i’d rather not do.

    Thanks again for your help.

    #141915

    In reply to: BP Test Drive

    r-a-y
    Keymaster

    You should be able to disable the admin bar for logged-out users in the WP admin area by navigating to “Settings > BuddyPress“, then click on the “Settings” tab.

    If someone really wanted to find out if you were using BuddyPress, then it would be quite simple. I would take steps to try and hide the fact you were using WordPress first, then move down the ladder to BuddyPress later on.

    About notifications without the admin bar, there are some third-party plugins available like:
    http://buddydev.com/plugins/buddypress-notifications-widget/ (a widget)

    With BP 1.7, we’ll be adding universal theme compatibility, so we’ll be taking some steps to try and make life without the admin bar a little easier.

    #141890
    meg@info
    Participant

    add_filter(‘show_admin_bar’, ‘__return_false’);

    #141847
    9087877
    Inactive

    I am not certain this is what you desire but check out my blog. I have code snippets that may help you. Read the post and you will understand the end result from the snippet. Have a great day and hope it helps!
    http://ezwebdesign.wordpress.com/2012/09/14/removing-admin-bar-removing-dashboard-access/

    LavishDhand
    Participant

    Hi!

    Can you kindly share how did you actually do this? I need the same for my site.

    1. How did you prevent the friends tab to other users?
    2. Have you figured out the way for messages?

    regards

    #140762
    Ben Hansen
    Participant

    @shawn38 thanks for your help i figured things out after reading this post i also figured out that the plugin does work you just can’t turn it on or off using the new toolbar so what i did was using the custom file to temporarily activate the old toolbar in order to activate the ninja plugin. thanks again for all your help here and on the other topic!

    https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/how-can-i-use-old-buddypress-admin-bar-if-i-dont-want-to-use-this-new-one-in-1-6/

    #140721
    9087877
    Inactive

    Did you wrap the code @mercime gave you in opening and closing php tags? Like this:
    `<?php
    add_action(“plugins_loaded”,”bpdev_init_sm_mode”);
    function bpdev_init_sm_mode(){
    if(is_site_admin())
    remove_action(“wp_head”,”bp_core_record_activity”); //id SM is on, remove the record activity hook
    }
    ?>`

Viewing 25 results - 401 through 425 (of 691 total)
Skip to toolbar