From 71b4d8c3c3343455552a76756e5aaacd82034c4e Mon Sep 17 00:00:00 2001 From: Greg Froese Date: Fri, 9 Oct 2009 03:23:52 +0000 Subject: flickr integration updates --- views/default/tidypics/forms/setupFlickr.php | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'views/default/tidypics/forms') diff --git a/views/default/tidypics/forms/setupFlickr.php b/views/default/tidypics/forms/setupFlickr.php index cee94058e..8ae7c27bb 100644 --- a/views/default/tidypics/forms/setupFlickr.php +++ b/views/default/tidypics/forms/setupFlickr.php @@ -3,12 +3,37 @@ require_once( dirname(dirname(dirname(dirname(dirname(__FILE__)))))) . "/lib/fli $user = get_loggedin_user(); $flickr_username = get_metadata_byname( $user->guid, "flickr_username" ); +$flickr_album_id = get_metadata_byname( $user->guid, "flickr_album_id" ); $action = $vars['url'] . 'action/tidypics/flickrSetup'; $form_body = "

"; -$form_body .= "Please enter your Flickr username here:

"; +$form_body .= "Please enter your Flickr username here:
"; $form_body .= ""; + +$albums = get_entities( "object", "album", $user->guid ); +$options = array( 0 => "Select album" ); +foreach( $albums as $album ) { + $title = $album->title; + switch( $album->access_id ) { + case ACCESS_PRIVATE: + $title .= " (private)"; + break; + case ACCESS_PUBLIC: + $title .= " (public)"; + break; + default: + $title .= " (not sure)"; + break; + } + $options[$album->guid] = $title; +} + +$form_body .= "
Album to import photos to: "; +$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(); -- cgit v1.2.3