Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

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

  • celsosoares
    Participant

    @celsosoares

    Thanks for your help! What is I’m in the user page? Or the messages page? Can you post an example of how it would work there? Thanks


    celsosoares
    Participant

    @celsosoares

    YES I KNOW how to use CSS and where it should go, the css was an example of something that would go into the “if then” section, there are many things I want to use the function for (as I explained in the part that said “VERY IMPORTANT NOTE”).

    Can you give me a PRACTICAL example for how I could do this:
    IF THIS IS PAGESLUG X
    DO Y

    For instance, using this from the link you provided:

    function bp_is_forums_component() {
       return (bool) bp_is_current_component( 'forums' );
    }

    How do I convert this into something like..
    if bp_is_current_component( ‘forums’ ) && the page slug is X {
    do something
    }

    thanks in advance


    celsosoares
    Participant

    @celsosoares

    Thanks @imjscn , but I get the same result using the Like plugin. It uses the same table so the only value I changed was the meta_value, to “liked_count”. I get ALL the activity items returned, ordered chronologically, like before.

    Anyone out there want to give it a shot and post the code here? Or write a plugin :)


    celsosoares
    Participant

    @celsosoares

    @r-a-y , @Dankicity thank you for your replies. Yeah I can’t get this to work either. Following r-a-y’s steps all I get returned is ALL of the activity items, sorted chronologically. That’s likely because my code sucks though :) If anyone gets this to work, it would be awesome! It’s the only thing left to sort out on this app I’m making :(


    celsosoares
    Participant

    @celsosoares

    @r-a-y thanks for your reply! I don’t know a lot of php so please bear with me. This is what I did, based on what you suggested:

    `
    get_results(“SELECT activity_id FROM $wpdb->wp_bp_activity_meta WHERE meta_value = ‘favorite_count’ ORDER BY meta_value”);
    foreach ($favorite_id as $favorite_id) {
    echo $favorite_id->activity_id;
    }
    ?>

    ` etc..

    Nothing gets echoed in the foreach loop, but $favorite_id echoed on its own returns “array”. I’m sure I’m doing something wrong as what gets outputted in the browser is “Sorry, there was no activity found. Please try a different filter.” even though there are 4 activity items favorited by two different test users. :(

    What am I doing wrong? Many thanks for any help!!


    celsosoares
    Participant

    @celsosoares

    Anyone?


    celsosoares
    Participant

    @celsosoares

    Tried this but this the ajax function doesn’t load any more activity :(

    <?php if ( bp_has_activities( bp_ajax_querystring( ‘activity’ ) . ‘per_page=6’ ) ) : ?>

Viewing 7 replies - 1 through 7 (of 7 total)
Skip to toolbar