Skip to:
Content
Pages
Categories
Search
Top
Bottom

Nouveau Profile User Names Missing if Activity Component Turned Off


  • Nahum
    Participant

    @nahummadrid

    buddypress\members\single\cover-image-header.php
    buddypress\members\single\member-header.php

    
    <?php if ( bp_is_active( 'activity' ) && bp_activity_do_mentions() ) : ?>
    <h2 class="user-nicename">@<?php bp_displayed_user_mentionname(); ?></h2>
    <?php endif; ?>
    

    Are profiles meant to do this? Can’t have profile usernames in the profile header without activating Activity component?

    I’m overriding the templates to get what I need, but just wondering if that was supposed to be that way for those who just want member directories and profiles.

Viewing 8 replies - 1 through 8 (of 8 total)

  • Prashant Singh
    Participant

    @prashantvatsh

    Hi,

    You can have their display name on profile header without activating activity component. In the code, you posted they are just checking if user mention is enabled then just echo the name to be used for mentioning them in the activity.

    Thanks


    Nahum
    Participant

    @nahummadrid

    @prashantvatsh thanks for the reply.

    Is this area where the username is supposed to appear?

    OR does nouveau rely on the page title for the username?

    And this bp_displayed_user_mentionname() is meant to only do mention replies?


    Nahum
    Participant

    @nahummadrid

    That was it, I guess the_title is the display name now for the profile and this other displayed_user_mentionname is another displayed name on the same page(?!). But where the mentionname is, is where ideally a profile name should always be I thought. If you turn off activity, the displayed_user_mentionname – does – disappear. I had removed the_title on profile pages because of their placement a while ago. 🙂

    so in cover-image-header.php

    <?php if ( bp_is_active( 'activity' ) && bp_activity_do_mentions() ) : ?>
    <h2 class="user-nicename">@<?php bp_displayed_user_mentionname(); ?></h2>
    <?php else:?>
    <h2 class="user-nicename"><?php the_title(); ?></h2>
    <?php endif; ?>
    

    would be I guess what I was expecting.

    Thanks for the help


    Prashant Singh
    Participant

    @prashantvatsh

    Hi,

    You are getting username using this the_title();? I think you should use bp_displayed_user_username()


    Nahum
    Participant

    @nahummadrid

    In Nouveau, where is bp_displayed_user_username in members/single template? @prashantvatsh


    Prashant Singh
    Participant

    @prashantvatsh

    It is not in that file but I suggested to use this instead of the_title.


    Nahum
    Participant

    @nahummadrid

    I see thanks! I went ahead and did just that!


    Prashant Singh
    Participant

    @prashantvatsh

    ok, great 🙂

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.
Skip to toolbar