Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)
Avatar of admin25
admin25
Participant

@admin25

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;

}

`

Avatar of admin25
admin25
Participant

@admin25

Thanks, that worked.

Much appreciated.

Avatar of admin25
admin25
Participant

@admin25

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.

Avatar of admin25
admin25
Participant

@admin25

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.

Avatar of admin25
admin25
Participant

@admin25

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

Avatar of admin25
admin25
Participant

@admin25

Avatar of admin25
admin25
Participant

@admin25

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)