Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] How to remove ’Active xyz hours ago’ ?

  • I want to remove ‘Active xyz hours ago’ indicators from:

    1. members directory
    2. member’s page
    3. groups directory
    4. group’s page

    Obviously I can edit the templates, but was wondering if there’s a way to do this in functions.php or bp-custom.php ?

Viewing 11 replies - 1 through 11 (of 11 total)
  • Avatar of @mercime
    @mercime
    Keymaster

    @mercime

    How about just adding a one-liner at bottom of style.css file?

    `span.activity { display: none; }`

    Thanks, but I want to prevent “last active” data being echo’d into the template for the sake of user privacy. I was just wondering if anyone had their fingers on a function to do it. No biggie, it’s about time in my project development that I bit the bullet and get stuck into the codex… :)

    Avatar of @mercime
    @mercime
    Keymaster

    @mercime

    1. http://trac.buddypress.org/browser/tags/1.2.7/bp-core.php#L1491

    2. See how it’s used in code given just before related posts section in this buddydev.com page and configure it to what you need

    Thanks, just what I was looking for!

    Could you repost the link in 2. please? (it’s missing its href).

    @mercime: Thank you for your response. I did not have the privacy issue, the users just did not want to see it. I tried your fix and it worked like a charm… Cheers!

    Avatar of @mercime
    @mercime
    Keymaster

    @mercime

    @jepucel cool :-)

    @aljuk: One thing that I did that might be of interest: only update the “active x ago” indicator when the user generates an activity that gets logged publicly (i.e. goes to the activity stream)

    Like this:

    `
    remove_action( ‘wp_head’, ‘bp_core_record_activity’ );
    add_action( ‘bp_activity_add’, ‘bp_core_record_activity’ );
    `

    Avatar of cwheelsone
    cwheelsone
    Participant

    @cwheelsone

    @mercime : Thanks – placing the “span.activity { display: none; }” in the css worked for me. Q: Now that the activity is hidden, would it be possible to display the users phone# in that same spot? http://www.pciba.org/members Thanks

    Hi, just put this code in your members- loop.php “

    Telephone is the value of what you want to display.

    thanks

    Avatar of Donald McIntyre
    Donald McIntyre
    Participant

    @donmcint

    This is the solution, I added span.activity { display: none; } at the end of the style.css and it removed the “Active xyz hours ago” from the member and group widgets so it doesn’t show the site has little liquidity (yet). But leaves the time stamp on the activity streams intact. Perfect!

    Avatar of billzy
    billzy
    Participant

    @billzy

    I’ll also add something here, as well as the display:none as above. Yes that works but it also shows it in the code, since the new templates work differently in BP 1.7+, to really nail this out, you can also make a quick change to your language file using poedit.

    Find active %s and replace with   Also do the CSS fix and then it’s gone from both code and spacing :)

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

The topic ‘[Resolved] How to remove ’Active xyz hours ago’ ?’ is closed to new replies.