From 24f3f2f0d304254451c46a3b28a8e1f4678bc02f Mon Sep 17 00:00:00 2001 From: Greg Froese Date: Thu, 8 Oct 2009 04:38:19 +0000 Subject: flickr integration --- pages/flickr/importPhotosets.php | 44 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 pages/flickr/importPhotosets.php (limited to 'pages/flickr/importPhotosets.php') diff --git a/pages/flickr/importPhotosets.php b/pages/flickr/importPhotosets.php new file mode 100644 index 000000000..c9b4416e4 --- /dev/null +++ b/pages/flickr/importPhotosets.php @@ -0,0 +1,44 @@ +Click on the set you wish to import into this site. Copies of the photos will be made and stored on this site where they can be viewed and commented on."; + + $viewer = get_loggedin_user(); + + require_once dirname(dirname(dirname(__FILE__))) . "/lib/phpFlickr/phpFlickr.php"; + require_once( dirname(dirname(dirname(__FILE__)))) . "/lib/flickr.php"; + $f = new phpFlickr("26b2abba37182aca62fe0eb2c7782050"); + + $viewer = get_loggedin_user(); + $flickr_username = get_metadata_byname( $viewer->guid, "flickr_username" ); + $flickr_id = get_metadata_byname( $viewer->guid, "flickr_id" ); + + $photosets = $f->photosets_getList( $flickr_id->value ); + foreach( $photosets["photoset"] as $photoset ) { + $body .= "
"; + $body .= "$photoset[title]
"; + + $count = 0; + $looper = 0; + //create links to import photos 10 at a time + while( $photoset["photos"] > $count ) { + $looper++; + $body .= " $looper"; + $count = $count + 10; + } + $body .= "
$photoset[photos] images"; + $body .= "
"; +// echo "
"; var_dump( $photoset ); echo "
"; die; + } + +// $body .= elgg_view("tidypics/forms/setupFlickr", array(), false, true ); + flickr_menu(); + page_draw( "Photoset Import", elgg_view_layout("two_column_left_sidebar", '', $body)); + +?> \ No newline at end of file -- cgit v1.2.3