Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to remove the “View” link and the latest update in the user profile?


  • naomibuch
    Participant

    @naomibuch

    Hello,

    I am new to Buddypress and this is my first post, I am new to web development also, and my PhP coding is not all that great, my years as a software developer was strictly in a windows environment (vb.net and sql)

    I developed my own website and I am using Buddypress as part of my social media for users to connect with each other.

    I have spent endless hours researching a fix, and I have not been able to find anything php file that I can edit in File Manager to edit or remove the line of code.

    When a user updates an Activity, it updates in three places:

    1. The Activity Stream (which is what I want)
    2. The Member’s Profile where the Activity tab was (now removed, which is what I want)
    3. Under the Member’s profile cover, with that pesky “view link” (which I DO NOT want to show)

    And the “view link” is a bit buggy also, sometimes when a user clicks on it, it throws a 404 error, sometimes it opens up a blank page, and sometimes it opens up the recent activity that they posted in the Activity Stream.

    Also in the members directory I have a button to send the user a private message whether or not they are friends.

    When I click on a user name from the member’s directory, it take me to the compose a message like it is suppose to do, and the user name appears , but it does not save the user name in the send to box, do you have a fix for this also?

    Thank you very much, a fix to these problems are greatly appreciated.

    Naomi

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

  • naomibuch
    Participant

    @naomibuch

    I finally figured out how to remove the view link.

    I will just say I had to remove a lot of code from the “cover-image-header.php” file, through trial and error, without breaking my site.

    Cheers


    Boone Gorges
    Keymaster

    @boonebgorges

    If I understand the “view link” issue correctly, then the following CSS is probably enough to hide it:

    
    .latest-update a { display: none; }
    

    A screenshot would verify whether we’re thinking of the same thing.

    Please note that if you’ve made changes in cover-image-header.php within the buddypress directory, these changes will be overwritten the next time BuddyPress is updated. Please create a child theme and override templates there. Here’s a brief guide: http://tentenbiz.com/override-buddypress-template-files/

    > When I click on a user name from the member’s directory, it take me to the compose a message like it is suppose to do, and the user name appears , but it does not save the user name in the send to box, do you have a fix for this also?

    Can you described this in more detail? When you say “it does not save the user name”, what do you mean? Do you mean that, when you press Send on the newly composed message, the page reloads without having been sent to the user in question?


    naomibuch
    Participant

    @naomibuch

    Hi Boone,

    Thanks for getting back to me, the css code you provided doesn’t work when I tested it. I think what I was trying to achieve required a direct modification to the code.

    After thorough testing I realized that some of the code I removed caused an impact on the ability to save a username in the compose box.

    After fine tuning the code module, I finally got it to work, I will share the revised cover-image-header.php file here.

    But please make a copy of the original cover-image-header.php file and save it to a text file before making any changes to the original cover-image-header.php file.

    This is where you can find the cover-image-header.php file: public_html/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/single/cover-image-header.php

    <?php
    /**
    * BuddyPress – Users Cover Image Header
    *
    * @package BuddyPress
    * @subpackage bp-legacy
    */

    ?>

    <?php

    /**
    * Fires before the display of a member’s header.
    *
    * @since 1.2.0
    */
    do_action( ‘bp_before_member_header’ ); ?>

    <div id=”cover-image-container”>
    “>

    <div id=”item-header-cover-image”>
    <div id=”item-header-avatar”>
    “>

    <?php bp_displayed_user_avatar( ‘type=full’ ); ?>


    </div><!– #item-header-avatar –>

    <div id=”item-header-content”>

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

    <div id=”item-buttons”><?php

    /**
    * Fires in the member header actions section.
    *
    * @since 1.2.6
    */
    do_action( ‘bp_member_header_actions’ ); ?></div><!– #item-buttons –>

    <span class=”activity” data-livestamp=”<?php bp_core_iso8601_date( bp_get_user_last_activity( bp_displayed_user_id() ) ); ?>”><?php bp_last_activity( bp_displayed_user_id() ); ?></span>

    <?php

    /**
    * Fires before the display of the member’s header meta.
    *
    * @since 1.2.0
    */
    do_action( ‘bp_before_member_header_meta’ ); ?>

    <div id=”item-meta”>

    </div><!– #item-meta –>

    </div><!– #item-header-content –>

    </div><!– #item-header-cover-image –>
    </div><!– #cover-image-container –>

    <?php

    /**
    * Fires after the display of a member’s header.
    *
    * @since 1.2.0
    */
    do_action( ‘bp_after_member_header’ ); ?>

    <div id=”template-notices” role=”alert” aria-atomic=”true”>
    <?php

    /** This action is documented in bp-templates/bp-legacy/buddypress/activity/index.php */
    do_action( ‘template_notices’ ); ?>

    </div>


    shonty
    Participant

    @shonty

    Hi there,

    Just needed to do this too and managed to hide it with the following CSS

    /* remove latest activity update from beneath buddypress profile pic */
    div#latest-update {
    display:none !important;
    }

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