Forum Replies Created
-
In reply to: How to add profile link in page body copy?
This url will take you to your profile – IF you are logged in:
https://example.com/members/me/In reply to: Building a Map: Issue with “Meta” in databaseThose images just show the data in a serialized array.
The question is:
Can you show us the code that is saving the data in a meta format?In reply to: Building a Map: Issue with “Meta” in databaseCan you show us the code that is saving the data in a meta format?
Please use English on these forums.
You can overload templates in your theme or child-theme.
The location of the templates to be used for overloads depends on which template pack you are using.In wp-admin, go to Settings > BuddyPress > Options and note the selection re Template Pack.
If is BuddyPress Legacy, then the templates are here:
…\wp-content\plugins\buddypress\bp-templates\bp-legacy\Otherwise they are here:
…\wp-content\plugins\buddypress\bp-templates\bp-nouveau\More info:
In reply to: How to create login and register pagesDid you try deleting those shortcodes from those pages?
Did you assign the Register page to BuddyPress?
Please read this…BP does not handle a login page.
There are many free WordPress plugins that handle customizing login screens.In reply to: Redirect logged in usersThis is the simplest way to get the url to the profile for the current user:
$redirect_to = site_url('members/me');In reply to: How to filter “User Nicename”Please use the
code buttonwhen posting code.$user_info = get_userdata( bp_displayed_user_id() ); $nicename = $user_info->user_nicename;In reply to: How to filter “User Nicename”Nicename is not a BuddyPress field.
It is a field in the WP users table.
You need to use a WP function like:
https://codex.wordpress.org/Function_Reference/get_userdataIn wp-admin, go to Settings > BuddyPress > Pages and assign a page to Register.
If you need to, create a blank page with the title ‘Register’.In reply to: Search users by profile optionsThe default landing page for member profiles is ‘activity’.
If you have changed that, remove that code.If you need to explicitly set the link to
activityfor some reason:
$profilelink = '<li><a href="' . bp_loggedin_user_domain() . '/activity/">' . __('xPROFIL') . '</a></li>';The error should indicate the file that made the call to
bp_loggedinuser_link()
bp_loggedinuser_link()is deprecated.The proper function is
bp_loggedin_user_link()In reply to: I have the following problem that I cannot solve:Do you have Extended Profiles selected on this page:
yoursite.com... /wp-admin/options-general.php?page=bp-componentsIn reply to: Change default landing page of GroupsThis works, in wp-config.php or bp-custom.php,
define( 'BP_GROUPS_DEFAULT_EXTENSION', 'forum' );In reply to: Solved: Group Stats ProblemAs I said, the Group Extension only works on group pages. Stop trying to use that code on other pages.
In your last example, you are calling
groups_get_user_groups( bp_loggedin_user_id() );AFTER you try to use it to gather group meta.
As I said,groups_get_user_groups()will return an array.
But you are trying to use the return value in groups_get_groupmeta which only takes a single group id.It seems like you are trying to copy and paste various bits of code.
You should probably hire a developer.This is my guess at what you are trying to do.
function display2() { $member_group_ids = groups_get_user_groups(bp_loggedin_user_id()); $setting = groups_get_groupmeta( $member_group_ids[0], 'entreprise_statistiques_setting' ); $setting2 = groups_get_groupmeta( $member_group_ids[0], 'entreprise_statistiques_setting2' ); ?> <div id="stats"> <script>StatHatEmbed.render({s1: '<?php echo($setting); ?>', w: 760, h: 235, tf:'month_compare', style:'fill', title:'<?php echo($setting2); ?>'});</script> </div> <?php if ($setting == NULL) { echo ("Aucun site internet détecté, merci de contacter l'équipe COMMIUM."); }In reply to: Solved: Group Stats ProblemThe BP_Group_Extension is for use within a specific group. And the group_id is ‘known’ within that context.
To show data specific to a member’s groups, anywhere on the site, use:
groups_get_user_groupsto get all the group ids for that member.
For example:$member_group_ids = groups_get_user_groups( bp_loggedin_user_id() );
So$member_group_idswill be an array of group ids that you can use in a custom function to gather and display group data specific to the current user.For more info on that function and other useful group functions, see:
buddypress\bp-groups\bp-groups-functions.phpFrom the codex:
In reply to: bp_send_email problems – not finding template emailHow do I tell bp_send_email() function to use it?
This may be helpful: BP Email Assign Templates
In reply to: Add xprofile to userYou seem to be assuming that the xprofile field id is the same as the user meta field id – if they are it is just a coincidence.
If you have not created xprofile fields, you need to do so.
And then use the ids for those xprofile fields.
Or you can use the name of the xprofile fieldIn reply to: Any way to remove moderation ?These are the forums for BuddyPress.
The forums for bbPress are here.In reply to: Trying to get property ‘show_avatars’ of non-objectConfirmed.
Please open a ticket here.In reply to: Editing members directory page with Elementor?In reply to: Extend ProfilesThe BuddyBoss Platform plugin is free.
Their themes and support for the Platform are not free.Go here to get the free plugin – scroll down to
“Download the free BuddyBoss Platform Plugin”In reply to: Restrict member profile views to logged in usersPut this in the functions.php file in your child theme or in bp-custom.php
It will redirect visitors to the home page if they are not logged in and they try to open a member profile or the members directory.function seaspray_restrict_members() { if ( bp_is_user() || bp_is_members_directory() ) { if ( ! is_user_logged_in() ) { wp_safe_redirect( home_url() ); die(); } } } add_action( 'bp_ready', 'seaspray_restrict_members' );In reply to: GROUP ACTIVITY HOOKS that would be great to have.The activity_id IS the row id, iow. the row id is
419
[28-Nov-2019 12:56:39 UTC] 419All you have to do is try it yourself.