Display link to user's embedded gallery (or not if it does not exist)

Last modified: August 26, 2009 - 22:11

description

This requires (at the time of writing) the CVS version of the Gallery2 module it includes a patch that makes this feature work. You can display a link to a member's Gallerry2 gallery, or not if it does not exist, using this code:

instructions

  1. In a text editor paste the following snippet into your user_profile.tpl.php file
    (For instructions on how to get started with your own custom user profile layout click through to the Customising the user profile layout handbook page.)
  2. Upload your edited user_profile.tpl.php to your active theme folder

<?php
global $user;
$galleryprofile=gallery_view_user($user);
print
$galleryprofile['Gallery2']['gallery_view_user_album']['value'];
?>

drupal 6?

scarer - August 10, 2009 - 00:45

what would be the equivalent for drupal 6?

 
 

Drupal is a registered trademark of Dries Buytaert.