Forum Replies Created
-
In reply to: File Sharing Embedding
Try this: https://wordpress.org/plugins/buddydrive/
Google this: buddypress file sharing
Depending on your ability as a coder, you could adapt some code or write it from scratch.
In reply to: Images for activity for front page…you are losing people and ultimately future profits and benefits
BP is free open source code. There are no direct profits.
These forums are moderated by volunteers.
There is no promise, explicit or otherwise, that you will get an answer.How does someone who does not constantly do coding for a living really get BuddyPress to function?
The primary intended audience for users of the BuddyPress codebase: Site Builders and WordPress Developers.
The widgets and shortcodes you tried ( BuddyPress Sitewide Activity ? ) probably do not include the images because widgets generally output a compressed view and images can take a lot of screen area. It would be relatively simple to tweak such a widget to include activity images.
If you don’t know how to code, you can post a job here.In reply to: Custom msg in own profileI have been able to add it for everyone…
How did you do that?
Wrap it in a conditional:if ( bp_is_my_profile() ) {...}In reply to: Create a custom page for different rolesPlease do not call out people directly unless they have already responded to your thread.
You’re using a premium theme and one, maybe two, premium plugins.
Your questions should be directed to the support provided by your purchases.
You might find somebody here willing to help you.
And you have a better chance of getting help if you show what you’ve already tried.
( Please use a service like gist when sharing code. )Try the solution near the bottom of this codex page:
https://codex.buddypress.org/emails/#filter-from-address-and-nameadd_action( 'bp_email', function( $email_type, $email_obj ) { $email_obj->set_from( "custom@example.com", "Custom Website Name" ); }, 10, 2 );In reply to: Resctrict private messagesWhat is thread_id?
if(!thread_id) {
Try removing that conditional.Please do not double post.
In reply to: bp_get_total_site_member_count() not working?This works for me when pasted in either theme/functions.php or bp-custom.php
And using the short code on a post or page.function sbp_show_number_of_members( $atts ){ $count_members = bp_get_total_site_member_count(); return $count_members; } function sbp_register_shortcodes() { add_shortcode('member-count', 'sbp_show_number_of_members'); } add_action('init', 'sbp_register_shortcodes');In reply to: bp_get_total_site_member_count() not working?Try fixing the code first.
Should be:function register_shortcodes() { add_shortcode('member_count', 'show_number_of_members'); // fixed add_shortcode( 'postcount', 'post_count_function' ); } add_action('init', 'register_shortcodes'); // fixedIn reply to: CAN BE DELETEDYou’ll need to debug.
Did you try switching from the groups component to members, as I suggested?echo bp_current_action();shows the current action.echo bp_current_component();shows the current component.Remove the call to
send_transfer_offer()until you’re sure you’re checking for the correct conditions.In reply to: CAN BE DELETEDYou need to check if the button was clicked.
Try something like this:function jay_check_transfer_click() { if ( !bp_is_groups_component() && !bp_is_current_action( 'transfer_offer' ) ) return false; send_transfer_offer(); } add_action( 'bp_actions', 'jay_check_transfer_click' );In all your code, you may want to reference the
memberscomponent instead ofgroups.Switch momentarily to a WP standard & free theme that comes with WP – like TwentyThirteen, etc.
Then check to see if your issue still exists – if it doesn’t, then you know the issue is somewhere in your premium theme.In reply to: Date format on profile fieldsbp_member_profile_data() will echo the data, so you shouldn’t add an echo.
Try:
$originalDate = bp_get_member_profile_data( 'field=geboortedatum' ); $newDate = date("d-m-Y", strtotime($originalDate)); echo $newDate;More info on the php date function:
http://php.net/manual/en/function.date.phpIn reply to: [Resolved] Last activyCreate a template over-load of this file:
buddypress\bp-templates\bp-legacy\buddypress\members\single\member-header.phpIn the overload, remove the
spanthat shows the last_activity blurb.In reply to: how to add new membersRe appearing on the members list, you can handle them has a batch; much faster than logging in as each member.
For example, for all subscribers:
function steve_add_last_activity() { $subscribers = get_users( 'fields=ID&role=subscriber' ); foreach ( $subscribers as $user_id ) { bp_update_user_last_activity( $user_id, bp_core_current_time() ); } } //add_action('bp_init', 'steve_add_last_activity' );Uncomment the add_action ( iow. remove the // ) whenever you want to use the function.
Put it in your theme functions.php or in bp-custom.phpA bit simpler approach is to create a variable:
$display = false; if ( is_super_admin() || bp_is_my_profile() ) $display = true;Then use it:
... 'show_for_displayed_user' => $display ...Please use the
code buttonwhen posting code.Try changing this:
<? php
To this:<?phpIn reply to: New Group -> 404Testing will require a login.
Can you post a user name / password for testing?Can you post the url that throws the 404?
also – just curious – which plugin are you using to pull the Facebook feed in the footer?
In reply to: Custom filters should execute only on custom pageIn your filter functions, why not check for page_id or title – if not available, then just
return.Without seeing the code, we cannot tell why your custom filters are being called on the default Members Directory page.
If you want to share the code – please do not post it here.
Instead, create a gist and share the link to that gist.In reply to: Custom filters should execute only on custom pageHow are you loading your page template?
Have you tried checking the page title?In reply to: the_ID = 0The id is zero due to the way BP constructs those pages.
The how and why is a long answer – you may want to look at the codebase to see the how.In any event, you will not be able to change that.
Your best bet is to add tothe display conditions the user has set.Perhaps…
Give them an option to select the Groups Directory page.
Then usebp_is_groups_directory()to check if they are on that page.Or maybe specific single groups.
Then check to see if they are on a single group page by usinggroups_get_current_group().So the basic approach is to use template tags to find out where the user is and then show or not show an ad based on the
the display conditions the user has set.In reply to: Members showingYou mean you’re using this
[bp_members]as a shortcode?
BuddyPress does not provide that shortcode, afaik.
So, you are using some plugin that provides that shortcode.
You need to pose your question the the author of that plugin.In reply to: Removing ‘This is a notice to all users’Only members with the capability ‘bp_moderate’ will see that checkbox option.
And only site administrators are given that capability.
So unless you have a plugin that gives that capability to other members, nobody else can see that option. To check, log into your site as a non-admin.If you still want to remove it, create a template overload of this file:
buddypress\bp-templates\bp-legacy\buddypress\members\single\messages\compose.php
In your overload, remove this:<?php if ( bp_current_user_can( 'bp_moderate' ) ) : ?> <p><label for="send-notice"><input type="checkbox" id="send-notice" name="send-notice" value="1" /> <?php _e( "This is a notice to all users.", 'buddypress' ); ?></label></p> <?php endif; ?>It is not stored in the database.
It is constructed – for an example, see:
http://hookr.io/functions/bp_core_get_user_domain/In reply to: [Resolved] Changing from a slug to a dynamic urlTry:
function communityprofile_screen() { bp_core_redirect( site_url( '/community/profile/' . bp_displayed_user_username() ) ); }In reply to: [Resolved] Activity stream – removing informationManually delete the existing entries.
Place this in your theme/functions.php or in bp-custom.php to prevent creation of new entries.function bp_activity_do_not_save( $activity_object ) { $exclude = array( 'updated_profile', 'new_member' ); if( in_array( $activity_object->type, $exclude ) ) $activity_object->type = false; } add_action('bp_activity_before_save', 'bp_activity_do_not_save', 10, 1 );