Search Results for 'Hide Admin'
-
AuthorSearch Results
-
November 26, 2024 at 6:54 pm #335752
GyziieDK
ParticipantHello guys!
I’ve seen this question in here a couple of times and maybe others would enjoy this code.
I couldn’t find a good solution in trying to “hide” the official and hidden groups, when users are creating them (it just would not allow me to hide them!).I then managed to fix a code and make it work so at least it shows an error when a user (besides admin) tries to create a group that is NOT private. In this way when a user tries to create a public/hidden group it will not allow the user to “proceed” with the next step unless private group is chosen.
Feel free to update the CSS to your liking!
Hope it helps, enjoy! 🙂
function restrict_group_type_selection() { // Ensure this script only runs during the group settings creation step if (bp_is_group_creation_step('group-settings')) { // Check if the user is not an admin (wrap the condition outside the script for cleaner HTML output) if (!current_user_can('manage_options')) { ?> <style type="text/css"> .group-type-error-message { color: #ffffff; background-color: #f95959; position: relative; margin-top: 20px !important; border: 0 !important; font-weight: 600; } } </style> <script type="text/javascript"> document.addEventListener('DOMContentLoaded', function () { const nextButton = document.getElementById('group-creation-next'); // Target the "Next step" button if (nextButton) { nextButton.addEventListener('click', function (event) { const selectedGroupType = document.querySelector('input[name="group-status"]:checked'); let errorContainer = document.getElementById('group-type-error-message'); // Remove any existing error message if (errorContainer) { errorContainer.remove(); } if (!selectedGroupType || selectedGroupType.value !== 'private') { // Prevent moving to the next step if the group type is not 'private' event.preventDefault(); // Create and display a styled error message errorContainer = document.createElement('div'); errorContainer.id = 'group-type-error-message'; errorContainer.className = 'group-type-error-message'; errorContainer.innerText = 'You are only allowed to create private groups.'; // Insert the error message after the "Next" button nextButton.parentNode.appendChild(errorContainer); } }); } }); </script> <?php } } } add_action('bp_after_group_settings_creation_step', 'restrict_group_type_selection');
November 17, 2024 at 10:04 am #335662In reply to: After WordPress 6.7 release, buddypress fails
wpuser
ParticipantHi there,
I had the issue with posting a reply yesterday too. Weird.
That is why I split my message in 2 and than I could post it.I was able to read your share txt and the next replies and also view that images.
Anyway… I am willing (if you are willing to put the time in it) to give you access to my staging site, but I rather not post the link in public, to avoid traffic from Google and such to that staging website. But there does not seem to be a way to share the link with you in private. Do you have any suggestions?
To further explain my situation: I did not make any customizations to my buddypress or xprofile plugin that have anything to do with the profile fields. From the clean install, the “Name” field is already there from the start, when installing the buddypress plugin.
I am not adding users via the admin section, I am letting them signup via the website register form. So following this process, the situation is as described before, where the “Name” will be filled in by the user as part of the registration process. The Name field is mandatory, set by Buddypress, which I can not influence nor rename.
I did nothing to influence the Name field, other than translating it like I explained before.
The Name is operating as a seperate field, that does not seem to link to username by default. And that is also not what I want. Because it would lead to the username being shown twice on a profile page, which is ridicilous of course. Since you can not block or hide the Name field, it will be there. Also, the Name field is always on the register form, and the field is mandatory (which you cannot change), so people CAN and probably will fill in something different than their username. Most likely their first name. Which is what happened on my site anyway, people fill in their regular first name. Only a handfull will choose like a second username/nickname for the field value. Anyway, in 99% process of the time, the Name field is populated with a different value than the username as a result of the website registration process (which is not changed, it is by default like that, since installing buddypress).I use the BuddyX theme. But the issue is not related to the theme, because using a default WordPress theme (like twenty two or so), will have the same result.
So, it poses as a problem, if the usernames show up on the userlist, but the sorting will go on the “Name” field, which is not identical to the username. This will lead to a really undesired situation, where the sorting does not seem to work properly on the frontend, because “invisible” the userlist is sorted on the Name field.
And also, this is new. Before, this was not the case. It did NOT sort on the “Name” field. And I’m oblivious why it does now, what is the intent by changing this.
So, to address the situation, and to avoid having duplicate usernames on the profile page, I would rather stick with people using the Name field as their first name or something like that.
I would like to sort on display name. Is there a way to do that? Do you have a suggestion?
August 19, 2024 at 2:53 am #334940stephunique
ParticipantHello all,
I have hidden myself as an admin, on my test site running buddypress, for obvious reasons. However, I discovered that when composing a message using Buddypress messages, when the user types in a partial name of the recipient, even a single letter, everyone that matches that name will show up, even if they are hidden from the directory. For example, typing “@a” will show “@admin” (me) as well as “@adam” or “@amanda” and this is no good.
Is there a way to remove certain users (ideally by user roles) from showing up in the “to” field?
I have WordPress 6.6.1 and Buddypress 14.0.0.
Thank you
August 9, 2024 at 2:21 pm #334864In reply to: Signup api end point not working
Renato Alves
ModeratorThree things:
– I can’t replicate the issue you have.
–user_name
is not a valid field, btw. It was deprecated.Using the followwing payload, I actually get this in BuddyPress 14.0 since you are using
+
in theuser_login
, that’s not valid.Request Payload.
curl -X POST "https://bp-demo.test/wp-json/buddypress/v1/signup/" \ -d "context=edit" \ -d "user_email=pratik@testmail.com" \ -d "user_login=testthe+request+" \ -d "password=\"']));L)Q542q8dL3" \ -d "signup_field_data[0][field_id]=1" \ -d "signup_field_data[0][value]=testthe+request+" \ -d "state=gggg" \ -d "country=AZE" \ -d "postal_code=444444" \ -d "mobile_phone=555555555"
{ "code": "bp_rest_signup_validation_failed", "data": { "status": 500 }, "message": "Usernames can contain only letters, numbers, ., -, and @" }
Here is the BP configuration I have locally, taken from my local site: https://bp-demo.test/wp-admin/site-health.php?tab=debug
version: 14.0.0 active_components: Extended Profiles, Settings, Friend Connections, Private Messages, Activity Streams, Notifications, User Groups, Site Directory, Members, Members Invitations url_parser: BP Rewrites API global_community_visibility: anyone template_pack: BuddyPress Nouveau 14.0.0 ! hide-loggedout-adminbar: Yes ! bp-disable-account-deletion: Yes ! bp-disable-avatar-uploads: Yes ! bp-disable-cover-image-uploads: Yes bp-enable-members-invitations: No bp-enable-membership-requests: No ! bp-disable-profile-sync: Yes ! bp_restrict_group_creation: Yes ! bp-disable-group-avatar-uploads: Yes ! bp-disable-group-cover-image-uploads: Yes ! bp-disable-group-activity-deletions: Yes ! bp-disable-blogforum-comments: No _bp_enable_heartbeat_refresh: Yes
June 25, 2024 at 9:46 am #334444In reply to: Hide own profile
Abhishek Saini
ParticipantIf you want to hide currunt loggedin user from member directory you can easily use this code snippet.
`function buddyx_exclude_users( $args ) {
if ( is_admin() && ! defined( ‘DOING_AJAX’ ) ) {
return $args;
}$excluded = isset( $args[‘exclude’] ) ? $args[‘exclude’] : array();
if ( ! is_array( $excluded ) ) {
$excluded = explode( ‘,’, $excluded );
}
$user_id = bp_loggedin_user_id();$user_ids = array(‘user_id’ => $user_id); // user ids to exclude.
$excluded = array_merge( $excluded, $user_ids );
$args[‘exclude’] = $excluded;
return $args;
}add_filter( ‘bp_after_has_members_parse_args’, ‘buddyx_exclude_users’ );
May 16, 2024 at 5:25 am #334041Topic: How to hide users from being listed?
in group forum Requests & Feedbackingela.vragard@webbreda.se
ParticipantThe administration is not a member and we do not what him to show in memberslist.
Using BuddyPress Version 12.5.0.Any idea?
April 22, 2024 at 9:42 pm #333832In reply to: Manage Groups Menu Item
planetearthlings
ParticipantHi Pooja…since I have “Enable group creation for all users” turned OFF I do NOT want to have the “Manage Groups” menu item to show up for non-Admin users, but as you can see with the attached screen capture when a non-Admin user clicks on the settings cog on the top right the “Manage Groups” menu item is still there. Trying to figure out how to hide that for anyone who isn’t an Admin. Thanks again!
March 14, 2024 at 9:17 am #333447In reply to: Post comments not appearing in activity stream?
lostinpress
ParticipantThere can be a few reasons why comments aren’t showing up in your activity stream. Here’s how to troubleshoot the issue:
Check Settings:
Platform Settings: Verify that comments are enabled for the activity stream and for the specific content type (e.g., blog posts, forum discussions) you’re looking at. This might be in your platform’s administration panel.
Comment Moderation: Is comment moderation enabled? Comments might be waiting for approval before showing up.Content vs. Stream:
Comment Location: Were the comments made directly on the post or within the activity stream itself? Some platforms only show comments made on the original post in the activity stream.Technical Issues:
Cache: Clear your browser cache and reload the page. Outdated cached data might hide comments.
Plugins/Themes: If you’re using a custom theme or plugins related to activity streams or comments, try temporarily deactivating them to see if there’s a conflict.Platform Specifics:
For example, BuddyPress (a popular social networking plugin for WordPress) has settings related to where comments appear in the activity stream. Look for documentation specific to your platform.February 8, 2024 at 4:11 am #333120In reply to: Member pages are empty after upgrading to version 12
Jose
ParticipantMy BP Configuration:
version: 12.2.0
active_components: Community Members, Extended Profiles, Account Settings, Private Messaging, Activity Streams, Notifications
template_pack: BuddyPress Nouveau 12.2.0
url_parser: Legacy Parser
hide-loggedout-adminbar: No
bp-disable-account-deletion: No
bp-disable-avatar-uploads: Yes
bp-disable-cover-image-uploads: Yes
bp-enable-members-invitations: undefined
bp-enable-membership-requests: undefined
bp-disable-profile-sync: No
bp-disable-blogforum-comments: No
_bp_enable_heartbeat_refresh: YesJanuary 26, 2024 at 11:19 pm #332963In reply to: How to disable the member (directory) page?
emaralive
ModeratorHi @jchretien, in lieu of trying to hide the Members directory; have you considered using Member Types as a way to filter which Members are listed within the Members directory (as in admin (list all) vs non-admin (only list Therapists)?
January 19, 2024 at 6:02 am #332872In reply to: How to disable the member (directory) page?
jchretien
ParticipantIt seems this directory stuff was depracated in the location you mentioned. Does this still exist? I need to hide this page too from anyone not admin. We use this in the medical space, so we WANT to show those that are assigned as Therapists, but we CANNOT show the people that sign up as a patient.
November 6, 2023 at 11:21 am #331822In reply to: hiding activity form for all users except admin
ericwillson
ParticipantTo achieve the functionality you described, you can add the following PHP code snippet to your WordPress plugin or theme’s functions.php file. This code will hide the activity form from all users except admins:
php
Copy code
function hide_activity_form_for_non_admins() {
if ( ! current_user_can( ‘administrator’ ) ) {
?>
<style type=”text/css”>
.activity-form-class {
display: none;
}
</style>
<?php
}
}
add_action( ‘admin_head’, ‘hide_activity_form_for_non_admins’ );
In this code snippet:current_user_can(‘administrator’) checks if the current user is an administrator.
If the current user is not an administrator, it adds a <style> block to the <head> of the admin pages, setting the CSS property display: none; for the element with the class activity-form-class. Make sure to replace activity-form-class with the actual class name or ID of the activity form element in your HTML markup.
EXP3RTS ensures you have a backup of your site or are comfortable with making changes to your theme/plugin files before adding this code. Additionally, modify the class name in the code to match the actual class or ID of your activity form for it to work correctly.
I HOPE THIS IS BENEFICIAL FOR YOUNovember 6, 2023 at 1:13 am #331812exp3rts
Participanthello,
im a none developer and would like to ask if there is a code that you could provide for me to put it into the plugin code snippet (php code) which would hide the activity form (on all sites) from user but stay visible for admins only.
thanks a lot
October 21, 2023 at 5:50 am #331678Topic: Users login on the backoffice!!
in forum How-to & Troubleshootinglemiran
ParticipantHi there
I have a wordpress v6.3.2 with
> BuddyPress v11.3.2
> ProfileBuilder v3.10.1 (in order to have custom fields during registration)
> Elementor ProI have 2 weird behaviour.
1- Non admin users, can see the admin bar with… MY account when they logged in.
Fortunately, they cannot go in my account.
To avoid that, for the moment i installed a plugin : Hide Admin Bar Based on User Roles2- The non admin accounts go directly in the backoffice when they log in (with the connexion button widget of elementor)
Could you please help me?
Best regards
August 29, 2023 at 12:21 pm #331041In reply to: deny access to subscriber profile
rammysons
ParticipantHello,
It seems like you’re working on a multi-author website and you’re looking for a way to control access to user profiles. Specifically, you’ve implemented code to deny access to administrators’ profiles, and you’re interested in extending this functionality to subscribers as well.
To achieve this, you can modify the code you provided to include conditions for subscribers. Here’s an example of how you might achieve this:
php
Copy code
// deny access to admins and subscribers profiles. Users are redirected to the homepage
function bpfr_hide_admins_and_subs_profile() {
global $bp;// Get the current user’s role
$current_user = wp_get_current_user();
$user_roles = $current_user->roles;// Check if the user is an admin or a subscriber
if (bp_is_profile && $bp->loggedin_user->id != 1 &&
(in_array(‘administrator’, $user_roles) || in_array(‘subscriber’, $user_roles))) :
wp_redirect(home_url());
exit;
endif;
}
add_action(‘wp’, ‘bpfr_hide_admins_and_subs_profile’, 1);
This code snippet checks if the currently displayed user’s role is either “administrator” or “subscriber,” and if the conditions are met, it redirects the user to the homepage.Remember to replace ‘administrator’ and ‘subscriber’ with the actual role names used in your WordPress setup.
Thank you for reaching out, and a special shoutout to “TWITCHFOLLOWERFORGE“. If you have any further questions or need additional assistance, feel free to ask!
August 29, 2023 at 9:56 am #331036fppmarketing
ParticipantHi
I would like to hide the two columns in the members directory: role and activity as this is not interesting on our intranet.
Here’s the link to a screenshot: https://tinyurl.com/22pahgnt so the column ‘Rol’ (=role)(Beheerder = Administrator) and ‘Activiteit’ (=Activity) should be hidden.
How can I hide this? Can’t find it in the theme options of Woffice.
Thank you!
March 7, 2023 at 8:30 am #328619Topic: Button participate in the group and leave
in group forum Requests & Feedbackesparza28
ParticipantHello! We are using buddypress as a plugin for an intranet. We use the groups as company departments, and we manage the users as administrators.
Then it is bad for us, that the users get the button to participate / leave the group, because they can inadvertently leave or enter the wrong department.
Is there some kind of snippet that can hide these buttons? Thank you
January 29, 2023 at 5:07 pm #328174In reply to: remove group privacy
edensan
Participantokay here is the php code for every privacy set to public:
<?php /** * BP Nouveau Group's edit settings template. * * This template can be overridden by copying it to yourtheme/buddypress/groups/single/admin/group-settings.php. * * @since BuddyPress 3.0.0 * @version 1.0.0 */ ?> <?php if ( bp_is_group_create() ) : ?> <h3 class="bp-screen-title creation-step-name"> <?php esc_html_e( 'Select Group Settings', 'buddyboss' ); ?> </h3> <?php else : ?> <h2 class="bp-screen-title"> <?php esc_html_e( 'Change Group Settings', 'buddyboss' ); ?> </h2> <?php endif; ?> <div class="group-settings-selections"> <fieldset class="radio group-status-type"> <legend><?php esc_html_e( 'Privacy Options', 'buddyboss' ); ?></legend> <div class="bp-radio-wrap"> <input type="radio" name="group-status" id="group-status-public" class="bs-styled-radio" value="public" <?php if ( 'public' === bp_get_new_group_status() || ! bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> aria-describedby="public-group-description" /> <label for="group-status-public"><?php esc_html_e( 'This is a public group', 'buddyboss' ); ?></label> </div> <ul id="public-group-description"> <li><?php esc_html_e( 'Any site member can join this group.', 'buddyboss' ); ?></li> <li><?php esc_html_e( 'This group will be listed in the groups directory and in search results.', 'buddyboss' ); ?></li> <li><?php esc_html_e( 'Group content and activity will be visible to any site member.', 'buddyboss' ); ?></li> </ul> <?php /** DIT UITGEVINKT DOOR EDWIN <div class="bp-radio-wrap"> <input type="radio" name="group-status" id="group-status-private" class="bs-styled-radio" value="private" <?php if ( 'private' === bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> aria-describedby="private-group-description" /> <label for="group-status-private"><?php esc_html_e( 'This is a private group', 'buddyboss' ); ?></label> </div> <ul id="private-group-description"> <li><?php esc_html_e( 'Only people who request membership and are accepted can join the group.', 'buddyboss' ); ?></li> <li><?php esc_html_e( 'This group will be listed in the groups directory and in search results.', 'buddyboss' ); ?></li> <li><?php esc_html_e( 'Group content and activity will only be visible to members of the group.', 'buddyboss' ); ?></li> </ul> <div class="bp-radio-wrap"> <input type="radio" name="group-status" id="group-status-hidden" class="bs-styled-radio" value="hidden" <?php if ( 'hidden' === bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> aria-describedby="hidden-group-description" /> <label for="group-status-hidden"><?php esc_html_e( 'This is a hidden group', 'buddyboss' ); ?></label> </div> <ul id="hidden-group-description"> <li><?php esc_html_e( 'Only people who are invited can join the group.', 'buddyboss' ); ?></li> <li><?php esc_html_e( 'This group will not be listed in the groups directory or search results.', 'buddyboss' ); ?></li> <li><?php esc_html_e( 'Group content and activity will only be visible to members of the group.', 'buddyboss' ); ?></li> </ul> DIT UITGEVINKT DOOR EDWIN */ ?> </fieldset> <fieldset class="radio group-invitations"> <legend><?php esc_html_e( 'Group Invitations', 'buddyboss' ); ?></legend> <p class="group-setting-label" tabindex="0"><?php esc_html_e( 'Which members of this group are allowed to invite others?', 'buddyboss' ); ?></p> <div class="bp-radio-wrap"> <input type="radio" name="group-invite-status" id="group-invite-status-members" class="bs-styled-radio" value="members"<?php bp_group_show_invite_status_setting( 'members' ); ?> /> <label for="group-invite-status-members"><?php esc_html_e( 'All group members', 'buddyboss' ); ?></label> </div> <?php /** <div class="bp-radio-wrap"> <input type="radio" name="group-invite-status" id="group-invite-status-mods" class="bs-styled-radio" value="mods"<?php bp_group_show_invite_status_setting( 'mods' ); ?> /> <label for="group-invite-status-mods"><?php esc_html_e( 'Organizers and Moderators only', 'buddyboss' ); ?></label> </div> <div class="bp-radio-wrap"> <input type="radio" name="group-invite-status" id="group-invite-status-admins" class="bs-styled-radio" value="admins"<?php bp_group_show_invite_status_setting( 'admins' ); ?> /> <label for="group-invite-status-admins"><?php esc_html_e( 'Organizers only', 'buddyboss' ); ?></label> </div> */ ?> </fieldset> <fieldset class="radio group-post-form"> <legend><?php esc_html_e( 'Activity Feeds', 'buddyboss' ); ?></legend> <p class="group-setting-label" tabindex="0"><?php esc_html_e( 'Which members of this group are allowed to post into the activity feed?', 'buddyboss' ); ?></p> <div class="bp-radio-wrap"> <input type="radio" name="group-activity-feed-status" id="group-activity-feed-status-members" class="bs-styled-radio" value="members"<?php bp_group_show_activity_feed_status_setting( 'members' ); ?> /> <label for="group-activity-feed-status-members"><?php esc_html_e( 'All group members', 'buddyboss' ); ?></label> </div> <?php /** <div class="bp-radio-wrap"> <input type="radio" name="group-activity-feed-status" id="group-activity-feed-status-mods" class="bs-styled-radio" value="mods"<?php bp_group_show_activity_feed_status_setting( 'mods' ); ?> /> <label for="group-activity-feed-status-mods"><?php esc_html_e( 'Organizers and Moderators only', 'buddyboss' ); ?></label> </div> <div class="bp-radio-wrap"> <input type="radio" name="group-activity-feed-status" id="group-activity-feed-status-admins" class="bs-styled-radio" value="admins"<?php bp_group_show_activity_feed_status_setting( 'admins' ); ?> /> <label for="group-activity-feed-status-admins"><?php esc_html_e( 'Organizers only', 'buddyboss' ); ?></label> </div> */ ?> </fieldset> <?php if ( bp_is_active( 'media' ) && bp_is_group_media_support_enabled() ) : ?> <fieldset class="radio group-media"> <legend><?php esc_html_e( 'Group Photos', 'buddyboss' ); ?></legend> <p class="group-setting-label" tabindex="0"><?php esc_html_e( 'Which members of this group are allowed to upload photos?', 'buddyboss' ); ?></p> <div class="bp-radio-wrap"> <input type="radio" name="group-media-status" id="group-media-status-members" class="bs-styled-radio" value="members"<?php bp_group_show_media_status_setting( 'members' ); ?> /> <label for="group-media-status-members"><?php esc_html_e( 'All group members', 'buddyboss' ); ?></label> </div> <?php /** <div class="bp-radio-wrap"> <input type="radio" name="group-media-status" id="group-media-status-mods" class="bs-styled-radio" value="mods"<?php bp_group_show_media_status_setting( 'mods' ); ?> /> <label for="group-media-status-mods"><?php esc_html_e( 'Organizers and Moderators only', 'buddyboss' ); ?></label> </div> <div class="bp-radio-wrap"> <input type="radio" name="group-media-status" id="group-media-status-admins" class="bs-styled-radio" value="admins"<?php bp_group_show_media_status_setting( 'admins' ); ?> /> <label for="group-media-status-admins"><?php esc_html_e( 'Organizers only', 'buddyboss' ); ?></label> </div> */ ?> </fieldset> <?php endif; ?> <?php if ( bp_is_active( 'media' ) && bp_is_group_albums_support_enabled() ) : ?> <fieldset class="radio group-albums"> <legend><?php esc_html_e( 'Group Albums', 'buddyboss' ); ?></legend> <p class="group-setting-label" tabindex="0"><?php esc_html_e( 'Which members of this group are allowed to create albums?', 'buddyboss' ); ?></p> <div class="bp-radio-wrap"> <input type="radio" name="group-album-status" id="group-albums-status-members" class="bs-styled-radio" value="members"<?php bp_group_show_albums_status_setting( 'members' ); ?> /> <label for="group-albums-status-members"><?php esc_html_e( 'All group members', 'buddyboss' ); ?></label> </div> <?php /** <div class="bp-radio-wrap"> <input type="radio" name="group-album-status" id="group-albums-status-mods" class="bs-styled-radio" value="mods"<?php bp_group_show_albums_status_setting( 'mods' ); ?> /> <label for="group-albums-status-mods"><?php esc_html_e( 'Organizers and Moderators only', 'buddyboss' ); ?></label> </div> <div class="bp-radio-wrap"> <input type="radio" name="group-album-status" id="group-albums-status-admins" class="bs-styled-radio" value="admins"<?php bp_group_show_albums_status_setting( 'admins' ); ?> /> <label for="group-albums-status-admins"><?php esc_html_e( 'Organizers only', 'buddyboss' ); ?></label> </div> */ ?> </fieldset> <?php endif; ?> <?php if ( bp_is_active( 'media' ) && bp_is_group_document_support_enabled() ) : ?> <fieldset class="radio group-document"> <legend><?php esc_html_e( 'Group Documents', 'buddyboss' ); ?></legend> <p class="group-setting-label" tabindex="0"><?php esc_html_e( 'Which members of this group are allowed to upload documents?', 'buddyboss' ); ?></p> <div class="bp-radio-wrap"> <input type="radio" name="group-document-status" id="group-document-status-members" class="bs-styled-radio" value="members"<?php bp_group_show_document_status_setting( 'members' ); ?> /> <label for="group-document-status-members"><?php esc_html_e( 'All group members', 'buddyboss' ); ?></label> </div> <?php /** <div class="bp-radio-wrap"> <input type="radio" name="group-document-status" id="group-document-status-mods" class="bs-styled-radio" value="mods"<?php bp_group_show_document_status_setting( 'mods' ); ?> /> <label for="group-document-status-mods"><?php esc_html_e( 'Organizers and Moderators only', 'buddyboss' ); ?></label> </div> <div class="bp-radio-wrap"> <input type="radio" name="group-document-status" id="group-document-status-admins" class="bs-styled-radio" value="admins"<?php bp_group_show_document_status_setting( 'admins' ); ?> /> <label for="group-document-status-admins"><?php esc_html_e( 'Organizers only', 'buddyboss' ); ?></label> </div> */ ?> </fieldset> <?php endif; ?> <?php if ( bp_is_active( 'video' ) && bp_is_group_video_support_enabled() ) : ?> <fieldset class="radio group-video"> <legend><?php esc_html_e( 'Group Videos', 'buddyboss' ); ?></legend> <p class="group-setting-label" tabindex="0"><?php esc_html_e( 'Which members of this group are allowed to upload videos?', 'buddyboss' ); ?></p> <div class="bp-radio-wrap"> <input type="radio" name="group-video-status" id="group-video-status-members" class="bs-styled-radio" value="members"<?php bp_group_show_video_status_setting( 'members' ); ?> /> <label for="group-video-status-members"><?php esc_html_e( 'All group members', 'buddyboss' ); ?></label> </div> <?php /** <div class="bp-radio-wrap"> <input type="radio" name="group-video-status" id="group-video-status-mods" class="bs-styled-radio" value="mods"<?php bp_group_show_video_status_setting( 'mods' ); ?> /> <label for="group-video-status-mods"><?php esc_html_e( 'Organizers and Moderators only', 'buddyboss' ); ?></label> </div> <div class="bp-radio-wrap"> <input type="radio" name="group-video-status" id="group-video-status-admins" class="bs-styled-radio" value="admins"<?php bp_group_show_video_status_setting( 'admins' ); ?> /> <label for="group-video-status-admins"><?php esc_html_e( 'Organizers only', 'buddyboss' ); ?></label> </div> */ ?> </fieldset> <?php endif; ?> <?php if ( bp_is_active( 'messages' ) && true === bp_disable_group_messages() ) : ?> <fieldset class="radio group-messages"> <legend><?php esc_html_e( 'Group Messages', 'buddyboss' ); ?></legend> <p class="group-setting-label" tabindex="0"><?php esc_html_e( 'Which members of this group are allowed to send group messages?', 'buddyboss' ); ?></p> <div class="bp-radio-wrap"> <input checked type="radio" name="group-message-status" id="group-messages-status-members" class="bs-styled-radio" value="members"<?php bp_group_show_messages_status_setting( 'members' ); ?> /> <label for="group-messages-status-members"><?php esc_html_e( 'All group members', 'buddyboss' ); ?></label> </div> <?php /** <div class="bp-radio-wrap"> <input type="radio" name="group-message-status" id="group-messages-status-mods" class="bs-styled-radio" value="mods"<?php bp_group_show_messages_status_setting( 'mods' ); ?> /> <label for="group-messages-status-mods"><?php esc_html_e( 'Organizers and Moderators only', 'buddyboss' ); ?></label> </div> <div class="bp-radio-wrap"> <input type="radio" name="group-message-status" id="group-messages-status-admins" class="bs-styled-radio" value="admins"<?php bp_group_show_messages_status_setting( 'admins' ); ?> /> <label for="group-messages-status-admins"><?php esc_html_e( 'Organizers only', 'buddyboss' ); ?></label> </div> */ ?> </fieldset> <?php endif; ?> <?php $group_types = bp_groups_get_group_types( array( 'show_in_create_screen' => true ), 'objects' ); // Hide Group Types if none is selected in Users > Profile Type > E.g. (Students) > Allowed Group Types meta box. if ( false === bp_restrict_group_creation() && true === bp_member_type_enable_disable() ) { $get_all_registered_member_types = bp_get_active_member_types(); if ( isset( $get_all_registered_member_types ) && ! empty( $get_all_registered_member_types ) ) { $current_user_member_type = bp_get_member_type( bp_loggedin_user_id() ); if ( '' !== $current_user_member_type ) { $member_type_post_id = bp_member_type_post_by_type( $current_user_member_type ); $include_group_type = get_post_meta( $member_type_post_id, '_bp_member_type_enabled_group_type_create', true ); if ( isset( $include_group_type ) && ! empty( $include_group_type ) && 'none' === $include_group_type[0] ) { $group_types = ''; } } } } // Group type selection if ( $group_types ) : ?> <fieldset class="group-create-types"> <legend><?php esc_html_e( 'Group Type', 'buddyboss' ); ?></legend> <p class="group-setting-label" tabindex="0"><?php esc_html_e( 'What type of group is this? (optional)', 'buddyboss' ); ?></p> <select id="bp-groups-type" name="group-types[]" autocomplete="off"> <option value="" <?php selected( '', '' ); ?>><?php _e( 'Select Group Type', 'buddyboss' ); ?></option> <?php foreach ( $group_types as $type ) : ?> <?php if ( false === bp_restrict_group_creation() && true === bp_member_type_enable_disable() ) { $get_all_registered_member_types = bp_get_active_member_types(); if ( isset( $get_all_registered_member_types ) && ! empty( $get_all_registered_member_types ) ) { $current_user_member_type = bp_get_member_type( bp_loggedin_user_id() ); if ( '' !== $current_user_member_type ) { $member_type_post_id = bp_member_type_post_by_type( $current_user_member_type ); $include_group_type = get_post_meta( $member_type_post_id, '_bp_member_type_enabled_group_type_create', true ); if ( isset( $include_group_type ) && ! empty( $include_group_type ) ) { if ( in_array( $type->name, $include_group_type ) ) { ?> <option for="<?php printf( 'group-type-%s', $type->name ); ?>" value="<?php echo esc_attr( $type->name ); ?>" <?php selected( ( true === bp_groups_has_group_type( bp_get_current_group_id(), $type->name ) ) ? $type->name : '', $type->name ); ?>><?php echo esc_html( $type->labels['singular_name'] ); ?></option> <?php } } else { ?> <option for="<?php printf( 'group-type-%s', $type->name ); ?>" value="<?php echo esc_attr( $type->name ); ?>" <?php selected( ( true === bp_groups_has_group_type( bp_get_current_group_id(), $type->name ) ) ? $type->name : '', $type->name ); ?>><?php echo esc_html( $type->labels['singular_name'] ); ?></option> <?php } } else { ?> <option for="<?php printf( 'group-type-%s', $type->name ); ?>" value="<?php echo esc_attr( $type->name ); ?>" <?php selected( ( true === bp_groups_has_group_type( bp_get_current_group_id(), $type->name ) ) ? $type->name : '', $type->name ); ?>><?php echo esc_html( $type->labels['singular_name'] ); ?></option> <?php } } else { ?> <option for="<?php printf( 'group-type-%s', $type->name ); ?>" value="<?php echo esc_attr( $type->name ); ?>" <?php selected( ( true === bp_groups_has_group_type( bp_get_current_group_id(), $type->name ) ) ? $type->name : '', $type->name ); ?>><?php echo esc_html( $type->labels['singular_name'] ); ?></option> <?php } } else { ?> <option for="<?php printf( 'group-type-%s', $type->name ); ?>" value="<?php echo esc_attr( $type->name ); ?>" <?php selected( ( true === bp_groups_has_group_type( bp_get_current_group_id(), $type->name ) ) ? $type->name : '', $type->name ); ?>><?php echo esc_html( $type->labels['singular_name'] ); ?></option> <?php } ?> <?php endforeach; ?> </select> </fieldset> <?php endif; ?> <?php if ( bp_enable_group_hierarchies() ) : $current_parent_group_id = bp_get_parent_group_id(); $possible_parent_groups = bp_get_possible_parent_groups(); ?> <fieldset class="select group-parent"> <legend><?php esc_html_e( 'Group Parent', 'buddyboss' ); ?></legend> <p class="group-setting-label" tabindex="0"><?php esc_html_e( 'Which group should be the parent of this group? (optional)', 'buddyboss' ); ?></p> <select id="bp-groups-parent" name="bp-groups-parent" autocomplete="off"> <option value="0" <?php selected( 0, $current_parent_group_id ); ?>><?php _e( 'Select Parent', 'buddyboss' ); ?></option> <?php if ( $possible_parent_groups ) { foreach ( $possible_parent_groups as $possible_parent_group ) { ?> <option value="<?php echo $possible_parent_group->id; ?>" <?php selected( $current_parent_group_id, $possible_parent_group->id ); ?>><?php echo esc_html( $possible_parent_group->name ); ?></option> <?php } } ?> </select> </fieldset> <?php endif; ?> </div><!-- // .group-settings-selections -->
greetz Edwin
January 29, 2023 at 2:36 pm #328170In reply to: remove group privacy
edensan
Participantokay i find this setting in:
\bp-nouveau\buddypress\groups\single\admin\group-settings.php<?php /** * BP Nouveau Group's edit settings template. * * This template can be overridden by copying it to yourtheme/buddypress/groups/single/admin/group-settings.php. * * @since BuddyPress 3.0.0 * @version 1.0.0 */ ?> <?php if ( bp_is_group_create() ) : ?> <h3 class="bp-screen-title creation-step-name"> <?php esc_html_e( 'Select Group Settings', 'buddyboss' ); ?> </h3> <?php else : ?> <h2 class="bp-screen-title"> <?php esc_html_e( 'Change Group Settings', 'buddyboss' ); ?> </h2> <?php endif; ?> <div class="group-settings-selections"> <fieldset class="radio group-status-type"> <legend><?php esc_html_e( 'Privacy Options', 'buddyboss' ); ?></legend> <div class="bp-radio-wrap"> <input type="radio" name="group-status" id="group-status-public" class="bs-styled-radio" value="public" <?php if ( 'public' === bp_get_new_group_status() || ! bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> aria-describedby="public-group-description" /> <label for="group-status-public"><?php esc_html_e( 'This is a public group', 'buddyboss' ); ?></label> </div> <ul id="public-group-description"> <li><?php esc_html_e( 'Any site member can join this group.', 'buddyboss' ); ?></li> <li><?php esc_html_e( 'This group will be listed in the groups directory and in search results.', 'buddyboss' ); ?></li> <li><?php esc_html_e( 'Group content and activity will be visible to any site member.', 'buddyboss' ); ?></li> </ul> <?php /** DIT UITGEVINKT DOOR EDWIN <div class="bp-radio-wrap"> <input type="radio" name="group-status" id="group-status-private" class="bs-styled-radio" value="private" <?php if ( 'private' === bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> aria-describedby="private-group-description" /> <label for="group-status-private"><?php esc_html_e( 'This is a private group', 'buddyboss' ); ?></label> </div> <ul id="private-group-description"> <li><?php esc_html_e( 'Only people who request membership and are accepted can join the group.', 'buddyboss' ); ?></li> <li><?php esc_html_e( 'This group will be listed in the groups directory and in search results.', 'buddyboss' ); ?></li> <li><?php esc_html_e( 'Group content and activity will only be visible to members of the group.', 'buddyboss' ); ?></li> </ul> <div class="bp-radio-wrap"> <input type="radio" name="group-status" id="group-status-hidden" class="bs-styled-radio" value="hidden" <?php if ( 'hidden' === bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> aria-describedby="hidden-group-description" /> <label for="group-status-hidden"><?php esc_html_e( 'This is a hidden group', 'buddyboss' ); ?></label> </div> <ul id="hidden-group-description"> <li><?php esc_html_e( 'Only people who are invited can join the group.', 'buddyboss' ); ?></li> <li><?php esc_html_e( 'This group will not be listed in the groups directory or search results.', 'buddyboss' ); ?></li> <li><?php esc_html_e( 'Group content and activity will only be visible to members of the group.', 'buddyboss' ); ?></li> </ul> DIT UITGEVINKT DOOR EDWIN */ ?> </fieldset> <fieldset class="radio group-invitations"> <legend><?php esc_html_e( 'Group Invitations', 'buddyboss' ); ?></legend> <p class="group-setting-label" tabindex="0"><?php esc_html_e( 'Which members of this group are allowed to invite others?', 'buddyboss' ); ?></p> <div class="bp-radio-wrap"> <input type="radio" name="group-invite-status" id="group-invite-status-members" class="bs-styled-radio" value="members"<?php bp_group_show_invite_status_setting( 'members' ); ?> /> <label for="group-invite-status-members"><?php esc_html_e( 'All group members', 'buddyboss' ); ?></label> </div> <?php /** <div class="bp-radio-wrap"> <input type="radio" name="group-invite-status" id="group-invite-status-mods" class="bs-styled-radio" value="mods"<?php bp_group_show_invite_status_setting( 'mods' ); ?> /> <label for="group-invite-status-mods"><?php esc_html_e( 'Organizers and Moderators only', 'buddyboss' ); ?></label> </div> <div class="bp-radio-wrap"> <input type="radio" name="group-invite-status" id="group-invite-status-admins" class="bs-styled-radio" value="admins"<?php bp_group_show_invite_status_setting( 'admins' ); ?> /> <label for="group-invite-status-admins"><?php esc_html_e( 'Organizers only', 'buddyboss' ); ?></label> </div> */ ?> </fieldset> <fieldset class="radio group-post-form"> <legend><?php esc_html_e( 'Activity Feeds', 'buddyboss' ); ?></legend> <p class="group-setting-label" tabindex="0"><?php esc_html_e( 'Which members of this group are allowed to post into the activity feed?', 'buddyboss' ); ?></p> <div class="bp-radio-wrap"> <input type="radio" name="group-activity-feed-status" id="group-activity-feed-status-members" class="bs-styled-radio" value="members"<?php bp_group_show_activity_feed_status_setting( 'members' ); ?> /> <label for="group-activity-feed-status-members"><?php esc_html_e( 'All group members', 'buddyboss' ); ?></label> </div> <?php /** <div class="bp-radio-wrap"> <input type="radio" name="group-activity-feed-status" id="group-activity-feed-status-mods" class="bs-styled-radio" value="mods"<?php bp_group_show_activity_feed_status_setting( 'mods' ); ?> /> <label for="group-activity-feed-status-mods"><?php esc_html_e( 'Organizers and Moderators only', 'buddyboss' ); ?></label> </div> <div class="bp-radio-wrap"> <input type="radio" name="group-activity-feed-status" id="group-activity-feed-status-admins" class="bs-styled-radio" value="admins"<?php bp_group_show_activity_feed_status_setting( 'admins' ); ?> /> <label for="group-activity-feed-status-admins"><?php esc_html_e( 'Organizers only', 'buddyboss' ); ?></label> </div> */ ?> </fieldset> <?php if ( bp_is_active( 'media' ) && bp_is_group_media_support_enabled() ) : ?> <fieldset class="radio group-media"> <legend><?php esc_html_e( 'Group Photos', 'buddyboss' ); ?></legend> <p class="group-setting-label" tabindex="0"><?php esc_html_e( 'Which members of this group are allowed to upload photos?', 'buddyboss' ); ?></p> <div class="bp-radio-wrap"> <input type="radio" name="group-media-status" id="group-media-status-members" class="bs-styled-radio" value="members"<?php bp_group_show_media_status_setting( 'members' ); ?> /> <label for="group-media-status-members"><?php esc_html_e( 'All group members', 'buddyboss' ); ?></label> </div> <?php /** <div class="bp-radio-wrap"> <input type="radio" name="group-media-status" id="group-media-status-mods" class="bs-styled-radio" value="mods"<?php bp_group_show_media_status_setting( 'mods' ); ?> /> <label for="group-media-status-mods"><?php esc_html_e( 'Organizers and Moderators only', 'buddyboss' ); ?></label> </div> <div class="bp-radio-wrap"> <input type="radio" name="group-media-status" id="group-media-status-admins" class="bs-styled-radio" value="admins"<?php bp_group_show_media_status_setting( 'admins' ); ?> /> <label for="group-media-status-admins"><?php esc_html_e( 'Organizers only', 'buddyboss' ); ?></label> </div> */ ?> </fieldset> <?php endif; ?> <?php if ( bp_is_active( 'media' ) && bp_is_group_albums_support_enabled() ) : ?> <fieldset class="radio group-albums"> <legend><?php esc_html_e( 'Group Albums', 'buddyboss' ); ?></legend> <p class="group-setting-label" tabindex="0"><?php esc_html_e( 'Which members of this group are allowed to create albums?', 'buddyboss' ); ?></p> <div class="bp-radio-wrap"> <input type="radio" name="group-album-status" id="group-albums-status-members" class="bs-styled-radio" value="members"<?php bp_group_show_albums_status_setting( 'members' ); ?> /> <label for="group-albums-status-members"><?php esc_html_e( 'All group members', 'buddyboss' ); ?></label> </div> <?php /** <div class="bp-radio-wrap"> <input type="radio" name="group-album-status" id="group-albums-status-mods" class="bs-styled-radio" value="mods"<?php bp_group_show_albums_status_setting( 'mods' ); ?> /> <label for="group-albums-status-mods"><?php esc_html_e( 'Organizers and Moderators only', 'buddyboss' ); ?></label> </div> <div class="bp-radio-wrap"> <input type="radio" name="group-album-status" id="group-albums-status-admins" class="bs-styled-radio" value="admins"<?php bp_group_show_albums_status_setting( 'admins' ); ?> /> <label for="group-albums-status-admins"><?php esc_html_e( 'Organizers only', 'buddyboss' ); ?></label> </div> */ ?> </fieldset> <?php endif; ?> <?php if ( bp_is_active( 'media' ) && bp_is_group_document_support_enabled() ) : ?> <fieldset class="radio group-document"> <legend><?php esc_html_e( 'Group Documents', 'buddyboss' ); ?></legend> <p class="group-setting-label" tabindex="0"><?php esc_html_e( 'Which members of this group are allowed to upload documents?', 'buddyboss' ); ?></p> <div class="bp-radio-wrap"> <input type="radio" name="group-document-status" id="group-document-status-members" class="bs-styled-radio" value="members"<?php bp_group_show_document_status_setting( 'members' ); ?> /> <label for="group-document-status-members"><?php esc_html_e( 'All group members', 'buddyboss' ); ?></label> </div> <?php /** <div class="bp-radio-wrap"> <input type="radio" name="group-document-status" id="group-document-status-mods" class="bs-styled-radio" value="mods"<?php bp_group_show_document_status_setting( 'mods' ); ?> /> <label for="group-document-status-mods"><?php esc_html_e( 'Organizers and Moderators only', 'buddyboss' ); ?></label> </div> <div class="bp-radio-wrap"> <input type="radio" name="group-document-status" id="group-document-status-admins" class="bs-styled-radio" value="admins"<?php bp_group_show_document_status_setting( 'admins' ); ?> /> <label for="group-document-status-admins"><?php esc_html_e( 'Organizers only', 'buddyboss' ); ?></label> </div> */ ?> </fieldset> <?php endif; ?> <?php if ( bp_is_active( 'video' ) && bp_is_group_video_support_enabled() ) : ?> <fieldset class="radio group-video"> <legend><?php esc_html_e( 'Group Videos', 'buddyboss' ); ?></legend> <p class="group-setting-label" tabindex="0"><?php esc_html_e( 'Which members of this group are allowed to upload videos?', 'buddyboss' ); ?></p> <div class="bp-radio-wrap"> <input type="radio" name="group-video-status" id="group-video-status-members" class="bs-styled-radio" value="members"<?php bp_group_show_video_status_setting( 'members' ); ?> /> <label for="group-video-status-members"><?php esc_html_e( 'All group members', 'buddyboss' ); ?></label> </div> <?php /** <div class="bp-radio-wrap"> <input type="radio" name="group-video-status" id="group-video-status-mods" class="bs-styled-radio" value="mods"<?php bp_group_show_video_status_setting( 'mods' ); ?> /> <label for="group-video-status-mods"><?php esc_html_e( 'Organizers and Moderators only', 'buddyboss' ); ?></label> </div> <div class="bp-radio-wrap"> <input type="radio" name="group-video-status" id="group-video-status-admins" class="bs-styled-radio" value="admins"<?php bp_group_show_video_status_setting( 'admins' ); ?> /> <label for="group-video-status-admins"><?php esc_html_e( 'Organizers only', 'buddyboss' ); ?></label> </div> */ ?> </fieldset> <?php endif; ?> <?php if ( bp_is_active( 'messages' ) && true === bp_disable_group_messages() ) : ?> <fieldset class="radio group-messages"> <legend><?php esc_html_e( 'Group Messages', 'buddyboss' ); ?></legend> <p class="group-setting-label" tabindex="0"><?php esc_html_e( 'Which members of this group are allowed to send group messages?', 'buddyboss' ); ?></p> <div class="bp-radio-wrap"> <input type="radio" name="group-message-status" id="group-messages-status-members" class="bs-styled-radio" value="members"<?php bp_group_show_messages_status_setting( 'members' ); ?> /> <label for="group-messages-status-members"><?php esc_html_e( 'All group members', 'buddyboss' ); ?></label> </div> <?php /** <div class="bp-radio-wrap"> <input type="radio" name="group-message-status" id="group-messages-status-mods" class="bs-styled-radio" value="mods"<?php bp_group_show_messages_status_setting( 'mods' ); ?> /> <label for="group-messages-status-mods"><?php esc_html_e( 'Organizers and Moderators only', 'buddyboss' ); ?></label> </div> <div class="bp-radio-wrap"> <input type="radio" name="group-message-status" id="group-messages-status-admins" class="bs-styled-radio" value="admins"<?php bp_group_show_messages_status_setting( 'admins' ); ?> /> <label for="group-messages-status-admins"><?php esc_html_e( 'Organizers only', 'buddyboss' ); ?></label> </div> */ ?> </fieldset> <?php endif; ?> <?php $group_types = bp_groups_get_group_types( array( 'show_in_create_screen' => true ), 'objects' ); // Hide Group Types if none is selected in Users > Profile Type > E.g. (Students) > Allowed Group Types meta box. if ( false === bp_restrict_group_creation() && true === bp_member_type_enable_disable() ) { $get_all_registered_member_types = bp_get_active_member_types(); if ( isset( $get_all_registered_member_types ) && ! empty( $get_all_registered_member_types ) ) { $current_user_member_type = bp_get_member_type( bp_loggedin_user_id() ); if ( '' !== $current_user_member_type ) { $member_type_post_id = bp_member_type_post_by_type( $current_user_member_type ); $include_group_type = get_post_meta( $member_type_post_id, '_bp_member_type_enabled_group_type_create', true ); if ( isset( $include_group_type ) && ! empty( $include_group_type ) && 'none' === $include_group_type[0] ) { $group_types = ''; } } } } // Group type selection if ( $group_types ) : ?> <fieldset class="group-create-types"> <legend><?php esc_html_e( 'Group Type', 'buddyboss' ); ?></legend> <p class="group-setting-label" tabindex="0"><?php esc_html_e( 'What type of group is this? (optional)', 'buddyboss' ); ?></p> <select id="bp-groups-type" name="group-types[]" autocomplete="off"> <option value="" <?php selected( '', '' ); ?>><?php _e( 'Select Group Type', 'buddyboss' ); ?></option> <?php foreach ( $group_types as $type ) : ?> <?php if ( false === bp_restrict_group_creation() && true === bp_member_type_enable_disable() ) { $get_all_registered_member_types = bp_get_active_member_types(); if ( isset( $get_all_registered_member_types ) && ! empty( $get_all_registered_member_types ) ) { $current_user_member_type = bp_get_member_type( bp_loggedin_user_id() ); if ( '' !== $current_user_member_type ) { $member_type_post_id = bp_member_type_post_by_type( $current_user_member_type ); $include_group_type = get_post_meta( $member_type_post_id, '_bp_member_type_enabled_group_type_create', true ); if ( isset( $include_group_type ) && ! empty( $include_group_type ) ) { if ( in_array( $type->name, $include_group_type ) ) { ?> <option for="<?php printf( 'group-type-%s', $type->name ); ?>" value="<?php echo esc_attr( $type->name ); ?>" <?php selected( ( true === bp_groups_has_group_type( bp_get_current_group_id(), $type->name ) ) ? $type->name : '', $type->name ); ?>><?php echo esc_html( $type->labels['singular_name'] ); ?></option> <?php } } else { ?> <option for="<?php printf( 'group-type-%s', $type->name ); ?>" value="<?php echo esc_attr( $type->name ); ?>" <?php selected( ( true === bp_groups_has_group_type( bp_get_current_group_id(), $type->name ) ) ? $type->name : '', $type->name ); ?>><?php echo esc_html( $type->labels['singular_name'] ); ?></option> <?php } } else { ?> <option for="<?php printf( 'group-type-%s', $type->name ); ?>" value="<?php echo esc_attr( $type->name ); ?>" <?php selected( ( true === bp_groups_has_group_type( bp_get_current_group_id(), $type->name ) ) ? $type->name : '', $type->name ); ?>><?php echo esc_html( $type->labels['singular_name'] ); ?></option> <?php } } else { ?> <option for="<?php printf( 'group-type-%s', $type->name ); ?>" value="<?php echo esc_attr( $type->name ); ?>" <?php selected( ( true === bp_groups_has_group_type( bp_get_current_group_id(), $type->name ) ) ? $type->name : '', $type->name ); ?>><?php echo esc_html( $type->labels['singular_name'] ); ?></option> <?php } } else { ?> <option for="<?php printf( 'group-type-%s', $type->name ); ?>" value="<?php echo esc_attr( $type->name ); ?>" <?php selected( ( true === bp_groups_has_group_type( bp_get_current_group_id(), $type->name ) ) ? $type->name : '', $type->name ); ?>><?php echo esc_html( $type->labels['singular_name'] ); ?></option> <?php } ?> <?php endforeach; ?> </select> </fieldset> <?php endif; ?> <?php if ( bp_enable_group_hierarchies() ) : $current_parent_group_id = bp_get_parent_group_id(); $possible_parent_groups = bp_get_possible_parent_groups(); ?> <fieldset class="select group-parent"> <legend><?php esc_html_e( 'Group Parent', 'buddyboss' ); ?></legend> <p class="group-setting-label" tabindex="0"><?php esc_html_e( 'Which group should be the parent of this group? (optional)', 'buddyboss' ); ?></p> <select id="bp-groups-parent" name="bp-groups-parent" autocomplete="off"> <option value="0" <?php selected( 0, $current_parent_group_id ); ?>><?php _e( 'Select Parent', 'buddyboss' ); ?></option> <?php if ( $possible_parent_groups ) { foreach ( $possible_parent_groups as $possible_parent_group ) { ?> <option value="<?php echo $possible_parent_group->id; ?>" <?php selected( $current_parent_group_id, $possible_parent_group->id ); ?>><?php echo esc_html( $possible_parent_group->name ); ?></option> <?php } } ?> </select> </fieldset> <?php endif; ?> </div><!-- // .group-settings-selections -->
so i commented everything out what i dont want.
only thing is how can i select by default the last option?
mabe someone can help me point in right direction?greetz Edwin
November 26, 2022 at 12:24 am #327311Topic: Missing from BuddyPress
in group forum Requests & Feedbackscottmotion
ParticipantFull hijack the authentication flow (Login/Logout/Register/Forgot/Wrong/All Other): End user should never land on a WP login page. I have a mix of BP, bbp, and WP login pages depending on how the user interacts.
reCAPTCHA during Registration: Should be core. Had to get the plugin from WBCom Designs
Extended Profile Fields: Should be core. Had to get the plugin from BuddyDev
User Menu: Username and Avatar. Conditional menu items. I had to use the “User Menus” plugin by Code Atlantic
Use the username as display name: Had to code this myself.
Disable Full Name field: Custom code again.
Set default notification preferences: More code.
Remove specific accounts from public member list: Really want to hide the admin! More code.
Remove tabs from user profile: More code.
Redirect WP Author to BP Profile: teh codez.
November 9, 2022 at 10:19 pm #327117In reply to: hiding dashboard from buddypress users
Anonymous User 18187419
Inactivehi vintagefan, you can use the plugin “Remove Dashboard Access” (by TrustedLogin) to restrict dashboard access to admins only. Search for it.
You can also hide that upper-left item from the admin bar with the following code snippet:
function remove_admin_bar_items() { global $wp_admin_bar; $wp_admin_bar->remove_menu('site-name'); } add_action( 'wp_before_admin_bar_render', 'remove_admin_bar_items' );
You could use the standard Subscriber role for new users, they would not have dashboard access.
November 9, 2022 at 10:39 am #327111Topic: Hide users on member page
in forum Miscellaneousjavigandia
ParticipantIs it possible to hide logged in WordPress users in the Buddypress plugin?
For example I don’t want admin users to appear on the members page.
It’s possible?
Thank you very much.October 11, 2022 at 6:25 am #326572In reply to: Hide admin profile
EvelyneLamb
ParticipantHow do I create a Hide admin profile ?
September 20, 2022 at 10:02 pm #326301Topic: Hide user admin from budypress
in forum How-to & Troubleshootingpipetko
ParticipantHello, this is an old topic. I have tried all code snippets from the old topics but all seems not reliable. Not working and crushing my websites. So is there plugin or new code solution ?
September 5, 2022 at 7:55 pm #326080In reply to: Disable Group abandonment and Group access request
Richard Benton G4WKW
ParticipantAs I have not managed to code something that works to identify my specific group, I did a bit of lateral thinking and my code looks to see whether or not a “group_mod” is present in a group and (if not) the Join/Hide button is hidden, like the case of group_admins, when only one is present. I can live with it for now, as I just have to make sure that all other groups have at least one Moderator set, then they work as normal.
It works fine for me, using BuddyPress Version 10.4.0, under WordPress 6.0.2 and a modified “Wellness Pro Version: 1.1.4” child theme under Genesis Framework Version: 3.3.5.
I hope it helps, unless and until some kind BuddyPress dev comes in with a proper solution!
-
AuthorSearch Results