Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'Hide Admin'

Viewing 25 results - 326 through 350 (of 691 total)
  • Author
    Search Results
  • #183799
    dromy
    Participant

    Did you succeeded?

    I would like to hide the admin option panel (profile and view) when the user is not the owner of the profile.

    can you advice?

    #183554
    asianowl
    Participant

    after a shower — it came to me that I should just hide the menu item in CSS with the following:
    #wp-admin-bar-my-account-activity{display:none;}

    But this hides it from everyone… does anyone else have a better idea?

    Iurie Malai
    Participant

    @danbp, I know how to check for errors, but this didn’t helped me too much :). I solved with the blank page, but no more. Your solution works for hiding some xProfile tabs from viewing, but not from editing them. Am I wrong? Sorry!

    This is my tested function (as I said, it hiding only from viewing, not from editing):

    
    function flegmatiq_profiles( $retval ) {
    
       if ( is_user_logged_in() && !bp_is_profile_edit() ) {
          $myfield = xprofile_get_field_data( 'User Type' );
          if( $myfield == "Faculty" ) {
             $retval['exclude_groups'] = '2';
    	 //$retval['exclude_fields'] = '6,18,39';
          }
       }
    
       return $retval;
    
    }
    
    add_filter( 'bp_after_has_profile_parse_args', 'flegmatiq_profiles' );
    

    The next code works as I need, but I think it is not so elegant, and it not allow to use the group ID, only his order number, as ordered by admin:

    
    function hide_profile_group_tabs_from_editing( $group_names ){
    
       if ( is_user_logged_in() && bp_is_profile_edit() && xprofile_get_field_data( "User Type") != "Faculty" ) {
          for ($x=0; $x<=sizeof($group_names); $x++) {
             if ( $x != 3 ) echo $group_names[$x]; //3 is the order number (from 0) of the tab that I need to hide in the profile edit page. This is not the group ID.
          }
       } else {
          return $group_names;
       }
    
    }
    
    add_filter('xprofile_filter_profile_group_tabs', 'hide_profile_group_tabs_from_editing');
    
    #183332
    amckinnell
    Participant

    Hi Henry, here is the contents of that window:

    Request URL: http://photoforte.com/wp-admin/admin-ajax.php
    Request Method: POST
    Status Code: HTTP/1.1 200 OK
    Request Headers 12:51:58.000
    X-Requested-With: XMLHttpRequest
    User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:29.0) Gecko/20100101 Firefox/29.0
    Referer: http://photoforte.com/activity/
    Pragma: no-cache
    Host: photoforte.com
    Content-Type: application/x-www-form-urlencoded; charset=UTF-8
    Content-Length: 97
    Connection: keep-alive
    Cache-Control: no-cache
    Accept-Language: en-gb,en;q=0.5
    Accept-Encoding: gzip, deflate
    Accept: application/json, text/javascript, */*; q=0.01
    Sent Cookie
    wp-settings-time-10: 1398959694
    wp-settings-10: libraryContent=browse&editor=html&wplink=1&urlbutton=none&imgsize=full&align=center&hidetb=1
    wordpress_test_cookie: WP+Cookie+check
    wordpress_logged_in_0226a87af55d37f15c17099beebb5b87: amckinnell|1402256837|5ccb9ec3cbdec1dc82a94b7ed790dd41
    wordpress_0226a87af55d37f15c17099beebb5b87: amckinnell|1402256837|5b043d1b070ce3f02b6457a112bdfd6a
    s2member_tracking: fnIyOk5PVFdEQUJGSk9CeFBsZ2NMV3BiN2Rna3hMQUw0aTZzOmI3ZmEwNjU4NTQ2MGE0OWNiZDlmYTJhZGE2OTIyNDQzfEKGYUXbL9qRK4qkpq9Olm8qeZTiTkNtW3IJQea7fc4a
    PHPSESSID: d3jd0dp456hmi7p57ib09rrku7
    bp-activity-oldestpage: 1
    __utmz: 82912087.1400555092.174.6.utmcsr=Photo Forté Members|utmccn=7ce74da5f7-2014_May_Lesson_Week_3|utmcmd=email|utmctr=0_76b17b8542-7ce74da5f7-
    __utmc: 82912087
    __utmb: 82912087.7.9.1401047433231
    __utma: 82912087.1423870743.1397575542.1400993272.1401047233.201
    Response Headers Δ1626ms
    X-Robots-Tag: noindex
    x-frame-options: SAMEORIGIN
    x-content-type-options: nosniff
    Transfer-Encoding: chunked
    Server: Apache
    Pragma: no-cache
    Keep-Alive: timeout=5, max=85
    Host-Header: 192fc2e7e50945beb8231a492d6a8024
    Expires: Wed, 11 Jan 1984 05:00:00 GMT
    Date: Sun, 25 May 2014 19:51:50 GMT
    Content-Type: text/html; charset=UTF-8
    Connection: Keep-Alive
    Cache-Control: no-cache, must-revalidate, max-age=0

    About your other questions, it is a total custom theme, but I haven’t made any changes to it for weeks and this problem just cropped up a couple of days ago. I know for sure it just started because I use that load more all day.

    It’s difficult for me to answer the question about whether it happens in the default theme because I don’t want to change my live site because people are using it, and when I create a staging site, the load more button works in the current theme. I cannot understand why the problem only exists on the live site and not the staging site. I am creating the staging site when I am seeing the issue, it only takes a couple of minutes to create it, it’s on the same server, but the load more button works there.

    Thanks again for your help.

    #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.

Viewing 25 results - 326 through 350 (of 691 total)
Skip to toolbar