Right now, I’ve added some custom code from @joshuaabenazer.
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 '';
foreach ($results as $image) {
echo '- id);
echo '" />
';
}
echo '
';
}
}
}
It adds the recently uploaded media to a member’s header, like this:
My problem is, when you click on a thumbnail, it takes you to that media’s permalink instead of popping up the lightbox as usual. What code would I have to add to trigger the lightbox?