How to display images member header?

Thank’s for support.

Attachment Link(s):

http://rtcamp.com/wp-content/uploads/rtMedia/topics/4848/2013/10/header.jpg

@faceciak - As of now there is no easy way to get this done.

Hopefully in future when we would be adding the argument to limit the number of media in the rtmedia_gallery function this would become easier.

@faceciak - I just found an old reply containing some code that may help. Check the following link to see if that code helps you -> http://rtcamp.com/groups/rtmedia/forum/topic/problems-after-updating-media-page-not-displaying/#post-42800

Thanks for the answer but I can not make it work. :frowning: Can you send an email to ricky.mase @ yahoo.it with all the steps to follow?.'re Very kind, thank you again. Ricky

@faceciak - Instead of emailing you about it, lets discuss about it here so that it would help others having the same query.

Where did you put that code? You need to place it in your themes functions.php. Once you have placed the code there you would need to call the function show_last_n_images( 5 ) wherever you would want to show it. I am guessing members-header.php is the template you are looking for to place the above code.

@joshuaabenazer I solved it, thank you very much. :smiley:

@faceciak - Glad to know you could get it working :slight_smile:
If possible share the solution here so that it could help others having the same query.

Yes, please share the solution!! Thank you :slight_smile:

Create the file bp-custom.php containing the code:

<?php  
function show_last_n_images($n = 5) {  
    if ($user_id = bp_displayed_user_id()) {  
        $model = new RTMediaModel();  
        $results = $model->get(array('media_type' => 'photo', 'media_author' => $user_id), 0, $n);  
        if ($results) {  
            echo '';  
        }  
    }  
}  
?>

enter it in the plugins folder.

After you open the file profile.php and enter the following string:

<?php show_last_n_images ($ n = 5) ?>

at the end of the file.

If you want you can place it in a location of your choice where you want to display the images.

Saved it all go in a member’s profile and you’ll see beneath his data, the last 5 photos added.

:smiley:

@faceciak - Thanks for sharing the solution and helping the community. :slight_smile: