Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)
  • @admin25

    Participant

    Ok how do you add code? I though putting the code between the CODE tags would work

    @admin25

    Participant

    The code did not show up! trying again.

    function add_profile_link_to_nav($items) {
        if ( is_user_logged_in() )
    
    return $items . 
     '<li><a href="activity/just-me/">My Wall</a>
    
    <ul>
    
     <li><a href="activity/friends/">My Friends Activities</a></li>
     <li> <a href="profile/edit/group/1">Edit My Profile</a></li>
    
    </ul>
     </li>';
    }
    add_filter('wp_nav_menu_items','add_profile_link_to_nav', 10, 2);

    @admin25

    Participant

    This gets the last date a user logged in and avatar and some extra what-not

    `
    <?php
    global $current_user;

    get_currentuserinfo();
    echo get_avatar( $current_user->ID, 50 );
    ?>

    <?php
    global $userdata;
    global $current_user;
    get_currentuserinfo();
    $author = $current_user->display_name;
    if ( is_user_logged_in() ) {

    echo
    “Hello ” . $author . ““;

    _e(‘, you were last here on: ‘,’appthemes’);
    appthemes_get_last_login($userdata->ID);

    echo
    “. We need you! We want you! Welcome Back!!“;
    }
    ?>

    #nnn {
    color: #1E0D51;
    padding-left: 60px;
    padding-top: 10px;
    width: 800px;

    }

    `

    @admin25

    Participant

    Thanks, that worked.

    Much appreciated.

    @admin25

    Participant

    Hello shanebp, thanks for the response.

    I tried replacing the 1st line of code in the “groups loop”

    with your line of code
    loggedin_user->id ) ) : ?>
    but it still gives me all groups.

    @admin25

    Participant

    Hello aces,
    I ran across the code and I thought it was a “this will work with any bp install kind of thing” clearly I was wrong.

    Your code worked perfectly.
    Thank you.

    @admin25

    Participant

    Hello, can you tell me does Quick cache work well with buddypress?

    @admin25

    Participant

    @admin25

    Participant

    take this:

    function ajax_auto_load_activity(){
    …code goes here…
    };

    and this:

    jq(“#content li.load-more”).addClass(‘loading’);
    
    if ( null == jq.cookie(‘bp-activity-oldestpage’) )
    jq.cookie(‘bp-activity-oldestpage’, 1, {path: ‘/’} );
    
    var oldest_page = ( jq.cookie(‘bp-activity-oldestpage’) * 1 ) + 1;
    
    jq.post( ajaxurl, {
    action: ‘activity_get_older_updates’,
    ‘cookie': encodeURIComponent(document.cookie),
    ‘page': oldest_page
    },
    function(response)
    {
    jq(“#content li.load-more”).removeClass(‘loading’);
    jq.cookie( ‘bp-activity-oldestpage’, oldest_page, {path: ‘/’} );
    jq(“#content ul.activity-list”).append(response.contents);
    
    target.parent().hide();
    }, ‘json’ );
    
    and go like this:
    function ajax_auto_load_activity(){
    jq(“#content li.load-more”).addClass(‘loading’);
    
    if ( null == jq.cookie(‘bp-activity-oldestpage’) )
    jq.cookie(‘bp-activity-oldestpage’, 1, {path: ‘/’} );
    
    var oldest_page = ( jq.cookie(‘bp-activity-oldestpage’) * 1 ) + 1;
    
    jq.post( ajaxurl, {
    action: ‘activity_get_older_updates’,
    ‘cookie': encodeURIComponent(document.cookie),
    ‘page': oldest_page
    },
    function(response)
    {
    jq(“#content li.load-more”).removeClass(‘loading’);
    jq.cookie( ‘bp-activity-oldestpage’, oldest_page, {path: ‘/’} );
    jq(“#content ul.activity-list”).append(response.contents);
    
    target.parent().hide();
    }, ‘json’ );
    };

    I do not know if it works but that is what was said to do.

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