Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'Hide Admin'

Viewing 25 results - 76 through 100 (of 615 total)
  • Author
    Search Results
  • jackmaa1
    Participant

    Hi moefahmy
    Can you please provide me the way to hide what’s new textbox if not an admin.
    I need to restrict users other than admin to post update.

    davidhere
    Participant

    Hi folks, new BuddyPress user here. (Using BP 3.1.0, WP 4.9.8, site in development)

    I’m looking to use BP for the following specific functionality:

    1) Allow our members to post updates on their own profile (privately) for their own reference (diary style), which they will be able to review themselves later, over time.
    2) It would be great if the admin user(s) could post comments on their diary entries too.

    First hurdle: I would like to know how to “hide” certain elements of BuddyPress. When I go to the Activity page for a test user, besides the activity entry box and feed, I see links to toggle between “All Users” and “Mentions”. Then there’s an RSS link, a “Search Activity” box (might keep that, sure), and a dropdown for ‘Everything’ and some other options.

    My first question: How do I go about hiding / disabling the functionality I don’t want our members to see/use? Should I edit plugins/buddypress/bp-activity/bp-activity-template.php ? Is this a good idea? :-O

    Second question: Changing references of “Activity” to, say, “Diary” — is this best done with a translate plugin (e.g. LocoTranslate)?

    3rd question: How would I enable admins the ability to add comments within a member’s activity stream (e.g. respond to specific entries)? Does anyone have any ideas on that? Is there another plugin somewhere that enables such functionality, perhaps?

    Thanks for advice/tips you can give!
    David.

    offworld21
    Participant

    Hi,

    Is it possible to change the text of the Register Button from ‘Register’ to ‘Join us’? I’d also like to have the destination when the button is clicked to be a page with an AgileCRM form form, instead of either the BuddyPress or PMPro form (both of which I’m using). The reason for this is that I initially need new sign-ups to go straight into AgileCRM for manual approval, after which their user account will be manually created on WordPress by an admin, and the new user details emailed.

    Ideally I’d like new users to complete sign-up and be manually approved, whilst at the same time their details being sent to AgileCRM and a new contact created. I’ve tried this but even though I’ve set new sign-ups for manual approval, a new account is created (albeit with limited access), and they are immediately logged into the site. I cannot see a way to change this.

    I also tried using Zapier to pull new users into AgileCRM from WordPress but that too didn’t seem to work, event though when going through the testing stage it created a record in AgileCRM.

    I’m using PMPro because the client is looking to take online payments for sign-ups in the future, and want to retain the functionality and option to use the PMPro register page in the future.

    Current set-up:
    WordPress – 4.9.7
    Theme: Boss Child Theme
    Plugins:
    Agile CRM – v1.1
    All-in-One WP Migration – v6.72
    bbPress – v2.5.14
    BuddyBoss One Click Installer – v1.0.6
    BuddyBoss Products Updater – v1.0.2
    BuddyPress – v3.1.0
    BuddyPress Docs – v2.1.0
    BuddyPress Follow – v1.2.2
    BuddyPress Global Search – v1.1.9
    Hide Admin Bar From Non-admins – v1.0
    Import Users from CSV – v1.0.0
    Page Builder by SiteOrigin – v2.7.3
    Paid Memberships Pro – v1.9.5.3
    Paid Memberships Pro – Add Member Admin – v.4
    Paid Memberships Pro – Advanced Levels Page Shortcode Add On – v.2.4
    Paid Memberships Pro – Approvals Add On – v1.0.4
    Paid Memberships Pro – bbPress Add On – v1.5.5
    Paid Memberships Pro – BuddyPress Add On – v1.1.1
    Paid Memberships Pro – Email Templates Add On – v0.7.1
    Paid Memberships Pro – Membership Manager Role Add On – v.3.1
    Regenerate Thumbnails – v3.0.2
    SiteOrigin Widgets Bundle – 1.12.1
    The Events Calendar – v4.6.20.1

    Please let me know if you need any further information.

    Thanks in advance.

    #274832
    Venutius
    Moderator

    Here is a profile redirect script:

    function bpfr_hide_admins_profile() {
    global $bp;
    if(bp_is_profile && $bp->displayed_user->id == 1 && $bp->loggedin_user->id != 1) :
    wp_redirect( home_url() );
    exit;
    endif;
    }
    add_action( 'wp', 'bpfr_hide_admins_profile', 1 );

    This one redirects for user_id == 1, you could replace this with a function that checks the profile completeness.

    Shashi Kumar
    Participant

    @janurmas

    1. To hide admin bar to non-logged in user, you can use a plugin name Remove Dashboard Access.

    2. There is no direct method to make BuddyPress profile page full-width. You can achieve this by editing Buddypress templates. To do this
    Create a child theme
    Put Buddypress folder in your child theme and edit the profile template. To do we should understand the templating system of Buddypress. Here is a tutorial for that.

    3. You can use a plugin by Buddydev which lets you write posts from front end and add blog tab under user’s profile menu.

    Hope this help you.

    balebond
    Participant

    Just a follow up. I got the method from this link to work and it hides the “whats new” form from non-admins on the group page.

    However, now I notice that users still get the group in their “Post in:” list on their personal activity page and can circumvent. So, trying to figure this part out next.

    Anyone know how to restrict that dropdown?

    #273569

    In reply to: wordpress top bar

    Venutius
    Moderator

    There’s a number of plugins that will allow you to remove the wp-admin top bar, just search the plugin directory.

    Hide Admin Bar

    #272887
    Venutius
    Moderator

    Yep that’s the WordPress Admin Bar. The only BP setting that affects this is that you can hide the entire bar for non logged in users via Settings>>BuddyPress>>Options.

    As I said there’s a lot of plugins that will help you style this bar, just search WP Plugins for admin bar and you will find them.

    #272711
    Venutius
    Moderator

    Update – the following works:

    function venutius_hide_tab() {
    	if ( !is_super_admin() ) {
    		bp_core_remove_subnav_item( 'settings', 'general' ); 
    	}
    }
    add_action( 'bp_setup_nav', 'venutius_hide_tab', 15 );

    However it causes a page not found error when you click on Settings, this is due to the removed nav item being the default tab for the settings link. I’m currently trying to find the right code to reset this default.

    #272695
    Venutius
    Moderator

    So you could add something like the following to your functions or bp-custom.php:

    function venutius_hide_tab() {
    	if ( !is_super_admin() && !bp_is_my_profile() ) {
    		bp_core_remove_subnav_item( 'settings', 'general' ); 
    	}
    }
    add_action( 'bp_setup_nav', 'venutius_hide_tab', 15 );
    #272624
    panosa1973
    Participant

    @venutius you were right on the money! This worked. Now a member can see their Friends menu item even when they’re on another member’s profile but without having access to the other member’s friends. And you said it was gonna be difficult. Hah! 🙂
    Thank you yet again!

    function hide_friends_tab() {
    	global $bp;
    	if ( !bp_is_my_profile() && !is_super_admin() ) {
    		bp_core_remove_nav_item( 'friends' ); 
    
    		bp_core_new_nav_item( 
        	        array( 
                    'name' => __('Friends', 'buddypress'), 
                    'slug' =>  $bp->friends->slug, 
                    'position' => 50, 
                    'show_for_displayed_user' => false,
                    'default_subnav_slug' => 'friends'
        ));
    	
    	}
    }
    add_action( 'bp_setup_nav', 'hide_friends_tab', 15 );
    Venutius
    Moderator

    What plugin did you use to add the option to only display a menu item to logged in users? Seems like that is what is not functioning. hiding the activity link by hiding the menu item does not hide the activity page from non logged in users, if they know the url they will still be able to view it, to prevent that you should explore the security options available to you. There a number of privacy plugins for bp with a range of features, is it only the Activity page you want to hide?

    BuddyPress uses the default WordPress login page, there’s a number of customisers for this, for example: https://wordpress.org/plugins/admin-custom-login/

    #272469
    panosa1973
    Participant

    I managed to hide the View tab with CSS:

    function remove_some_tabs() {
        if ( !is_super_admin()) {
    		//This hides the View tab
    		echo '<style>li#public-personal-li {Display: none;} </style>';
    		//This hides the additional members input box when sending a msg
    		echo '<style>#send-to-input {Display: none;} </style>';        
    	}
    }
    add_action( 'wp_head', 'remove_some_tabs');
    #272344

    In reply to: Hiding the admin user

    shanebp
    Moderator

    You could use the overload method.
    imo, using hooks is easier.

    For example, to hide admin users from the members loop, you could put this into bp-custom.php… untested…

    function grw_members_loop_ghosts( $retval ) {
    
        if ( bp_is_members_directory() ) {
    
            $admins = get_users( array(
    				'fields' => 'ID',
    				'role'   => 'administrator',
    			      ));
            
            $admins = implode(',', $admins );
    
            $retval['exclude'] = $admins;
        }
    
        return $retval;
    }
    add_filter( 'bp_before_has_members_parse_args', 'grw_members_loop_ghosts' );
    #271107
    kwavewd
    Participant

    this code works perfectly to block the admin

    // deny access to admins profile. User is redirected to the homepage
    function bpfr_hide_admins_profile() {
    global $bp;
    if(bp_is_profile && $bp->displayed_user->id == 1 && $bp->loggedin_user->id != 1) :
    wp_redirect( home_url() );
    exit;
    endif;
    }
    add_action( ‘wp’, ‘bpfr_hide_admins_profile’, 1 );

    can’t we just change

    if(bp_is_profile && $bp->displayed_user->id == 1 && $bp->loggedin_user->id != 1) :
    wp_redirect( home_url() );

    and make it subscribers in stead of id and loggedin d?

    #270027
    leog371
    Participant

    Just to be sure of what your asking, Are you trying to hide these from everyone including the person who owns the profile?

    Just in case you dont want to hide them from the profile owner, you should know that any links that are edit, upload rtmedia links only display for the profile owner and no one else and most other things like this are hidden by default from users and friends anyways. Only a profile owner can upload and make changes to his profile or post activity on their profiles.

    Also, each member has privacy options in their profile settings. You can set defaults in the dashboard for this as well.

    If this is not the case, could you clarify what you hope to achieve?

    If you simply wish to remove links for everyone in your site including the profile owner, just use something like this in bp-custom.php file

    /* Example to Remove subnav tabs from Group Settings  https://codex.buddypress.org/developer/navigation-api/#examples*/ 	
    	function remove_group_manager_subnav_tabs() {   
        // site admin will see all tabs
        if ( ! bp_is_group() || ! ( bp_is_current_action( 'admin' ) && bp_action_variable( 0 ) ) || is_super_admin() ) {
            return;
        }
           // all subnav items are listed here.
           // comment those you want to show
            $hide_tabs = array(             
            //  'group-settings'    => 1,
            //    'delete-group'      => 1,
             //   'group-avatar'      => 1,
            //  'group-invites'     => 1,
             //   'manage-members'    => 1,
            //  'forum'             => 1,
            //  'group-cover-image' => 1
            );
                       
            $parent_nav_slug = bp_get_current_group_slug() . '_manage';
      
        //Remove the nav items
        foreach ( array_keys( $hide_tabs ) as $tab ) {
            bp_core_remove_subnav_item( $parent_nav_slug, $tab, 'groups' );
        }   
    }
    add_action( 'bp_actions', 'remove_group_manager_subnav_tabs' );
    #269956
    leog371
    Participant
    /* Example to Change item names of user’s and group’s nav menus ...
    Profile Menu https://codex.buddypress.org/developer/navigation-api/#examples
    */ 
    function bpcodex_rename_profile_tabs() {
      
          buddypress()->members->nav->edit_nav( array( 'name' => __( 'My Forums', 'textdomain' ) ), 'forums' );
          buddypress()->members->nav->edit_nav( array( 'name' => __( 'MY Groups', 'textdomain' ) ), 'groups' );
      
    }
    add_action( 'bp_actions', 'bpcodex_rename_profile_tabs' );
    /* Example to Rename Group Menus https://codex.buddypress.org/developer/navigation-api/#examples*/ 	
    function bpcodex_rename_group_tabs() {
     
        if ( ! bp_is_group() ) {
            return;
        }
        
        buddypress()->groups->nav->edit_nav( array( 'name' => __( 'Group Discussion', 'buddypress' ) ), 'forum', bp_current_item() );
    	buddypress()->groups->nav->edit_nav( array( 'name' => __( 'Group Members', 'buddypress' ) ), 'members', bp_current_item() );
    	buddypress()->groups->nav->edit_nav( array( 'name' => __( 'Group Activity', 'buddypress' ) ), 'home', bp_current_item() );
    }
    add_action( 'bp_actions', 'bpcodex_rename_group_tabs' );	
    	
    /* Example to Remove subnav tabs from Group Settings  https://codex.buddypress.org/developer/navigation-api/#examples*/ 	
    	function bpcodex_remove_group_manager_subnav_tabs() {   
        // site admin will see all tabs
        if ( ! bp_is_group() || ! ( bp_is_current_action( 'admin' ) && bp_action_variable( 0 ) ) || is_super_admin() ) {
            return;
        }
           // all subnav items are listed here.
           // comment those you want to show
            $hide_tabs = array(             
            //  'group-settings'    => 1,
            //    'delete-group'      => 1,
             //   'group-avatar'      => 1,
            //  'group-invites'     => 1,
             //   'manage-members'    => 1,
            //  'forum'             => 1,
            //  'group-cover-image' => 1
            );
                       
            $parent_nav_slug = bp_get_current_group_slug() . '_manage';
      
        //Remove the nav items
        foreach ( array_keys( $hide_tabs ) as $tab ) {
            bp_core_remove_subnav_item( $parent_nav_slug, $tab, 'groups' );
        }   
    }
    add_action( 'bp_actions', 'bpcodex_remove_group_manager_subnav_tabs' );
    
    #269331
    HDcms
    Participant

    Hello Gorges
    And thank you 🙂

    In fact, I want to hide these tabs to everyone except for a wordpress role and the super admin
    It works (a priori) but do not hesitate to suggest an improvement.
    I am not sure of my code!

    Regards

    add_action('wp_head', 'HD_maj_activite');
    function HD_maj_activite() {
    	$bp_loggedin_user_id = bp_loggedin_user_id();
    	$user_info = get_userdata($bp_loggedin_user_id);
    	$user_roles = $user_info->roles;
    	if (is_super_admin() || in_array('membre2', $user_roles)) 
     	return ;
    	$output .= '<style type="text/css">body.activity.directory #activity-friends {display: none;}</style>';
    	$output .= '<style type="text/css">body.activity.directory #activity-groups {display: none;}</style>';
       echo $output; // 
    }
    Kookidooki
    Participant

    Hello Boone,

    Thank you for your input.

    I’ve checked permission status of uploads: 755.

    Cleared all caches, Cloudflare, and pauzed SSL but still no luck with the posting of updates or uploading of images in posts, activity stream or in Media Library (shows a blank page, no thumbnails, etc.).

    But on top of this I’ve found other (probably related) problems:

    1. Even our administrators couldn’t create new user accounts or update existing accounts. All we see is an avatar, no name, email, no edit,etc. See image below:

    users

    2. Database error:
    WordPress database error: [Duplicate entry ‘0’ for key ‘PRIMARY’] 
INSERT INTO kuyrsd79sdn_bp_activity ( user_id, component, type, action, content, primary_link, date_recorded, item_id, secondary_item_id, hide_sitewide, is_spam ) VALUES ( 82, ‘activity’, ‘activity_update’,

    MySQL said:
    #1062 – Duplicate entry ‘0’ for key ‘PRIMARY’

    3 SQL query:


    — Indexes for table kuyrsd79sdn_options

    ALTER TABLE kuyrsd79sdn_options
    ADD PRIMARY KEY (option_id),
    ADD UNIQUE KEY option_name (option_name),
    ADD KEY wpe_autoload_options_index (autoload)

    Any idea how to fix this?

    naomibuch
    Participant

    Hi Again,

    This is a list of all my plugins:

    WP Mail SMTP
    WP Crontrol
    WP All Import Pro
    WordPress Mass Email to users
    WordPress Importer
    W3 Total Cache
    tagDiv Social Counter
    tagDiv Composer
    SiteOrigin Widgets Bundle
    Shortcodes Ultimate
    rtMedia for WordPress, BuddyPress and bbPress
    RSS Importer
    Remove Dashboard Access
    PushLive – Staging Site to Live Site in One Click
    Page Builder by SiteOrigin
    Newsletter
    Knowledge Base for Documents and FAQs
    Invite Anyone, by Boones 🙂
    iframe
    Hide This
    Hide Admin Bar
    Easy Affiliate Links
    Contact Form 7
    Buddypress Shortcodes
    Buddypress Friend of a Friend (FOAF)
    BuddyPress Follow
    BuddyPress Extended Friendship Request
    BuddyPress Edit Activity
    BuddyPress Block Activity Stream Types
    BuddyPress Activity ShortCode
    BuddyPress Activity Privacy
    BuddyPress Activity Filter
    BuddyPress Activity Autoloader
    BuddyPress
    BP Show Friends
    Amazon Auto Links
    All In One SEO Pack Pro
    Akismet Anti-Spam
    Advanced Profiles Plugin 2.0 for BuddyPress
    Activity Reactions For Buddypress

    #269152
    DragoWeb
    Participant

    Hi, I have this error message

    “There was a problem cropping your profile photo.”

    when I try to upload an avatar image with a width of 450px and above. Starting to 451px it works (even with an height of 150px). I get a warning message only if I try to upload an image under 150x150px :

    “You have selected an image that is smaller than recommended. For best results, upload a picture larger than 150 x 150 pixels.”

    So, I suppose this problem doesn’t come from a setting option somewhere.

    The problem is the same when I switch to the default theme Twenty Fifteen and I have no other plugin activated (except HideMySite). Cover image works without problem. Cropping image works with Ultimate-member plugin and in WP admin -> Media -> Edit/crop as well.

    Config:
    Wordpress (new install) v4.9
    Buddypress 2.9.2
    php 5.6
    GD enabled

    Thanks.

    Max
    Participant

    Hi moefahmy,

    That’s actually a clever solution to address this issue. The difference with me is that my customer needs a few specific groups to be restricted to only let himself post in it. But since only administrators like my customer needs to post I can target only the administrator role to view the post-an-update form, and hide them for every other user role. I can code something to make this only happen on the groups I want it to.

    Thanks for activating the bulb inside my brain haha, I really appreciate this solution. Well done!!

    #268397
    Kristian Yngve
    Participant

    Oh sorry, I had copied it as is by the other moderator from a very old post. Thank you for cleaning that up for me, this should be the only one as a How to & Troubleshooting category.

    So, I did the changes and it didn’t work. I also tried changing the last part: hide_admins_profile’, 1 ); to hide_admins_user’, 1 ); but didn’t work sadly… resorted back to profile for that part.

    Any other suggestions that may work? I had also cleared the cache after any changes.

    #268044
    xmginc
    Participant

    Update: we have found that with a multisite with multiblog enabled to share the member list from the parent across all the child sites, code to filter out roles such as “administrator” only work if that user is also added to the child site.

    Example:

    Does not work in this scenario:

    – parent site setup with user “johnadmin” with admin role is hidden on parent site directory
    – child site without this user created does not hide him from the site directory

    Works in this scenario:

    – parent site setup with user “johnadmin” with admin role is hidden on parent site directory
    – child site ALSO setup with user “johnadmin” with admin role is hidden on child site directory

    For anyone wondering, the code that is partially working for us is below found at buddydev.com. This code has been added to the functions.php in the child site so that we can control what the child site loop shows individually. (example: parent shows everyone, child 1 shows only subscribers, child 2 only shows x, child 3 only shows y, etc.)

    Would super appreciate any suggestions thx!

    add_filter( 'bp_after_has_members_parse_args', 'buddydev_exclude_users_by_role' );
     
    function buddydev_exclude_users_by_role( $args ) {
        //do not exclude in admin
        if( is_admin() && ! defined( 'DOING_AJAX' ) ) {
            return $args;
        }
        
        $excluded = isset( $args['exclude'] )? $args['exclude'] : array();
     
        if( !is_array( $excluded ) ) {
            $excluded = explode(',', $excluded );
        }
        
        //$role = 'administrator';//change to the role to be excluded
        $user_ids =  get_users( array( 'role__in' => ['administrator' , 'contributor' , 'author', 'editor'] ,'fields'=>'ID') );
        
        $excluded = array_merge( $excluded, $user_ids );
        
        $args['exclude'] = $excluded;
        
        return $args;
    }
    
    #267910
    TxGirl
    Participant

    That is the same visibility options that already come with BuddyPress. I need to be able to add the option to choose that the profile is viewable by editors or other member group that comes with wordpress. I don’t want to hide them from being editable by the user, I want to hide them from being seen by other members on when they view another members profile but want them to be seen by more than just admin’s (i.e.) I also need to allow editor’s to be able to see them when viewing a member’s profile.

Viewing 25 results - 76 through 100 (of 615 total)
Skip to toolbar