Skip to:
Content
Pages
Categories
Search
Top
Bottom

Ho to display "Status Update" only – the right way

  • Avatar of Mariusooms
    Mariusooms
    Participant

    @mariusooms

    I like the added Status Updates component in trunk. I need to display only the Status Update by it self, without the ‘clear’ button, timestamp, or update box. So I use the following code in my template (I could make a function in my bp-custom I suppose). I am wondering if there is a better -shorter- approach even though there is nothing wrong with this either:

    <?php
    global $bp;
    $user_id = $bp->displayed_user->id;
    $status = get_usermeta( $user_id, 'bp_status' );
    
    echo $status['content'];
    ?>

    I realize it is a new component, but was wondering if there are other bleeding edge developers out there, that could elaborate?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Avatar of Plrk
    plrk
    Participant

    @plrk

    You could do:

    <?php
    global $bp;

    $status = get_usermeta( $bp->displayed_user->id, 'bp_status' );
    echo $status['content'];
    ?>

    That saves you one line ;)

    Avatar of Korhan Ekinci
    Korhan Ekinci
    Participant

    @korhanekinci

    I am using bp 1.0.3 and there is no “Status Updates component”, when will it be available?

    Avatar of Plrk
    plrk
    Participant

    @plrk

    @korhanekinci: it is available in the trunk, which contains the latest, bleeding-edge, development version of BuddyPress. Not for use in a “real environment”, but you can download it by typing svn co http://svn.buddypress.org/trunk in a your command line terminal (if you have Subversion installed). I believe it will be included in BuddyPress 1.1, expected release date August 17.

    Avatar of Korhan Ekinci
    Korhan Ekinci
    Participant

    @korhanekinci

    Thank you for informing me Plrk! Can’t wait for August 17 :)

    Avatar of Mariusooms
    Mariusooms
    Participant

    @mariusooms

    Thanks plrk… :p

    I suppose I can’t complain over 4 lines. I just created a function for it and called it good.

    Avatar of Plrk
    plrk
    Participant

    @plrk

    I’d guess a “native” function for it will come soon.

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

The topic ‘Ho to display "Status Update" only – the right way’ is closed to new replies.