Whats the best way to use that php snippet to encapsulate html code like the below? I tried and cannot get it to work correctly:
`
if ( is_user_logged_in {
div1
div2
bp_loggedin_user_avatar( “full” );
end div1
end div2
}
@famous,
Try this if you’re on 1.7 – 150 is the avatar full size
<?php if ( is_user_logged_in() ) : ?>
<div> blah </div> <!– div1 ->
<?php echo ‘<strong>’ . get_avatar( $item[‘user_id’], ‘150’ ) . ‘ ‘ . bp_core_get_userlink( $item[‘user_id’] ) . ‘</strong>’; ?>
<div> blah </div> <!– div2 ->
<?php endif; ?>
thanks Chouf1
this snippet did it:
“
whatever your divs or code is place it here
“
In case anyone is wondering – encapsulate your code with what Chouf1 provided and it works like a charm.
thanks Chouf1
this snippet did it:
`
whatever your divs or code is place it here
`
In case anyone is wondering - encapsulate your code with what Chouf1 provided and it works like a charm.
thanks Chouf1
this snippet did it:
“
whatever your divs or code is place it here
“
In case anyone is wondering – encapsulate your code with what Chouf1 provided and it works like a charm.
By the way how did you get your code to show up Chouf1? I cannot get php to show up?
Thanks
@famous, i simply copy/paste it directly in the textarea without using any tag or attribute
@Famous the codex is your friend for many things , stuff like template tags and conditional functions, also looking through BP template files will often show you things like is_user_logged_in() in use ( bp-default theme sidebar.php shows examples of this use)