diff options
author | Greg Froese <greg.froese@gmail.com> | 2009-10-09 03:23:52 +0000 |
---|---|---|
committer | Greg Froese <greg.froese@gmail.com> | 2009-10-09 03:23:52 +0000 |
commit | 71b4d8c3c3343455552a76756e5aaacd82034c4e (patch) | |
tree | 6fa9ed22a82a1815d63412bbab236283ed1bac62 /views/default/tidypics/forms | |
parent | 9aa79bc38829f164bacc6b522278d0098b597933 (diff) | |
download | elgg-71b4d8c3c3343455552a76756e5aaacd82034c4e.tar.gz elgg-71b4d8c3c3343455552a76756e5aaacd82034c4e.tar.bz2 |
flickr integration updates
Diffstat (limited to 'views/default/tidypics/forms')
-rw-r--r-- | views/default/tidypics/forms/setupFlickr.php | 27 |
1 files changed, 26 insertions, 1 deletions
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 = "<p>"; -$form_body .= "Please enter your Flickr username here:<br /><input style='width: 20%;' type='text' name='flickr_username' value='$flickr_username->value' ' class='input-text' /><br />"; +$form_body .= "Please enter your Flickr username here: <input style='width: 20%;' type='text' name='flickr_username' value='$flickr_username->value' ' class='input-text' /> <br />"; $form_body .= "<input type='hidden' name='return_url' value='$_SERVER[REQUEST_URI]' />"; + +$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 .= "<br />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 .= "<br />"; $form_body .= elgg_view('input/submit', array('value' => elgg_echo("save"))); flickr_menu(); |