Forum Replies Created
-
The function is working correctly on my install.
Perhaps you have an issue with quotes, ie after copy/pasting the snippet from a topic where the code whas inserted without using the code button.
Which software do you use to publish bp-custom ?Copy/paste following and give a try:
function buddydev_hide_members_directory_from_all_except_admin() { if ( bp_is_members_directory() && ! is_super_admin() ) { //should we add a message too? //bp_core_add_message( 'Private page.', 'error' ); bp_core_redirect( site_url('/') ); } } add_action( 'bp_template_redirect', 'buddydev_hide_members_directory_from_all_except_admin' );Hi @ico33,
bp-custom file doesn’t need a closing php tag. Remove it and see if it works.
the first line of bp-custom contain
<?phpthen you add your function(s)…<?php function 1 ---- function 2 ---and so on. And that’s it !
In reply to: Showing Events Manager events in BuddyPress profile?Would I be best asking this on WP-Events plugin support?
Yes
In reply to: How to remove spam registers?Spam is a serious subject, not a taboo. WordPress codex talks about. Why shouldn’t BP do the same, specially because it can drain spam which need special attention ?
If you read Hardening WordPress, you will find a lot of references to third party plugin. I don’t believe there is an issue, if you mention wordpress plugins available on the plugin repo. Even premium plugins can be mentionned i think, as long as you specify they are premium.
In reply to: BuddyPress Profile Cover ImageThe cover size is theme dependant. And for this reason, you can’t crop it like profile avatars.
And if the user load a poor quality picture or not the exact size, it could be blured or stretched.
Hi,
what happens when testing with a twenty theme ?
bp_parse_args could be a solution.
Read the first comment block in bp-xprofile-template.php
In reply to: How to remove spam registers?Nice tutorial @venutius !
Why not add it to the codex too ?In reply to: BuddyPress Privacy for Messagesif you’re only looking for “free” solutions, i’m afraid that you won’t get many, unless you find and built them yourself.
BuddyDev, very expensive. That’s your opinion. Did you even know that you use a function contributed by it’s author ?
How many time have you already spent on this forum, and nothing to say about all other searches you probably have done elsewhere ?
Do you imagine the price you have to pay if this support forum wouldn’t be “free” ? And the time (which is money) to charge to yourself for those efforts ? Certainly more than 20$ !Not everything can be native, because not everybody need functionnalities you want and because BP is only a plugin and not a collection of whatever existing enhancement who might be added, or who YOU think it should be in.
This is your 7th topic here.
And a good dozen of times i read your claim about lack of feature or functionnalities.
You critizise a lot but aren’t very constructive. That attitude is really unfair in regard of all thepeoplevolonteers working around BuddyPress.In reply to: Site Wide Activity StreamIt’s a temporary information and i wouldn’t try to alter or remove it.
It use WP heartbeat API and what you’re looking for is defined in this (filterable)function:
In reply to: [Resolved] Profile and cover photos.No worry, you’re welcome !
In reply to: BuddyPress Privacy for MessagesAnd what is the problem ? It seems to do what it is intended for.
But it is a premium plugin. If you need assistance you have to ask on the plugin support.In reply to: ActivitiesDoes it worked ?
Not sure it’s a fix to apply directly in a core file. You’ve probably need to review some of your templates or custom functions.
http://hookr.io/plugins/buddypress/2.6.2/functions/bp_blogs_get_subdomain_base/
http://hookr.io/plugins/buddypress/2.6.2/functions/bp_signup_get_subdomain_base/
In reply to: [Resolved] Profile and cover photos.hi @brumest,
it could be that you reached the allowed storage size.
Check wp-content/uploads/ directory, calculate the total mo stored there and compare with your host plan capacities.Could also be a custom function you added recently. Some tweakings to gain performance (as recently discussed in another topic). Btw your site is much faster now.
A new plugin…Activate wp_debug in wp-config and report here any error you receive (if any).
In reply to: Hide xProfile fields from EDITwe’ve discussing about this “tab” issue on this ticket:
https://buddypress.trac.wordpress.org/ticket/7304I invite you to jump in if you have any comments. You might also find a solution for your use case.
In reply to: Change Default Members Profile Landing TabWhat doesn’t work ? Provide the code you used and try to explain what you did and where.
In reply to: ActivitiesHi @mei-ling,
it’s not an issue but how it works ! 😉
You can filter the activity stream and remove the activities you don’t want to be showed.
Add this snippet to bp-custom.php or your child-theme functions.php
function bpex_bp_activity_types( $retval ) { if ( bp_is_active( 'activity' ) ) { // list of all BP activity types - remove or comment those you won't show. $retval['action'] = ' activity_comment, activity_update, // bbp_topic_create, // bbp_reply_create, friendship_created, created_group, joined_group, last_activity, new_avatar, new_blog_post, new_blog_comment, new_member, updated_profile '; return $retval; } } add_filter( 'bp_after_has_activities_parse_args', 'bpex_bp_activity_types' );You might also remove bbpress activities from the activity filter. You can use this (goes to same file as previous)
function bpex_remove_bbp_activities_dropdown_labels() { if ( bp_is_active( 'activity' ) ) { // Remove forum filters in site wide activity streams remove_action( 'bp_activity_filter_options', array( bbpress()->extend->buddypress->activity , 'activity_filter_options' ), 10 ); // Remove forum filters in single member activity streams remove_action( 'bp_member_activity_filter_options', array( bbpress()->extend->buddypress->activity , 'activity_filter_options' ), 10 ); // Remove forum filters in single group activity streams remove_action( 'bp_group_activity_filter_options', array( bbpress()->extend->buddypress->activity , 'activity_filter_options' ), 10 ); } } add_action( 'bp_init', 'bpex_remove_bbp_activities_dropdown_labels', 9 );Codex references:
In reply to: Showing Events Manager events in BuddyPress profile?Hi,
seems it exist natively ?
If it is not what you want, ask on the WP-Events plugin support.In reply to: Create group directory for different group typesHi,
read here, there is still a working example described.
Just forget about the filter option, the rest is ok.Hi,
sorry for those issues. But you have to give more details about your install.
List of plugins and theme name. And what you did or tried to do before you get those errors.
In reply to: Bussdypress title and SEO Yoast problemyou jumped into an old topic related to SEO and Yoast.
For your specific question, please open a new topic and give details.Hi,
1) there is a premium plugin by shanebp
2) you need to code it yourself. See
https://buddypress.org/support/topic/including-post-categories-in-the-activity-stream/
https://buddypress.org/support/topic/categories-and-tags-from-blog-post-in-the-activity-stream/In reply to: Hide xProfile fields from EDITIt relate to this filter bp_get_profile_field_data
This example will hide tabs and fields to all except admin
function bpfr_hide_profile_field_group( $retval ) { if ( bp_is_active( 'xprofile' ) ) : // hide profile group/field to all except admin if ( !is_super_admin() ) { //exlude fields, separated by comma $retval['exclude_fields'] = '1'; //exlude groups, separated by comma $retval['exclude_groups'] = '3'; } return $retval; endif; } add_filter( 'bp_after_has_profile_parse_args', 'bpfr_hide_profile_field_group' );These tricks hide the tab content, not the tab itself. (it seems that it doesn’t work for groups at the moment…i asked devs for information) Use CSS display:none to hide the tab or consider this plugin.
In reply to: How to remove spam registers?Once registered you have no other choice as to remove them manually.
To retain spammers, there many plugins and methods. Afaik none is the perfect solution and in many situation, you’ll need to use a mixed protection.There many topics on the forum about spam… Search them and make your opinion.
That said, you might follow some basics to harden WordPress, which is a good debut (table renaming, ban “admin” as username, etc). After that, a bunch of anti-spam plugins will calm down their activity on the site. (ban-hammer, buddypress honeypot, etc) Also keep in mind that you won’t probably never avoid spammers. But there is a big difference between 2 spam/day and 1000/per day. 😉