Search Results for 'hide admin in directory'
-
AuthorSearch Results
-
June 6, 2012 at 7:10 am #135334
In reply to: Exclude or Hide admin from Groups Members Directory
@mercime
ParticipantIf you have a bp-default child theme, copy group-header.php file.into your child theme folder as in wp-content/themes/yourchildtheme/groups/single/group-header.php
then delete lines 11-15 of said file. If you also want to delete Group Mods, then delete lines 7-30January 29, 2012 at 7:14 am #128781In reply to: hide admin from members list
@mercime
ParticipantYou mean you don’t want the Admin to be included in the list of members in members directory?
June 23, 2011 at 11:33 am #115091angslycke
ParticipantExcellent piece of information! Could prove to be really useful for me as well to hide administrators.
June 19, 2011 at 5:32 pm #114811MRSepehr
MemberHello 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.
May 10, 2011 at 5:54 am #111964In reply to: How Do I Remove Log Out From “My Account” Menu?
chrisreg1
MemberHmm 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.
January 7, 2011 at 6:52 pm #102176In reply to: Hide Directory
James
Participantok, core developer doesn’t know this line (?)

`remove_action(‘bp_adminbar_menus’, ‘bp_adminbar_blogs_menu’, 6);`
for those, who needs, it will hide “my blogs” and account-“blogs” from admin bar.
last stop – blogs in navigation, who will help?January 7, 2011 at 6:27 pm #102170In reply to: Hide Directory
James
Participanthuge step forward, thanks, blogs directory disappeared…but, my blogs in admin bar and blogs in navigation still here.
October 20, 2010 at 5:26 pm #95733In reply to: No register button ?
gillm
MemberI have this problem too. However, I can’t see where to set-up user registration in the BP admin section – these are the options I have under General Settings –
Disable BuddyPress to WordPress profile syncing?: Yes No
Hide admin bar for logged out users?: Yes No
Disable avatar uploads? (Gravatars will still work): Yes No
Disable user account deletion?: Yes No
Disable global forum directory?: Yes No
Disable activity stream commenting on blog and forum posts?:August 27, 2010 at 2:36 am #90525In reply to: adding links to header navigation
pcwriter
Participant.You could also try my plugin (he says with shameless self-promoting grin).
See this post for the latest beta version: https://buddypress.org/community/groups/add-all-nav-links-to-bp-adminbar/forum/topic/updated-the-beta/
Here are the user configuration options available in the admin panel under “Settings” > “BP-WP-Navbar”
– Hide or display the main theme navigation
– Hide or display the site name in your new adminbar
– Hide or display the Login and Signup links in the adminbar
– Hide or display the “Visit Random” menu
– Select whether to display top-level WordPress pages horizontally or in a dropdown menu
– Define the label for the dropdown in WordPress 2.x
– If you’re running WP3.x, the plugin will fetch whatever custom menu labels you assign and display them in the admin bar along with all child pages in dropdowns
– Define the label for the Buddypress directory dropdown (default = “Community”)
– Define the font, font-weight and font-style for all menu items
– Define ALL colors: navbar background, main and sub menu item backgrounds, border, text and hover colors too
– Set the overall width of the navbar and of sub-menus
– Set the height of all menu items
– Adjust margins where required
– Reposition your fancy new custom navbar anywhere you like, relative to your theme so it scrolls with your pagesIf you add categories to your custom menus in WP3.x, the plugin will pick them up and display them in whichever menus they are assigned to. Give it a whirl.
July 20, 2010 at 4:52 pm #86314Vera Schafer
ParticipantI was having a hard time trying to find the .htaccess file on my iMac, until I figured out that it is a hidden file (I’m working on MAMP Pro). If that is your case (Mac) , you have to unhide it.
June 8, 2010 at 12:17 am #80952In reply to: Run all Buddypress pages within Backend
@mercime
Participant@themeanwhile – you can enable or disable the various components so if you want Activities only, enable that and disable other components. After you activate BuddyPress, go to the new BuddyPress menu item on the left column of dashboard, and go to
a) General Settings – these are your choices
Base profile group name:
Full Name field name:
Disable BuddyPress to WordPress profile syncing?: Yes No
Hide admin bar for logged out users?: Yes No
Disable avatar uploads? (Gravatars will still work): Yes No
Disable user account deletion?: Yes No
Disable global forum directory?: Yes No
Disable activity stream commenting on blog and forum posts?: Yes No
Default User Avatar – For users without a custom avatar of their own, you can either display a generic logo or a generated one based on their email addressb) Component Setup
Activity Streams – Allow users to post activity updates and track all activity across the entire site.
Enabled Disabled
Blog Tracking – Tracks blogs, blog posts and blogs comments for a user across a WPMU installation.
Enabled Disabled
bbPress Forums – Activates bbPress forum support within BuddyPress groups or any other custom component.
Enabled Disabled
Friends – Allows the creation of friend connections between users.
Enabled Disabled
Groups – Let users create, join and participate in groups.
Enabled Disabled
Private Messaging – Let users send private messages to one another. Site admins can also send site-wide notices.
Enabled Disabled
Extended Profiles – Activates customizable profiles and avatars for site users.
Enabled DisabledI would suggest you set up a test install so you can check the features for yourself.
“Of course, activity filters, profile page, friends page, settings page, etc, would also need to be migrated to display in the backend.”
Why? If you want to make the BP Activity section private, you can add conditional tags for is_user_logged_in …June 6, 2010 at 11:38 pm #80860drifter0658
MemberIf you rename it now ( usually rename it/ wp-content/plugins1) that will hide access to the plugins from the admin portion of your site. You would then be able to get to your site’s admin panel. Once you log in and reach your admin panel, rename the plugins directory back to /wp-content/plugins.
The problem is most likely with the last plugin you activated.
June 4, 2010 at 4:20 pm #80665In reply to: Hide Admin
Mark
ParticipantSocialpreneur has a nice snippet here that makes it easy to hide the admin from the members list assuming you know the admin’s login name.
Place this in your bp-custom.php:
function my_bp_member_user_login() {
echo my_bp_get_member_user_login();
}
function my_bp_get_member_user_login() {
global $members_template;
return apply_filters( 'my_bp_get_member_user_login', $members_template->member->user_login );
}
Then in your members-loop.php file, place this just below the while statement (wrapped in php tags!):
if ( my_bp_get_member_user_login() == 'admin' ) continue ;(Supposing your admin’s login is ‘admin’.)
June 2, 2010 at 6:41 am #80370lee_vhoi_ol
MemberThanks for the reply, I just went into my wp-admin panel and on to Buddypress>General Settings but I do not find any Membership box. Here are the choices available:
Disable BuddyPress to WordPress profile syncing?: Yes No
Hide admin bar for logged out users?: Yes No
Disable avatar uploads? (Gravatars will still work): Yes No
Disable user account deletion?: Yes No
Disable global forum directory?: Yes No
Disable activity stream commenting on blog and forum posts?: Yes No
Default User AvatarI also tried the other sections under Buddypress, and they don’t seem to be there. Am I missing anything?
Thanks
April 28, 2010 at 4:46 pm #75710In reply to: Hide Admin
Paul Wong-Gibbs
KeymasterFebruary 12, 2010 at 2:15 am #63139snark
ParticipantI found this code that can be wrapped around anything to hide it from everyone but administrators or ediors:
<?php if ( current_user_can( ‘delete_others_posts’ ) ) { //only admins and editors can see this ?>
(Items to be hidden here)
<?php } ?>
To make it work specifically for hiding that “Create a Group” button, I made a new version of the default template’s groups –> index.php file in my child theme, replacing this:
<h3><?php _e( ‘Groups Directory’, ‘buddypress’ ) ?><?php if ( is_user_logged_in() ) : ?> Â “><?php _e( ‘Create a Group’, ‘buddypress’ ) ?><?php endif; ?></h3>
With this:
<h3><?php _e( ‘Groups Directory’, ‘buddypress’ ) ?><?php if ( current_user_can( ‘delete_others_posts’ ) ) : //only admins and editors can see this ?> Â “><?php _e( ‘Create a Group’, ‘buddypress’ ) ?><?php endif; ?></h3>
It worked like a charm! Now only Admins and Editors can create groups on my site.
January 24, 2010 at 6:38 pm #6152221cdb
ParticipantGreat work! I haven’t had the time for a detailed test, but i have some short feadback for the beginning:
1. Everything works fine and seems logical. Thats great. There could be some front-end twaeks, but i will come back later next week with some more detailed ideas and mockups.
2. From our experience it is great to have advanced edit functions but hide them in a second row from the avarage user (like the wordpress backend editor does). For a wiki article the user (students) should focus on the content instead of any fancy formating. Basic options could be a select-box for h1, h2, h3 (this is important and must be easy accessible, because it will build the toc and people should get used to it) bold, italic, url link, unordered list, and numberd list. Everything else could go in a second or third row which appears if you click some “advanced options” button.
3. (future release) A searchable wiki directory page with all public pages.
4. (future release) “Suggest a wiki page” button so that non admin-members could ask the admin to create a new wiki page for them.
5. (future release) non-admin wiki page creation
January 19, 2010 at 4:13 pm #61121In reply to: Multiple user types – possible?
Bowe
ParticipantI don’t have a solution for all your problems but assigning different “user” types to your site is easy:
– Create a xprofile field in your BuddyPress admin. For example: What kind of user are you:
a. Swimmer
b. Skater
c. Surfer
– Install the BP Member filter plugin: https://buddypress.org/forums/topic/bp-member-filter
– Users can now filter members on the member directory page to find certain usertypes
The only thing you might want to look into is to show/hide specific xprofile fields for different groups. That’s more advanced and requires some new code to be written by someone

Good luck!
edit: Maybe if you combine both tips from Boris and me you just got your solution

ps: I’m interested in the jquery profile fields stuff as well.. sounds handy!
January 1, 2010 at 7:42 pm #59885In reply to: Soon to release bp group control plugin
Anonymous User 96400
Inactivesetting up different group types is fairly easy. You just have to attach some groupmeta to the group, that basically let you add as many types as you’d like. Then you just check the metadata to figure out what type of group you’re in. Using the groups API you can then add different functionality for different groups.
I’ve written a types-plugin for one of my sites. It doesn’t have an interface, though. The 3 types I needed are hardcoded into it, so it’s really not suited for a release at the moment. There’s also a lot of more stuff, like a shopping cart, part of that plugin. So, I’ve stripped the functions needed for group types out (hopefully al of them).
First we need to add the addtional fields to our registration form:
function sv_add_registration_group_types()
{
?>
<div id="account-type" class="register-section">
<h3 class="transform"><?php _e( 'Choose your account type (required)', 'group-types' ) ?></h3>
<script type="text/javascript" defer="defer">
jQuery(document).ready(function(){
jQuery("#account-type-normal_user").attr("checked", true);
jQuery("#group-details").hide();
jQuery("#account-type-type_one,#account-type-type_two,#account-type-type_three").click(function(){
if (jQuery(this).is(":checked")) {
jQuery("#group-details").slideDown("slow");
} else {
jQuery("#group-details").slideUp("slow");
}
});
jQuery("#account-type-normal_user").click(function(){
if (jQuery(this).is(":checked")) {
jQuery("#group-details").slideUp("slow");
} else {
jQuery("#group-details").slideDown("slow");
}
});
});
</script>
<?php do_action( 'bp_account_type_errors' ) ?>
<label><input type="radio" name="account_type" id="account-type-normal_user" value="normal_user" checked="checked" /><?php _e( 'User', 'group-types' ) ?></label>
<label><input type="radio" name="account_type" id="account-type-type_one" value="type_one" /><?php _e( 'Type 1', 'group-types' ) ?></label>
<label><input type="radio" name="account_type" id="account-type-type_two" value="type_two" /><?php _e( 'Type 2', 'group-types' ) ?></label>
<label><input type="radio" name="account_type" id="account-type-type_three" value="type_three" /><?php _e( 'Type 3', 'group-types' ) ?></label>
<div id="group-details">
<p><?php _e( 'We will automatically create a group for your business or organization. This group will be tailored to your needs! You can change the description and the news later in the admin section of your group.', 'group-types' ); ?></p>
<?php do_action( 'bp_group_name_errors' ) ?>
<label for="group_name"><?php _e( 'Group Name', 'scuba' ) ?> <?php _e( '(required)', 'buddypress' ) ?></label>
<input type="text" name="group_name" id="group_name" value="" />
<br /><small><?php _e( 'We suggest you use the name of your business or organization', 'group-types' ) ?></small>
<label for="group_desc"><?php _e( 'Group Description', 'scuba' ) ?></label>
<textarea rows="5" cols="40" name="group_desc" id="group_desc"></textarea>
<br /><small><?php _e( 'This description will be visible on your group profile, so it could be used to present your mission statement for example.', 'group-types' ) ?></small>
<label for="group_news"><?php _e( 'Group News', 'scuba' ) ?></label>
<textarea rows="5" cols="40" name="group_news" id="group_news"></textarea>
<br /><small><?php _e( 'Enter any news that you want potential members to see.', 'group-types' ) ?></small>
</div>
</div>
<?php
}
add_action( 'bp_before_registration_submit_buttons', 'sv_add_registration_group_types' );Then we have to validate things and add some usermeta when a regitration happens:
/**
* Add custom userdata from register.php
* @since 1.0
*/
function sv_add_to_signup( $usermeta )
{
$usermeta['account_type'] = $_POST['account_type'];
if( isset( $_POST['group_name'] ) )
$usermeta['group_name'] = $_POST['group_name'];
if( isset( $_POST['group_desc'] ) )
$usermeta['group_desc'] = $_POST['group_desc'];
if( isset( $_POST['group_news'] ) )
$usermeta['group_news'] = $_POST['group_news'];
return $usermeta;
}
add_filter( 'bp_signup_usermeta', 'sv_add_to_signup' );
/**
* Update usermeta with custom registration data
* @since 1.0
*/
function sv_user_activate_fields( $user )
{
update_usermeta( $user['user_id'], 'account_type', $user['meta']['account_type'] );
if( isset( $user['meta']['group_name'] ) )
update_usermeta( $user['user_id'], 'group_name', $user['meta']['group_name'] );
if( isset( $user['meta']['group_desc'] ) )
update_usermeta( $user['user_id'], 'group_desc', $user['meta']['group_desc'] );
if( isset( $user['meta']['group_news'] ) )
update_usermeta( $user['user_id'], 'group_news', $user['meta']['group_news'] );
return $user;
}
add_filter( 'bp_core_activate_account', 'sv_user_activate_fields' );
/**
* Perform checks for custom registration data
* @since 1.0
*/
function sv_check_additional_signup()
{
global $bp;
if( empty( $_POST['account_type'] ) )
$bp->signup->errors['account_type'] = __( 'You need to choose your account type', 'group-types' );
if( empty( $_POST['group_name'] ) && $_POST['account_type'] != 'normal_user' )
$bp->signup->errors['group_name'] = __( 'You need to pick a group name', 'group-types' );
if( ! empty( $_POST['group_name'] ) && $_POST['account_type'] != 'normal_user' )
{
$slug = sanitize_title_with_dashes( $_POST['group_name'] );
$exist = groups_check_group_exists( $slug );
if( $exist )
$bp->signup->errors['group_name'] = __( 'This name is not available. If you feel this is a mistake, please <a href="/contact">contact us</a>.', 'group-types' );
}
}
add_action( 'bp_signup_validate', 'sv_check_additional_signup' );And then we set up the group for the user (there are some constants in this function, so you’ll need to change that):
/**
* Create custom groups for skools, biz and org accounts
* @since 1.0
*/
function sv_init_special_groups( $user )
{
global $bp;
// get account type
$type = get_usermeta( $user['user_id'], 'account_type' );
if( $type == 'normal_user' )
{
// Do nothing
}
elseif( $type == 'type_one' || $type == 'type_two' || $type == 'type_three' )
{
// get some more data from sign up
$group_name = get_usermeta( $user['user_id'], 'group_name' );
$group_desc = get_usermeta( $user['user_id'], 'group_desc' );
$group_news = get_usermeta( $user['user_id'], 'group_news' );
$slug = sanitize_title_with_dashes( $group_name );
// create dive skool group
$group_id = groups_create_group( array(
'creator_id' => $user['user_id'],
'name' => $group_name,
'slug' => $slug,
'description' => $group_desc,
'news' => $group_news,
'status' => 'public',
'enable_wire' => true,
'enable_forum' => true,
'date_created' => gmdate('Y-m-d H:i:s')
)
);
// add the type to our group
groups_update_groupmeta( $group_id, 'group_type', $type );
// delete now useless data
delete_usermeta( $user['user_id'], 'group_name' );
delete_usermeta( $user['user_id'], 'group_desc' );
delete_usermeta( $user['user_id'], 'group_news' );
// include PHPMailer
require_once( SV_MAILER . 'class.phpmailer.php' );
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->Host = SV_SMTP;
$auth = get_userdata( $user['user_id'] );
$profile_link = $bp->root_domain . '/' . $bp->groups->slug . '/' . $slug . '/admin';
$message = sprintf( __( 'Hello %s,
we have created a group for your business or organization. To get more out of your presence on Yoursitenamehere please take some time to set it up properly.
Please follow this link to fill in the rest of your profile: %s
We wish you all the best. Should you have any questions regarding your new group, please contact us at support@yoursitenamehere.com.
Your Yoursitenamehere Team', 'group-types' ), $auth->display_name, $profile_link );
$mail->SetFrom("support@yoursitenamehere.com","Yoursitenamehere");
$mail->AddAddress( $auth->user_email );
$mail->Subject = __( 'Your new group pages on Yoursitenamehere', 'group-types' );
$mail->Body = $message;
$mail->WordWrap = 75;
$mail->Send();
}
}
add_action( 'bp_core_account_activated', 'sv_init_special_groups' );When you write a group extension we’ll have to swap the activation call with a function like the one below to be able to check for group types.
/**
* Replacement activation function for group extension classes
*/
function activate_type_one()
{
global $bp;
$type = groups_get_groupmeta( $bp->groups->current_group->id, 'group_type' );
if( $type == 'type_one' )
{
$extension = new Group_Type_One;
add_action( "wp", array( &$extension, "_register" ), 2 );
}
}
add_action( 'plugins_loaded', 'activate_type_one' );The last thing we need to do is add our group type names to group and directory pages:
/**
* Modify the group type status
*/
function sv_get_group_type( $type, $group = false )
{
global $groups_template;
if( ! $group )
$group =& $groups_template->group;
$gtype = groups_get_groupmeta( $group->id, 'group_type' );
if( $gtype == 'type_one' )
$name = __( 'Type 1', 'group-types' );
elseif( $gtype == 'type_two' )
$name = __( 'Type 2', 'group-types' );
elseif( $gtype == 'type_three' )
$name = __( 'Type 3', 'group-types' );
else
$name = __( 'User Group', 'group-types' );
if( 'public' == $group->status )
{
$type = sprintf( __( "%s (public)", "group-types" ), $name );
}
elseif( 'hidden' == $group->status )
{
$type = sprintf( __( "%s (hidden)", "group-types" ), $name );
}
elseif( 'private' == $group->status )
{
$type = sprintf( __( "%s (private)", "group-types" ), $name );
}
else
{
$type = ucwords( $group->status ) . ' ' . __( 'Group', 'buddypress' );
}
return $type;
}
add_filter( 'bp_get_group_type', 'sv_get_group_type' );
/**
* Modify the group type status on directory pages
*/
function sv_get_the_site_group_type()
{
global $site_groups_template;
return sv_get_group_type( '', $site_groups_template->group );
}
add_filter( 'bp_get_the_site_group_type', 'sv_get_the_site_group_type' );It’s quite a bit of code, but it should get you started. This hasn’t been tested with 1.2 btw.
May 2, 2009 at 6:37 pm #44161In reply to: Antispam plugin
Paul Wong-Gibbs
KeymasterPossible user error.
@Arturo – check this from the readme. You might have missed it to.To install in WordPress MU (Forced Activation/Site-Wide):
1. Upload the
wp-recaptchafolder to the/wp-content/mu-pluginsdirectory1. **Move** the
wp-recaptcha.phpfile out of thewp-recaptchafolder so that it is in/wp-content/mu-plugins1. Now you should have
/wp-content/mu-plugins/wp-recaptcha.phpand/wp-content/mu-plugins/wp-recaptcha/1. Go to the administrator menu and then go to **Site Admin > reCAPTCHA**
1. Get the reCAPTCHA keys [here](http://recaptcha.net/api/getkey?domain=www.blaenkdenum.com&app=wordpress \”reCAPTCHA API keys\”) and/or the MailHide keys [here](http://mailhide.recaptcha.net/apikey \”MailHide keys\”)
-
AuthorSearch Results