Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'Hide Admin'

Viewing 25 results - 251 through 275 (of 612 total)
  • Author
    Search Results
  • #181494
    godavid33
    Participant

    *sigh*

    Of course, as soon as I post this, I find the problem.

    
    function my_hidden_activities($a, $activities) {
    	//if admin we want to know
    	//if (is_site_admin())
    		//return $activities;
    
    	$nothanks = array('activity_comment');
    
    	foreach ($activities->activities as $key => $activity) {
    		if (in_array($activity->type, $nothanks, true)) {
    			unset($activities->activities[$key]);
    			$activities->activity_count = $activities->activity_count-1;
    			$activities->total_activity_count = $activities->total_activity_count-1;
    			$activities->pag_num = $activities->pag_num -1;
    		}
    	}
    
    	// Renumber the array keys to account for missing items.
    	$activities_new = array_values( $activities->activities );
    	$activities->activities = $activities_new;
    
    	return $activities;
    }
    add_action('bp_has_activities', 'my_hidden_activities', 1, 2 );
    

    The above code causes this problem. The code is attempting to hide comments from appearing as their own activity stream items. Any suggestions on how I can hide comments from appear anywhere except for in the thread they are nested in?

    #181319
    godavid33
    Participant

    Solution: credit to @lincme on the post https://buddypress.org/support/topic/filtering-out-activity-stream-stuff/

    
    // Remove (hide) various activities from streams.
    function my_hidden_activities($a, $activities) {
    	//if admin we want to know
    	//if (is_site_admin())
    		//return $activities;
    
    	$nothanks = array('activity_comment');
    
    	foreach ($activities->activities as $key => $activity) {
    		if (in_array($activity->type, $nothanks, true)) {
    			unset($activities->activities[$key]);
    			$activities->activity_count = $activities->activity_count-1;
    			$activities->total_activity_count = $activities->total_activity_count-1;
    			$activities->pag_num = $activities->pag_num -1;
    		}
    	}
    
    	// Renumber the array keys to account for missing items.
    	$activities_new = array_values( $activities->activities );
    	$activities->activities = $activities_new;
    
    	return $activities;
    }
    add_action('bp_has_activities', 'my_hidden_activities', 10, 2 );
    
    #180394

    In reply to: Disable admin bar

    Splendorito
    Participant

    I did find a plugin now that correct this easy.
    Global admin bar hide or remove

    Thank you anyway

    Best Regards

    #179910
    virtualgeorge
    Participant

    Would it be something similar to also hide Administrators from the members list?

    #179434

    In reply to: Stop BuddyPress SPAM

    contrasupport
    Participant

    Most of wordpress plugins mentions above work like

    Attacker > HTTP server > PHP > WordPress > PLUGINS

    We all need to have something before WordPress that’s why I recommend

    NinjaFirewall (I do not have any relation with the plugin creator)

    https://wordpress.org/plugins/ninjafirewall/

    Block the attacker before the WordPress

    Attacker > HTTP server > PHP > NinjaFirewall > WordPress > PLUGINS

    As always in installing any plugins that possibly can block your admin access you have to read the Installation note and have access to the FTP.

    NinjaFirewall will work as another layer to protect your site.

    In addition if you have not done it:

    1. Change your “Admin” username to something dificult and at least 10 characters (+) but easily to remember (+ for you – for security) or you have to read a note (-) safely secured in your safe locker (+)
    2. Make your password at least 25 COMBINATION of characters (+) but easily to remember (+ for you – for security) or you have to read a note (-) safely secured in your safe locker (+)

    NinjaFirewall:

    • Web Application Firewall
    • Full standalone web application firewall
    • Multi-site support
    • Compatible with shared hosting accounts
    • Protects against RFI, LFI, XSS, code execution, SQL injections, brute
    • force scanners, shell scripts, backdoors and many other threats
    • Scans and/or sanitises GET / POST requests, HTTP / HTTPS traffic, cookies, server variables (HTTP_USER_AGENT, HTTP_REFERER, PHP_SELF, PATH_TRANSLATED, PATH_INFO)
    • Sanitises variables names and values
    • Advanced filtering options (ASCII control characters, NULL byte, PHP built
    • in wrappers, base64 decoder)
    • Blocks username enumeration scanning attempts through the author archives and the login page
    • Blocks/allows uploads, sanitises uploaded file names
    • Blocks suspicious bots and scanners
    • Hides PHP error and notice messages
    • Blocks direct access to PHP scripts located inside specific directories
    • Whitelist option for WordPress administrator(s), localhost and private IP address spaces
    • Configurable HTTP return code and message
    • Rules editor to enable/disable built-in security rules
    • Activity log and statistics
    • Debugging mode
    #179033
    SubstreamAI
    Participant

    Just thought I’d update for anyone else with a similar problem. It has turned out that my Possible Solution #1 above has solved this for me completely. It does behave differently for Administrators (as it should) which caused me some confusion.

    Other Plugins I would recommend people look at if they have similar needs to mine:
    Theme My Login by Jeff Farthing: integrates user login screens into you Wordpres site/theme.
    Plugin: https://wordpress.org/plugins/theme-my-login/
    Website: http://www.jfarthing.com/extend/wordpress-plugins/theme-my-login/

    Global Hide/Remove Admin Bar Plugin bye Don Fischer: hides the WordPress Toolbar/admin bar
    Plugin: https://wordpress.org/plugins/global-admin-bar-hide-or-remove/
    Website: http://www.fischercreativemedia.com/plugins/global-hideremove-toolbar-plugin//

    Finally bbPress WP Tweaks: so popular I’m not going to leave links.

    All these plugins are essential to my gaming clan site: http://ducesoforion.com

    #179032
    SubstreamAI
    Participant

    Just thought I’d update for anyone else with a similar problem. It has turned out that my Possible Solution #1 above has solved this for me completely. It does behave differently for Administrators (as it should) which caused me some confusion.

    Other Plugins I would recommend people look at if they have similar needs to mine:
    Theme My Login by Jeff Farthing: integrates user login screens into you Wordpres site/theme.
    Plugin: https://wordpress.org/plugins/theme-my-login/
    Website: http://www.jfarthing.com/extend/wordpress-plugins/theme-my-login/

    Global Hide/Remove Admin Bar Plugin bye Don Fischer: hides the WordPress Toolbar/admin bar
    Plugin: https://wordpress.org/plugins/global-admin-bar-hide-or-remove/
    Website: http://www.fischercreativemedia.com/plugins/global-hideremove-toolbar-plugin//

    Finally bbPress WP Tweaks: so popular I’m not going to leave links.

    All these plugins are essential to my gaming clan site: http://ducesoforion.com

    #179031
    SubstreamAI
    Participant

    Just thought I’d update for anyone else with a similar problem. It has turned out that my Possible Solution #1 above has solved this for me completely. It does behave differently for Administrators (as it should) which caused me some confusion.

    Other Plugins I would recommend people look at if they have similar needs to mine:
    Theme My Login by Jeff Farthing: integrates user login screens into you Wordpres site/theme.
    Plugin: https://wordpress.org/plugins/theme-my-login/
    Website: http://www.jfarthing.com/extend/wordpress-plugins/theme-my-login/

    Global Hide/Remove Admin Bar Plugin bye Don Fischer: hides the WordPress Toolbar/admin bar
    Plugin: https://wordpress.org/plugins/global-admin-bar-hide-or-remove/
    Website: http://www.fischercreativemedia.com/plugins/global-hideremove-toolbar-plugin//

    Finally bbPress WP Tweaks: so popular I’m not going to leave links.

    All these plugins are essential to my gaming clan site: http://ducesoforion.com

    Suzan Jasmin O.
    Participant

    Hi
    I have the latest Wp and latest BuddyPress 1.9.2
    On the new user registration form it has FULL NAME box
    But I need FIRST NAME and LAST NAME boxes. So I can in admin panel and users on frontend can register new users can fill their names with 2 boxes. And on search page users can search other users by first name or last name. And I can hide last names for some users etc.. Its always convenient to have first and last names in separate DB columns. So please help me out, how can I have the BuddyPress plugged site of mine to function like above?
    Thanks

    #178706
    Suzan Jasmin O.
    Participant

    Hi
    I have the latest Wp and latest BuddyPress 1.9.2
    On the new user registration form it has FULL NAME box
    But I need FIRST NAME and LAST NAME boxes. So I can in admin panel and users on frontend can register new users can fill their names with 2 boxes. And on search page users can search other users by first name or last name. And I can hide last names for some users etc.. Its always convenient to have first and last names in separate DB columns. So please help me out, how can I have the BuddyPress plugged site of mine to function like above?
    Thanks

    #178705
    Suzan Jasmin O.
    Participant

    Hi
    I have the latest Wp and latest BuddyPress 1.9.2
    On the new user registration form it has FULL NAME box
    But I need FIRST NAME and LAST NAME boxes. So I can in admin panel and users on frontend can register new users can fill their names with 2 boxes. And on search page users can search other users by first name or last name. And I can hide last names for some users etc.. Its always convenient to have first and last names in separate DB columns. So please help me out, how can I have the BuddyPress plugged site of mine to function like above?
    Thanks

    #178703
    Suzan Jasmin O.
    Participant

    Hi
    I have the latest Wp and latest BuddyPress 1.9.2
    On the new user registration form it has FULL NAME box
    But I need FIRST NAME and LAST NAME boxes. So I can in admin panel and users on frontend can register new users can fill their names with 2 boxes. And on search page users can search other users by first name or last name. And I can hide last names for some users etc.. Its always convenient to have first and last names in separate DB columns. So please help me out, how can I have the BuddyPress plugged site of mine to function like above?
    Thanks

    #178702
    Suzan Jasmin O.
    Participant

    Hi truthmedia
    I have the latest Wp and latest BuddyPress 1.9.2
    On the new user registration form it has FULL NAME box
    But I need FIRST NAME and LAST NAME boxes. So I can in admin panel and users on frontend can register new users can fill their names with 2 boxes. And on search page users can search other users by first name or last name. And I can hide last names for some users etc.. Its always convenient to have first and last names in separate DB columns. So please help me out, how can I have the BuddyPress plugged site of mine to function like above?
    Thanks

    #176487
    meg@info
    Participant

    Hi @rianhall,

    add this code to functions.php :

    https://gist.github.com/dzmounir/8285459

    No need to edit any template files. Just change
    $excluded_roles = array( 'administrator', 'subscriber' );

    by puting the role ids to hide.

    #176060
    Manu-PB
    Participant

    @megainfo
    Thanks for answer.
    Is there any possibility then to hide a field to members ?
    And I wonder why the DB field value is called “adminsonly”and not as expected “memberonly” or “onlyme” ???

    #175475
    craftersuniversity
    Participant

    With the new update of wordpress, i found out that this has nothing to do with BuddyPress or any theme, it is a bug in wordpress itself. The have tried to fix it, but its still not working well, the menu fills the screen and cannot be scrolled or hidden. I recommend hiding all buddypress menus until the bug gets fixed:

    /* =Hide BuddyPress sub menu until it works in mobile phones
    ————————————————————– */
    #wpadminbar .quicklinks .menupop ul.ab-sub-secondary {
    display: none !important;
    }

    #174755
    @mercime
    Participant

    @rastarr
    – There’s a free plugin but has not been updated in over 2 years https://wordpress.org/plugins/bp-ninja/
    – There’s premium and maintained plugin http://buddydev.com/plugins/bp-stealth-mode-for-site-admin/

    #174727
    pjbursnall
    Participant

    Ok I’ll have a look and test each option. My preference is to hide both the admin bar and dashboard (as I would think most people would want to), but I will look at those plugins.

    Going forwards I would suggest a lot of people would be happier with BP if normal users could run through all functions with ever seeing the admin bar or dashboard.

    Thanks,
    Paul.

    #174717
    modemlooper
    Moderator

    check the WP plugin repo there are some plugins to make the admin bar work better on mobile

    #174709
    pjbursnall
    Participant

    Thanks 🙂

    #174708
    pjbursnall
    Participant

    Thanks again Matt, I’ll have a look tomorrow. My previous point is the BP doesn’t work ‘out the box’ when you move onto mobile/tablet. Something of a failing.

    Thanks,
    Paul.

    #174707
    mattg123
    Participant

    @pjbursnall , I wouldn’t say that it is pretty easy here

    <?php global $current_user;
    		get_currentuserinfo();
    		$display = $current_user->display_name;
    		$login = $current_user->user_login;
    		$userid = $current_user->ID;
                    $home = get_home_url();
    ?>

    add that above your custom drop-down then its pretty simple just echo out the username, url etc <li class="li-fourth"><a href="<?php echo $home . '/members/' . $login . '/activity/mentions'; ?>">Mentions</a></li>

    EDIT –

    Oh the other bit you’d have to google for is the avatar but here
    <?php echo bp_core_fetch_avatar( array('item_id' => $userid, 'type' => 'full', 'width' => 100,'height' => 100));?>
    You’ll want to adjust the width/height accordingly

    #174705
    pjbursnall
    Participant

    Hi Matt,

    I have no issue creating a drop-down menu, the other side is a little trickier when you don’t know php, but I’ll have a good read.

    Seems BP is not as straightforward as it’s made out to be.

    Thanks,
    Paul.

    #174704
    mattg123
    Participant

    @pjbursnall yeah that code replicates the notification element only (the only part that is somewhat confusing to replicate) you place the code in the plugins directory in bp-custom.php you may have to create the file yourself.

    http://stackoverflow.com/questions/9953482/how-to-make-a-pure-css-based-dropdown-menu – shows you how to create a drop down menu, https://codex.wordpress.org/Function_Reference/get_currentuserinfo get the current users info so you can create links to their profile pages, etc.

    Just a note, to add the notifcations to your custom bar your code will look something like <li><?php bp_notification_badge(); ?></li>

    #174703
    pjbursnall
    Participant

    Hi Matt,

    Thanks for the quick reply. Agreed on the admin bar, seems kind of lazy to me in it’s current form. Please excuse my ignorance but where do I place the above? My theme’s functions.php? And will that just handle the notifications element?

    I’d like to find a proper fix for this as on some devices BP is completely unusable.

    Thanks again,
    Paul.

Viewing 25 results - 251 through 275 (of 612 total)
Skip to toolbar