guid, "flickr_username" ); $flickr_album_id = get_metadata_byname( $user->guid, "flickr_album_id" ); $action = $vars['url'] . 'admin/action/tidypics/flickrSetup'; $form_body = "
". elgg_echo( 'flickr:intro' ) . "
";
$form_body .= elgg_echo( 'flickr:usernamesetup') . "
";
$form_body .= "";
$albums = elgg_get_entities(array(
"type=" => "object",
"subtype" => "album",
"owner_guid" => $user->guid,
));
$options = array( 0 => elgg_echo( 'flickr:selectalbum' ));
foreach( $albums as $album ) {
$title = $album->title;
switch( $album->access_id ) {
case ACCESS_PRIVATE:
$title .= " (" . elgg_echo( 'private' ) . ")";
break;
case ACCESS_PUBLIC:
$title .= " (" . elgg_echo( 'public' ) . ")";
break;
default:
$title .= " (no known permission set)";
break;
}
$options[$album->guid] = $title;
}
$form_body .= "
" . elgg_echo( 'flickr:albumdesc' );
$form_body .= elgg_view('input/pulldown', array('internalname' => 'album_id',
'options_values' => $options,
'value' => $flickr_album_id->value ));
$form_body .= "
";
$form_body .= elgg_view('input/submit', array('value' => elgg_echo("save")));
flickr_menu();
echo elgg_view('input/form', array('action' => $action, 'body' => $form_body));