BuddyPress
User photos on profile page
If you have Buddypress and you want to display the users photos on his profile page, put this in the profile page template:
<?php global $bp; $owner = $bp->displayed_user->userdata->user_login; echo apply_filters( 'the_content', '[wppa type="thumbs" album="#upldr,'.$owner.'"]' ); ?>
If this does not work, try this:
<?php global $bp; $owner = $bp->displayed_user->userdata->user_login; if ( function_exists( 'wppa_insert_shortcode_output' ) ) { echo wppa_insert_shortcode_output( do_shortcode( '[wppa type="thumbs" album="#upldr,' . $owner . '"]' ) ); } ?>
If you only want to show the photos from sub-albums of a certain album, e.g. the album with name: Members, change the shortcode into: (note the $
sign in front of the albumname)
[wppa type="thumbs" album="#upldr,' . $owner . ',$Members"]
this is equivalent to (assuming the album id of the Members album is 23):
[wppa type="thumbs" album="#upldr,' . $owner . ',23"]
You can change the shortcode as you like, the trick is the insertion of the username: $owner
, being the var that holds the username of the profile being watched.
Domain links
If you want usernames to become links to their respective domain page, tick Table IX-J10: Domain links BuddyPress: Convert usernames in photo names to domain links.
This causes the usernames as appearing behind photo names in parenthesis to become the links, if: 1. Table II-B5.1 is ticked and 2. No download link has been set in Table VI-C1.
The keyword w#owner
in album and photo descriptions will also become links to the user domain.
Likewise, the usernames at the comments on photos will be links to the domain.