photos_enable != 'no') { //the number of files to display $number = (int) $vars['entity']->num_display; //if no number has been set, default to 5 if (!$number) $number = 5; $owner = page_owner_entity(); $owner_albums = get_entities("object", "album", page_owner(), "", $number, 0, false); echo '
'; echo '

' . elgg_echo('albums') . '

'; if ($owner_albums) { echo '
'; foreach($owner_albums as $album){ //get album cover if one was set if($album->cover) $album_cover = 'album cover'; else $album_cover = 'new album'; ?>
time_created);?>
getURL()}\">" . sprintf(elgg_echo("comments")) . " (" . $numcomments . ")
"; ?>
username) || empty($owner->username)) { echo '' . elgg_echo('album:all') . ''; } else { echo '' . elgg_echo('album:more') . ''; } //close album_widget_container div echo "
"; } else { echo '
'; echo '

'.elgg_echo("album:none").'

'; if ($owner && ($owner->canWriteToContainer($_SESSION['user']))){ echo 'username.'>'.elgg_echo("album:add").''; echo '
'; } } //close group_albums_widget div echo "
"; } ?>