Forum Replies Created
-
In reply to: Display email in member header WITH link
Sorry, missed a semi-colon… Snippet is corrected.
In reply to: Display email in member header WITH linkOh, copy/pasting is out of scope today ? 😉 Your code, corrected.
<?php $email = bp_displayed_user_email(); ?> <?php if ( ! empty( $fonction ) ) { ?> <span class=”thrive-member-role”> <?php echo '<a href="mailto:'. bp_displayed_user_email(); .'">'. bp_displayed_user_email(); .'</a>'; ?> </span> <?php } ?>Hi,
no idea on how to conditionnaly combine 2 xprofile field.
Here how you can show a msg if a field was not filed, even if it is not exactly what you asked for.
if ( bp_is_active( 'xprofile' ) || bp_is_profile_component() || bp_is_user() ) if ( !$data = bp_get_profile_field_data( 'field=Service' ) ) : // use field name echo '<br>Your profile is not complete. Please fill in field: Service<br>'; endif;In reply to: Create Group functionHave you set up the permalinks to another option than default ?
In reply to: Display email in member header WITH linkIf your code was working, you change only the echo who fires the mailto link.
In reply to: change username to display nameIn reply to: email notification activity streamIn reply to: Display email in member header WITH linkHi,
try:
echo '<a href="mailto:'. bp_displayed_user_email().'>'. bp_displayed_user_email(); .'</a>';In reply to: Link To Member Profile In Form FieldThat’s unfortunately what i expected… GF is a third party premium plugin for which nobody can help you here, except if he/she use that plugin.
If you read here, it’s somehow explained in details.
What you already used (gform_field_value_linkuser), linkuser is a GF field name. If i’m right, see the advanced tab of that field and complete the name parameter.
Here a snippet which let you see how to link a username to his profile, when you’re outside of the member_loop. It will output the current user name on the site wide activity header. For test only.
Note that it use BuddyPress default Name field and that it comes from a BP form. As you use GF, you certainly need to find how to grab properly a GF field value.
Function goes to bp-cutom, may also work in theme’s functions.php
function bpfr_my_profile_link_on_SWA_header () { $user_id = get_current_user_id(); $profile_url = bp_loggedin_user_domain(); if( !is_user_logged_in() ) { return; } echo '<br>Test userlink: '; if ( !$data = bp_get_profile_field_data( 'field=Name' ) ) : echo xprofile_get_field_data( 'Name', bp_get_member_user_id() ) .'<a href="'. $profile_url .'">'. bp_core_get_username( $user_id ).'</a><br>'; endif; } add_action( 'bp_activity_type_tabs', 'bpfr_my_profile_link_on_SWA_header' );Sorry, I can’t help you more.
Yep ! Use fn bp_is_my_profile()
For ex. something like
if ( $blogs && bp_is_my_profile() ) {In reply to: Link To Member Profile In Form FieldHi,
you can use
bp_get_loggedin_user_link
Get the link for the logged-in user’s profile.or
bp_loggedin_user_domain
Generate the link for the logged-in user’s profile.Something like
$profilelink = '<a href="'. bp_get_loggedin_user_link() .'">$user</a>';Go to your WP pages admin, and change your member page title to Staff instead of Members. Change the slug accordingly.
Ensure the name is unique and that you don’t have any page called members or staff in the trash. If it’s the case, clear it. Go to permalinks settings and click on save. Permalinks option should be whatever except “default”.
Return to BP’s page settings and verify that the Members component page is Staff. If not, select the new page and save.For any other “member” wording, you have to use buddypress po/mo file, even if you use english on your site.
In reply to: BP menu on wp multisiteYou have to enable multiblog. Read here:
In reply to: Error on installationGive details please: php version, theme name, used plugins.
https://buddypress.org/support/topic/when-asking-for-support-2/
Related topics for similar issue:
https://buddypress.org/support/search/bp_setup_current_user+was+called+incorrectly/In reply to: Direct Message is send 3 timesHi,
does this happen on a live site or a local install ?
Do you have the same issue when you use a Twenty something theme ?
Do you use some message related plugin or custom function ?Give details: php version, theme name.
In reply to: How to show review activity on buddypressBuddyPress is member oriented and they’re some rating plugins out for profiles or groups. For pure content like posts or CPT’s, you have to search for some WP plugin on the plugin repository.
Another alternative could myCred, which is made for BP. Inconvenient (if ever), it does much more as only allowing rating.
Which WP install type are you using ? MS or single ? Give details please.
Hi,
check from here
wp-admin/edit.php?post_type=pagethat you have the 2 pages for registering and activation.On BP’s pages settings list, you can see in regard of Activation and Registration each page. There is no Save button. Just a View button.
Check also that you don’t have these page in Trash. If it’s the case, clear it completely. Page names must be unique in any case.
Also go to you permalinks and choose an option except default and save.
If still in trouble after that, provide screenshot and theme name, php version and if you use a new install or an updated version.
In reply to: Components do not display in page assignment areaThis is not an issue, but how it works !
The’re only 3 pages to assign when you activate ALL components.
1) members
2) site activity
3) groupsIf registering is allowed, you have 2 other pages:
– registering
– activationXprofile, Messages, Friends, etc are mostly sub parts of the mandatory Members component/page.
In reply to: change username to display nameIn reply to: Not show all activityPlease read first BP’s documentation:
Many topics with same question where already resolved.
https://buddypress.org/support/search/bp_after_has_activities_parse_args/If you are on a multisite install, each profile has a tab containing a list of sites the member belongs too, so those link already exist.
If you want such link elsewhere, you basically can use this.As you say nothing about where you want the link to be on a profile, i assume you want it explicitly showing on the profile header. Following snippet will accomplish that. I tested it on a MS install with 2 blogs (main site + 1 user blog).
function my_link_to_blog() { if ( bp_is_user() ) { $user_id = bp_displayed_user_id(); } else { $user_id = bp_get_member_user_id(); } $blogs = get_blogs_of_user( $user_id ); if ( $blogs ) { echo '<ul>'; foreach ( $blogs as $blog ) { // exclude the main blog if a user signed to another one if ( $blog->userblog_id != get_current_blog_id() ) { echo '<li>View my blog<a href="http://' . $blog->domain . $blog->path .'">' . $blog->blogname . '</a></li>'; } } echo '</ul>'; } } add_action( 'bp_before_member_header_meta' , 'my_link_to_blog' );Add to bp-custom.php
In reply to: WordPress 4.5You’re welcome !
In reply to: Finding profile field idHi,
try this (replace industry by field name of 182)
if ( $data = bp_get_profile_field_data( 'field=Industry' ) ) : echo '<div class="industry">'. xprofile_get_field_data( 'Industry', bp_displayed_user_id() ) .'</div>'; endif;Hi,
read for usage and context for bp_parse_args on codex.