Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'Hide Admin'

Viewing 25 results - 201 through 225 (of 634 total)
  • Author
    Search Results
  • #245646
    Venutius
    Moderator
    #245361
    Henry Wright
    Moderator

    In post #190874 on the topic you’ve linked to, snippet 2 has the line:

    $excluded_user='1'; // Id's to remove, separated by comma

    You can just add more user IDs like this and those IDs will be excluded from the loop:

    $excluded_user='1,34,56,201'; // Id's to remove, separated by comma

    #244817
    danbp
    Participant

    Hi,

    simply remove the delete group button from group admin. Give this a try, only site admin will see the button. Add snippet to bp-custom.php

    function kwahlquist_remove_group_admin_tab() {
    global $bp;
    	if ( ! bp_is_group() || ! ( bp_is_current_action( 'admin' ) && bp_action_variable( 0 ) ) || is_super_admin() ) {
    		return;
    	}
    	// Add the admin subnav slug you want to hide in the following array
    	// other admin subnav items are: group-settings, group-avatar, group-invites, manage-members
    	$hide_tabs = array(    		
    		'delete-group' => 1
    	);
            // since BP 2.2
    	$slug = bp_get_current_group_slug() . '_manage'; 
    	
    	// Remove the nav item
    	foreach ( array_keys( $hide_tabs ) as $tab ) {
    		bp_core_remove_subnav_item( $slug, $tab );
    	}
    }
    add_action( 'bp_groups_setup_nav', 'kwahlquist_remove_group_admin_tab', 9 );
    #244254
    djsteveb
    Participant

    @nithin270 – any changes you make for search spiders is going to take weeks (at minimum) before they are reflected in the search results.

    I suggest doing some robots.txt additions (will list mine below) – however realize that long ago google made a decisions that even if your robots.txt says to disallow crawling something, if another page on the web links to your subpage that is blocked by robots.txt, it will still show the url in the search results – but have a description something like “this sites robots.txt prevents google from displaying description of this result”.

    There has been debate about that decision, but it is what it is.

    The only way to really prevent a page showing up in results is to hide it behind a password (like htpasswd) – however google does normally remove results if that page (or header info of images) includes “noindex” in the head of the page (there is a tricky way to add this to images – it was pointed out to me in the google webmaster forums)

    given that bp pages like members are kind of pseudo pages, using something like yoast (currently as far as I know) – will not give you an option to add noindex, nofollow to your member pages..

    you may be able to modify the code I got from wpmudev that checks “if is member page, then add meta description as…” –
    ( http://premium.wpmudev.org/forums/topic/bp-meta-tite-description-for-groups-and-members-pages#post-806736 )
    to… also check “if is members page” – then add “meta name=”robots” content “noindex, nofollow”..
    (something like that)

    that should remove your members pages next time google crawls your site and the crawlers send the info back to the main algo/index..

    I think there is a way to log into google webmaster tools if you have claimed /verified your site and click on urls to ask the big G to remove them as well. (I have not messed with that stuff in a while )

    I also suggest adding a robots.txt file similar to this:

    Disallow: */activity/p/*
    Disallow: /docs/
    Disallow: *send-invites*
    Disallow: */groups/*members*
    Disallow: */groups/*media*
    Disallow: *widget-title*
    Disallow: *members/*activity*
    Disallow: *members/*notifications*
    Disallow: *members/*friends*
    Disallow: *members/*groups*
    Disallow: *members/*docs*
    Disallow: *members/*media*
    Disallow: *acpage*
    Disallow: *messages*
    Disallow: *friends*
    Disallow: *settings*
    Disallow: /*/comment-page*
    Disallow: *register*
    Disallow: *login*
    Disallow: *profile*
    Disallow: *admin*
    Disallow: *includes*
    Disallow: *content*

    to prevent some other quirky indexing issues with bp.

    If your member profile stuff is sacred, then I would hunt the forums here for what others have been messing with that prevents profile info from being displayed if a user is not logged in… as there are plenty of indexing spiders that will not follow the robots.txt or robots index rules in <head> – in fact some specifically look for these things and purposely crawl and scrape stuff that is blocked –

    Disclaimer: I am not an expert, not a real coder. Research these things with other sources, your situation may vary.

    #244207
    danbp
    Participant

    hi,

    first snipppet removes the mention tab.
    Second remove the mention item from the top right usermenu below howdy.

    Condition is set to site admin. If you use custom capabilities, change that to your need.
    Code goes to bp-custom.php

    function bpfr_hide_mention_nav() {
    	//if ( bp_current_user_can( 'bp_moderate' ) )
    	if ( is_super_admin() ) {
    		return;
    	} 
    	bp_core_remove_subnav_item( 'activity', 'mentions' ); 
    }
    add_action( 'bp_ready', 'bpfr_hide_mention_nav' );
    
    function bpfr_admin_bar_remove_activity_mentions(){
    global $wp_admin_bar;
    	if ( is_super_admin() ) {
    		return;
    	}
    	$wp_admin_bar->remove_node('my-account-activity-mentions');
    }
    add_action('wp_before_admin_bar_render','bpfr_admin_bar_remove_activity_mentions');
    

    An alternate (IMO better) solution, is this premium plugin: http://www.philopress.com/products/buddynotes/

    danbp
    Participant

    BuddyPress use bbPress when you allow group forums.
    If the group is private, the attached forum is also hidden ton non members of that group. Same for public or private groups.

    You don’t have to change the group forum setting in the forum list.
    The right steps
    Create a group A
    A is set to private
    Allow a forum for A
    —— The wrong step ——–
    Going to dashboard forum admin, and set forum A to private. If you do this nobody will see it except site admin.

    Groups


    https://buddypress.org/support/topic/hide-buddypress-and-bbpress-items-from-guests/
    https://buddypress.org/support/topic/buddypress-private-group-is-not-visible-in-bbpress/

    atfpodcast
    Participant

    Deactivate and delete the admin bar plugin. Remove also any custom code you have added in the past concerning the toolbar. The idea is to revert back to a fully standard WP install.

    It was already deactivated. I wonder if it left anything altered? that other snip it i added to try does not exist.

    If this doesn’t work, you have to go to your db and check the wp_options table for the toolbar setting.
    Search for option_name hide-loggedout-adminbar where value must contain 1.

    im using godaddy so i guess that would be in myphpadmin?

    danbp
    Participant

    I can confirm that Raindrops theme is working correctly with BP and taht the admin bar is showing up to logged in users.

    Deactivate and delete the admin bar plugin. Remove also any custom code you have added in the past concerning the toolbar. The idea is to revert back to a fully standard WP install.

    If this doesn’t work, you have to go to your db and check the wp_options table for the toolbar setting.
    Search for option_name hide-loggedout-adminbar where value must contain 1.

    atfpodcast
    Participant

    Yes sir the bar is there when are not logged on. I added show_admin_bar( true ); in a function plugin and that did not work. I tried the 2014 theme with the same results. no tool bar. THe one i deactivated was the one from stranger studios hid admin bar to non admins and and I deactivated that.
    https://wordpress.org/plugins/hide-admin-bar-from-non-admins/

    djsteveb
    Participant

    @dangthrimble – no matter what you do to hide the admin username, the really good hack teams are running scans to get the admin names by running url checks like “yourdotcom /?author=2
    ?author=3

    and scraping the details wp is providing both on page, and in meta fields.
    Then adding those names to their pass cracking bot nets.
    (look in your raw access logs, you will see it)

    I’ve tried changing names on wp sites many times, the rssn hackers get getting the new names, you can tell if you check your fail log with “limit login attempts” plugin.

    I’ve played with some code to change in wp themes to hide details there, but my php is slightly below beginner and my understanding of what the theme code is doing is same.

    I tried a plugin from the wp-repo that is supposed to hide all that- but it’s not working.

    (you could htaccess geo block ukrain and chna from your site completely and probably prevent 90% of these issues anyway from what I have seen by checking logs)

    I found some htaccess someone posted that is supposed to suppress all requests for “/?auth [nc] or something like that – but since I do not understand what each part is doing, I have not deployed it.

    I think it needs to be htaccess add and include anything with “author” and a number to work well (reg ex for numbers?)

    Until I find a htaccess regex method I understand and trust, I have found that the best combo for prevention is:

    Geo IP Block
    (https://wordpress.org/plugins/ip-geo-block/ )
    (default settings are okay, I think it’s best to change the drop downs to block by country the plugins area, theme area, admin ajax, etc as well – options in settings
    Also some blogs may want to uncheck the “comment post” block by country
    )

    If this geoip block plugin author had a donate link I’d already sent him some bucks, it’s the most useful plugin I’ve found since… “good question”

    and succuri is an informative add on as well
    (shows that some bots have figured out how to bypass the limit login attempts max tries setting)

    The way WP is handling question marks in urls (string queries I think it’s called) and giving up 200 status codes and extra info (including author names) to bots is a big issue for me, this kind of relates to the unanswered support question I posted here:
    https://wordpress.org/support/topic/question-mark-url-return-200-not-404-string-query-noindex-or?replies=1

    shanebp
    Moderator

    Google: buddypress hide admin from members list

    shanebp
    Moderator

    I would like to be able to hide all the information about my site administrators

    What do you mean by ‘hide’?
    Make them invisible?

    If you’ve changed the name of the admin’s account so it doesn’t say ‘admin’, then why do you need to hide it?
    How would a scraper know that it’s the admin’s account?

    #241200
    Gnostic_Thought
    Participant

    I am not sure. I bought a plugin from codecanyon and am trying to alter it to work with buddypress. I think this is the code I will have to alter

    public function __construct() {
    		$this -> admin = WP_Atr_Admin :: get_instance();
    		# registration hooks:
    		add_action( 'login_enqueue_scripts', array( $this, 'initialize_registration' ) );
    		add_action( 'register_form', array( $this, 'add_checkboxes_to_registration' ) );
    		add_filter( 'registration_errors', array( $this, 'validate_registration' ), 10, 3 );
    
    		# mu
    		add_action( 'signup_header', array( $this, 'initialize_registration' ) );
    		add_filter( 'wpmu_validate_user_signup', array( $this, 'mu_validate_registration' ), 10, 3 );
    		add_action( 'signup_extra_fields', array( $this, 'mu_add_checkboxes_to_registration' ) );
    
    		# add button
    		add_filter( 'the_content', array( $this, 'add_button_to_pages' ) );
    		$this -> register_page_status();
    		if( is_multisite() ) {
    			add_filter( 'all_plugins', array( $this, 'hide_plugin_in_mu_sites' ) );
    		}
    	}
    

    I would figure I would prefix bp_ to some of the code here

    # registration hooks:
    add_action( ‘bp_login_enqueue_scripts’, array( $this, ‘initialize_registration’ ) );
    add_action( ‘bp_register_form’, array( $this, ‘add_checkboxes_to_registration’ ) );
    add_filter( ‘bp_registration_errors’, array( $this, ‘validate_registration’ ), 10, 3 );

    but it like there is more to it than that according to your link.

    #239335
    @mercime
    Participant
    #238788
    danbp
    Participant

    Additionaly you can use/be inspired by this:
    https://buddypress.org/support/topic/hide-admins-activities-from-all-activity-feeds-in-buddypress/#post-223433

    Successfully tested on BP 2.2.3.1 WP 4.2.2 Twenty Twelve

    #238363
    danbp
    Participant

    Try if ( !is_super_admin( $current_user_id))

    Or use the WP filter

    function hide_my_admin_bar() {
    	// by user role
        if ( current_user_can( 'manage_settings' ) ) {
            return true; // Show for admins
        } else {
            return false; // Hide for other users
        }
    }
    add_filter( 'show_admin_bar', 'hide_my_admin_bar' );
    #238357
    @mcuk
    Participant

    I’ve set up two users to test various things on site during development, one with Administrator and one with Subscriber roles. That’s what the wp dash is confirming under users.

    I also have another function to hide the wp admin bar at the top of the page which includes the is_super_admin(). When its active, the admin bar is removed for the subscriber but not the admin user as intended. So can only assume that there is a problem with my redirect function itself or perhaps its clashing with something else (though I have no other plugins atm).

    //Remove wordpress admin bar for all except admin 
    function bpmc_remove_admin_bar() {
    	if( !is_super_admin() ) 
    		add_filter( 'show_admin_bar', '__return_false' );
    }
    add_action('wp', 'bpmc_remove_admin_bar');
    danbp
    Participant

    hi @mcpeanut,

    this snippet useable from BP 2.0.1 and above, can be added to bp-custom.php
    it will hide the field ID 1 which is the default Name field to all, except site admin.

    it will also avoid the user to edit that field. So if you use this, i recommand you tell them on register page that once they entered a name it they could change it later. You can than ask them $$$$ to do it. 😀

    function bpfr_hide_profile_field_group( $retval ) {
    	if ( bp_is_active( 'xprofile' ) ) :	
    	
    	// hide profile group/field to all except admin	
    	if ( !is_super_admin() ) {		
    		//exlude fields, separated by comma
    		$retval['exclude_fields'] = '1';  
    		//exlude field groups, separated by comma
    		$retval['exclude_groups'] = '1'; 			
    	} 
    	return $retval;		
    	
    	endif;
    }
    add_filter( 'bp_after_has_profile_parse_args', 'bpfr_hide_profile_field_group' );

    More here:

    Using bp_parse_args() to filter BuddyPress template loops

    #236828
    booknerds
    Participant

    Well, the database modification did no change – the members were displayed anyway. And the php coding stuff is mainly for hiding users with a special user role. What I am looking for is to be able to select any user I want to hide, no matter if that user is admin, subscriber or whatever.

    danbp
    Participant
    #236225
    danbp
    Participant
    rosyteddy
    Participant

    @minglonaire you can also try https://bp-tricks.com/design/easily-hide-specific-tabs-on-buddypress-member-and-group-pages/ AND remove Activity from Themes > Menu in your wordpress admin dashboard

    #235444
    whoaloic
    Participant

    Hello danbp, I bring up the topic because I still struggle to hide administrators in member tabs.
    Any help would be really appreciated.

    #235293
    rosyteddy
    Participant

    Hi @danbp This is pretty cool, fun and useful.

    If bp org can add to
    About Plugins Themes Documentation **Snippets** Blog Support Download
    Snippets that actually work with WP4.1.1, and BP2.2x or BP 2.3 it will be an excellent and useful addition. Infact, users with some repu/creds can be allowed to post such snippets in this section, which can then be rated, commented or tagged. Making it a subsection of forum will make it less prominent but a tab by the side of plugins will be great.

    PS: Just curious, is there any such easy code that hides items from the left side nav bar in the site admin’s backend dashboard ?

    #235251
    Klosurdo
    Participant

    Thanks for the reply danbp,

    The Theme I am using is KLEO by Seventh Queen
    Buddy Press version Version 2.2.1

    I am looking to hide menu items for non logged in visitors in members profiles See example here.. I want to have only the “media” menu and possibly the documents icons viewable to non logged in visitors.

    I would like all icons viewable to only those members that are logged in.

    Thanks

    Other Plugins
    Akismet
    bbPress
    BuddyPress Cover Photo
    K Elements
    MOJO Marketplace
    Paid Memberships Pro
    PMPro MailChimp Integration
    PMPro Register Helper
    PMPro Set Expiration Dates
    Register Helper Example
    Revolution Slider
    rtMedia Pro for WordPress, BuddyPress and bbPress
    The Events Calendar
    WPBakery Visual Composer

Viewing 25 results - 201 through 225 (of 634 total)
Skip to toolbar