Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'Hide Admin'

Viewing 25 results - 626 through 650 (of 915 total)
  • Author
    Search Results
  • #22720
    Jonah Brown
    Member

    Is there a way with only the functions.php to hide the Create a group button. I did a manual edit in my theme files to do this.

    Just figure it would be easier if I could do it in the functions.php file.

    angslycke
    Participant

    Excellent piece of information! Could prove to be really useful for me as well to hide administrators.

    MRSepehr
    Member

    Hello everyone,

    Add the codes below to your theme’s function.php file :

    add_action(‘admin_head’, ‘adminbarhide’);
    function adminbarhide() {
    define(‘BP_DISABLE_ADMIN_BAR’, true);
    }

    then go to wp-content/your-theme-directory/_inc/css/adminbar.css and change “padding-top: 25px” on second line to “padding-top: 0px” ,
    this code will remove admin bar only from your dashboard, and css code will hide white space after removing admin bar.

    after all I’m sorry about my bad English if there was some wrong spelling.

    aljuk
    Member

    When a user tries to upload an avatar beyond the max file size, they get this error message:

    `Upload Failed! Error was: The uploaded file exceeds the upload_max_filesize directive in php.ini.`

    Ugh! No way. It’s coming from wp-admin/includes/file.php.

    Can anyone suggest how I might best replace this message with something custom, useful and less hideous? Obviously I could just hack the file, but I’d rather use a non-destructive solution if poss.

    r-a-y
    Keymaster

    There’s a plugin for this:
    https://wordpress.org/extend/plugins/buddypress-block-activity-stream-types/

    It’s an older plugin and the developer is now busy with other projects, so you’ll need to update the plugin manually so the admin menu will show up in WP.

    Read this tutorial:
    http://code.ipstenu.org/2011/wordpress-3-1-network-menu/

    (Edit) Just read the full post, you want to hide it from group feeds only? Or throughout the site? If throughout the site, the plugin will do the job. If only on group feeds, you can take the basic premise from the plugin, then you’ll need to do a conditional to check if you’re in a BP feed.

    anisjolly
    Member

    Hey all

    I’ve looked high and low and I’m sure I’ve looked everywhere in order to find an answer for this little dilemma I have.

    However, I would like to add links to an admin bar – I sort of know how to do that but I can’t for the life of me figure out how to show and hide the link to users who either have access to a group or not.

    I.e. I have a group called Group A. I only want members of Group A to be able to see the link in the admin bar. If users who do not belong to Group A login – they don’t see that link.

    Is this possible to do?

    #113094

    In reply to: Hide Admin

    Magi182
    Participant

    For those still looking for a solution to this, you can add the following code to the functions.php file of your active theme. The username gets replaced with the username you wish to hide. Alternatively, you could substitute the stuff in the parens of the conditional with a properly done current_user_can() statement to hide all the administrators.

    `
    global $current_user;
    get_currentuserinfo();

    if( $current_user->user_login == ‘username’ ) {
    remove_action(“wp_head”,”bp_core_record_activity”);
    }
    `

    vikramtalkin
    Member

    i am using bp role manager to create roles for users in wordpress.
    now i want to that only user with specific role should be approved by admin through BuddyPress Registration Options plugin it is now used for every type of users registered.
    how can i do this plz suggest.

    #112384

    In reply to: missing nav-bar

    Hugo Ashmore
    Participant

    Not necessarily an easy fix with so little info to go on. Default is to show the adminbar all the time so setting ‘yes’ to hide it for logged out users isn’t going to change things for logged in users.

    Usual questions must be asked now: Are you running a custom theme? If so then can you revert to bp-default and see how that performs.

    #21909
    Doug
    Participant

    getting this message when i access site, i tried doing an update and it didnt work, i screwed up somewhere, this is the message…

    Fatal error: Cannot redeclare hide_activity() (previously declared in /home/content/34/7811134/html/thesoldiersnetwork/wp-content/themes/facelook/functions.php:18) in /home/content/34/7811134/html/thesoldiersnetwork/wp-content/plugins/buddypress/bp-themes/bp-default/functions.php on line 23

    this is the functions.php currently in that folder….

    <?php
    define( ‘BP_DTHEME_DISABLE_CUSTOM_HEADER’, true );

    //
    // Remove View links from activity items; most people use ‘Favorites’.
    add_filter(‘bp_activity_permalink’, create_function(‘$a’, “return null;”));

    //
    // Hide log-in error message from potential hackers.
    add_filter(‘login_errors’, create_function(‘$a’, “return null;”));

    //
    // Hide erm, what..? Useful though!
    remove_action(‘wp_head’, ‘wp_generator’);

    //
    // Hide last known logged-on time from non-members.
    function hide_activity($content) {
    if ( !is_user_logged_in() )
    $content=’Log-in to contact this member!’;

    return $content;
    }
    add_filter(‘bp_member_last_active’, ‘hide_activity’, $last_activity);
    add_filter(‘bp_last_activity’, ‘hide_activity’, $last_activity);

    // Only allow Send Private Message to friends
    function is_my_own_friend( $friend_id = false) {
    global $bp;

    if ( is_site_admin() )
    return true;

    if ( !is_user_logged_in() )
    return false;

    if (!$friend_id) {
    $potential_friend_id = $bp->displayed_user->id;
    } else {
    $potential_friend_id = $friend_id;
    }

    if ( $bp->loggedin_user->id == $potential_friend_id )
    return false;

    if (friends_check_friendship_status($bp->loggedin_user->id, $potential_friend_id) == ‘is_friend’)
    return true;

    return false;
    }

    // Fix in case of empty avatar (gravatar.com fetch removed in core files).
    function no_empty_avatar($avatar_link) {
    if ( strpos( $avatar_link, “src=”” ) ) {
    $avatar_link = str_replace(“src=””, “src='” . BP_AVATAR_DEFAULT . “‘”, $avatar_link );
    }
    return $avatar_link;
    }
    add_filter( ‘bp_core_fetch_avatar’, ‘no_empty_avatar’ );

    ?>

    help! thanks!

    #112340

    In reply to: missing nav-bar

    Doug
    Participant

    yes, that is the bar, and “no” is checked for hide admin bar for logged out users. Would yes change that?

    #112144
    @mercime
    Participant

    == All I want to do is to hide the “Dashboard” button ==

    Know that the “Dashboard” link in adminbar appears for logged-in users who have a role greater than Subscriber on your blog. If you still want to do this then if you don’t have one yet, create a bp-custom.php file, add the code below and upload to wp-content/plugins folder:
    `<?php
    remove_action( ‘bp_adminbar_menus’, ‘bp_adminbar_thisblog_menu’, 6 );
    ?>`

    == have Notifications and buttons like “Edit Profile” etc [in adminbar] ==

    Notifications link and “Edit Profile” buttons are already in adminbar for logged-in-users.

    Syrinxie
    Member

    I have no idea where to start! http://codex.buddypress.org/theme-development/modifying-the-buddypress-admin-bar/ is really hard to follow!

    All I want to do is to hide the “Dashboard” button and have Notifications and buttons like “Edit Profile” etc

    And another thing is I’d like to have notifications for my forums(separate installation of bbpress but fully integrated). Like if you posted on a forum and someone responded you’d get a notification up to x amount of responses.

    if you simply want to hide Admin bar login and sign up, just add

    remove_action( 'bp_adminbar_menus', 'bp_adminbar_login_menu', 2 );

    to your functions.php and login and sign up will go away

    #111964
    chrisreg1
    Member

    Hmm unfortunately, that still did not work. Thanks for all your help thus far guys. Here is how my problem originated:

    I recently transferred my site from the default ”/wordpress/” sub directory to my root directory. Everything works fine in BuddyPress except for the LOGOUT and LOGIN menu options from the BuddyPress menu bar (up at the top).

    Upon looking at the URL that the logout and login tries to redirect to (in the tag), it still thinks it is in the ”/wordpress” subdirectory and the thus results in a Error 404 – Page Not Found problem.

    I’ve search various ways to do this but people have either not have found a solution or seem to not have posted it. I originally thought I could just use the ‘Add All Nav Links to Admin Bar’ plugin (https://buddypress.org/community/groups/add-all-nav-links-to-bp-adminbar/) and hide the Login and Sign Up options but unfortunately the “Log Out” still remains since it is under the ‘My Account’.

    Any help would be much appreciated, thanks.

    dennissmolek
    Participant

    I have been pouring over the site trying to catch up from when I took a break about 10 months ago. The only thing I notice is Andy is confirmed gone as he’s working on Jetpack now. I’ve read through the dev-chat logs and the trac and got fairly caught up.

    I have two projects that I’m working on right now. One is for the AIGA of my University, the other is a personal idea, both based on a sort of social site. I have a few ideas that I want to get into the site, and instead of writing tons of plugins and hacks to get BP to do what I want I’ve decided I’m just going to take the groups object and build off of it on a case by case basis. Object Oriented BP in a way.

    Starting with the group object we have a vast API and framework to build from. Not to mention when you add plugins like Group Docs, BP Albums, Bbpress, ETC. These make groups the strongest element on any BP based site. Stronger even than the individual user. Here are some sections I think could use the “groups” as its base and how I will be attempting my sites. Firstly, I am simply adding meta data for the groups to tell them what “type” of group I’ve created.

    Users:
    Strips all other members roles and ability besides admin, in this case the user.
    Changes “members” to “peers(friends)”. This allows me to categorize other users into “roles” of the group. Such as coworker, family, acquaintance, etc.
    Port Messages function here. Messages functions seems to be the only thing missing from the groups object.
    Albums- Uses same structure as currently used by BP Albums. Or whatever plugin you want.
    @mentions- Although personally not important, the fact that groups arnt already able to do this is weird.
    Groups: Yes users can join other groups. So now groups can join other groups. Moderators can be in Admins, Admins in users. Yay OOP
    Almost all other functions are the exact same for a user or a group.

    Groups:
    Nothing changes, except they can now be in other groups, and have sub groups.

    Events:
    A event is simply a group with a date. I dont see on a facebook event what the difference is. There are three roles of group members – Attending, Maybe, and Not Attending. Has albums, has a feed. Its a group.
    Because groups can be in other groups, A event can be owned by any group or user.

    Then I have things like competitions, which are simply built off of the group object. A simple plugin would just add a new subset from the parent object and we are rolling.

    I think this would be a much easier way to work. We have ONE object to update and modify. Plugin developers simple add to/ remove parts of the object. It’s already in place, its already strong, and does all the things we need it to. Forums are attached to groups so that means Events or Competitions or whatever could ALREADY have forums. Can my event have a twitter feed? Sure, groups already do. Can I set my personal privacy? Sure, groups have more built in here on what to hide or show. What about activity? Groups already stream just as much as users.

    It just seems so stupid for everyone to be adding features and new objects so every BP install is so insanely different from the next that it takes “experts” to figure out all the plugins and crap on each one.

    The only issue I see is backpat. I mean, I think a update script wouldnt be to bad, but would be a bunch of work. My sites are both ground ups so I’m not too stressed.

    I just want some opinions on this. Mostly I’m trying to find someone to say why its a bad idea.. I half thought of just starting totally over with a central object and building a new plugin, but this one is so close to perfect. So please, weigh in, even if you hate the idea..

    -Dennis

    Webweaver21
    Member

    Thanks for your help. I did indeed have the setting “Hide admin bar for logged out users?:” set to YES. I switched it to NO and now the menu bar appears whether logged in or logged out.

    The only problem is that new users still only see the “Register” and “Log In” menu items, even when they are logged in. This is puzzling because I can access the pages directly as a new user if I type in the URL.

    The test user I’m working with is visible under the Users listing of my BP root blog so it doesn’t seem like that would be the problem. I even gave the test user Admin priviledges to make sure there were no access level issues. The only difference is that the test user was signed up after I activated multiuser mode.

    The way that WP eMember handles membership is directly linked to the WP user database. The only thing that WP eMember does is allow a new user to be created and grants them appropriate priviledges dependent on their membership level. It does seem like there could be something happening with the sign-up

    When I activated WP multiuser it transferred all my plugins to the network admin panel instead of the individual site. WP eMember is now a network-wide plugin, along with BP. Since WP eMember creates a WP user account, I’m guessing it’s now creating user accounts outside of the main site and thus the main site doesn’t recognize the user? Perhaps I should move a bunch of plugins back to the main site instead of the whole network? I don’t really need any plugins for the user blogs so they could all be on the main site and things might work better. I’m not quite sure how I’d manage moving the plugins though.

    Boone Gorges
    Keymaster

    Thanks for the clarification. That makes a lot more sense.

    Go to Dashboard > BuddyPress > General Settings, and look at the setting for “Hide admin bar for logged out users?:” Does it say Yes? Try switching it to No.

    I’m guessing that users are not being added automatically to the BP root blog (a situation which would have been irrelevant in non-MS mode). It’s possible that either the setting I mention above, or something about the way that WP eMember handles membership in an MS network, is interfering with the way that the admin bar is conditionally displayed.

    #110456

    In reply to: Admin Profile page

    Hugo Ashmore
    Participant

    You could always edit the template files for /members/single/ (in a child theme) and wrap default actions in something like :

    `if( ‘1’ == bp_displayed_user_id() )`

    As a check for the displayed user being ‘1’ or primary network super_admin then you’ll do stuff based on that such as unique markup for that user alone or use in a ‘if not’ manner to hide certain profile display elements.

    That’s a basic approach you could extend that to be more flexible by checking a users role bp_displayed_user() checked against WP roles and capabilities for that user.

    #110157

    In reply to: Hide Admin

    explanetome
    Member

    @dmanthony : cool. not sure that I ‘ve understood where I should enter 99 to hide admin … ? :/ merci

    #109528
    @mercime
    Participant

    also, from @sbrajesh, an alternative to the the Stealth Mode for Super Admins – Put this code in bp-custom.php and None of the site admin activity will be recorded nor will you appear in the Who is Online/ recently active members widget. –

    `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
    }`

    #109525
    Virtuali
    Participant

    when admin post on wordpress, post also appeared on BuddyPress activity, as admin’s activity.

    how to prevent it? how to hide admin activity?

    Try this plugin https://buddypress.org/community/groups/buddypress-block-activity-stream-types/

    when admin post on wordpress, post also appeared on BuddyPress activity, as admin’s activity.

    how to prevent it? how to hide admin activity?

    wilsontray
    Member

    I added it but I still dont see an easy way to set it as a default theme for new blogs… did they just hide it with the new 3.1 multsite or somthing? Or did I install it incorrectly as now I dont have my superadmin menu just a way to toggle between network and site admin on the top menu bar

    #109474
    @mikey3d
    Participant

    If you are doing a research about (display:none), no one said it’s not the best way to use it. There is a purpose for using (display:none) to hide and it does not remove it.

Viewing 25 results - 626 through 650 (of 915 total)
Skip to toolbar