all repos — keyring-reactions-importer @ 29e6660b2babd8475924f5f7179a1d375818982b

1.0
Peter Molnar hello@petermolnar.eu
Fri, 01 May 2015 11:19:26 +0100
commit

29e6660b2babd8475924f5f7179a1d375818982b

parent

9fd460389237bec57fde945a28bc6fe04bd53b08

2 files changed, 0 insertions(+), 47 deletions(-)

jump to
M importers/keyring-reactions-500px.phpimporters/keyring-reactions-500px.php

@@ -172,33 +172,6 @@ $this->insert_comment ( $post_id, $c, $element, $avatar );

} } - - - /* - // temporarily hack - $baseurl = sprintf( "https://api.500px.com/v1/photos/%s?", $silo_id ); - $params = array( - 'comments' => 1, - ); - $starturl = $baseurl . http_build_query( $params ); - $result = $this->request ( $starturl, 'photo' ); - - if ($result && is_array($result) && !empty($result)) { - $geo = array ( - 16 => 'geo_latitude', - 17 => 'geo_longitude' - ); - - foreach ($geo as $check => $meta_key ) { - if ( isset($result[$check]) && !empty($result[$check])) { - update_post_meta ($post_id, $meta_key, $result[$check]); - Keyring_Util::debug(sprintf(__('adding geo data for %s','keyring'), $post_id)); - } - } - - - } - */ }
M importers/keyring-reactions-flickr.phpimporters/keyring-reactions-flickr.php

@@ -144,26 +144,6 @@ /**

* COMMENTS */ function get_comments ( $post_id, $silo_id ) { - /* - // <!-- TEMP - $lat = get_post_meta($post_id, 'geo_latitude', true); - $lon = get_post_meta($post_id, 'geo_longitude', true); - if (!empty($lat) && !empty($lon)) { - $baseurl = "https://api.flickr.com/services/rest/?"; - $params = array( - 'method' => 'flickr.photos.geo.setLocation', - 'api_key' => $this->service->key, - 'photo_id' => $silo_id, - 'lat' => $lat, - 'lon' => $lon, - ); - $url = $baseurl . http_build_query( $params ); - Keyring_Util::Debug(sprintf(__('setting geodata for #%s lat: %s long: %s'), $post_id, $lat, $lon)); - $this->service->request( $url, array( 'method' => $this->request_method, 'timeout' => 10 ) ); - } - // --> - */ - $results = $this->query_comments( $silo_id ); if ($results && is_array($results) && !empty($results)) {