diff --git a/scripts/common.php b/scripts/common.php index b243468..784da53 100644 --- a/scripts/common.php +++ b/scripts/common.php @@ -190,6 +190,8 @@ class Flickr { $this->get_from_flickr($sci_name); $image = $this->get_image_from_db($sci_name); } + $photos_url = str_replace('/people/', '/photos/', $image['author_url'].'/'.$image['id']); + $image['photos_url'] = $photos_url; return $image; } diff --git a/scripts/overview.php b/scripts/overview.php index 918d832..1ce8896 100644 --- a/scripts/overview.php +++ b/scripts/overview.php @@ -94,8 +94,7 @@ if(isset($_GET['ajax_detections']) && $_GET['ajax_detections'] == "true" && isse $image = $_SESSION['images'][$key]; } else { $flickr_cache = $flickr->get_image($mostrecent['Sci_Name']); - $modaltext = $flickr_cache["author_url"] . "/" . $flickr_cache["id"]; - array_push($_SESSION["images"], array($comname, $flickr_cache["image_url"], $flickr_cache["title"], $modaltext, $flickr_cache["author_url"], $flickr_cache["license_url"])); + array_push($_SESSION["images"], array($comname, $flickr_cache["image_url"], $flickr_cache["title"], $flickr_cache["photos_url"], $flickr_cache["author_url"], $flickr_cache["license_url"])); $image = $_SESSION['images'][count($_SESSION['images']) - 1]; } } diff --git a/scripts/todays_detections.php b/scripts/todays_detections.php index 5f74e1b..3974f9b 100644 --- a/scripts/todays_detections.php +++ b/scripts/todays_detections.php @@ -217,8 +217,7 @@ if(isset($_GET['ajax_detections']) && $_GET['ajax_detections'] == "true" ) { $image = $_SESSION['images'][$key]; } else { $flickr_cache = $flickr->get_image($todaytable['Sci_Name']); - $modaltext = $flickr_cache["author_url"] . "/" . $flickr_cache["id"]; - array_push($_SESSION["images"], array($comname, $flickr_cache["image_url"], $flickr_cache["title"], $modaltext, $flickr_cache["author_url"], $flickr_cache["license_url"])); + array_push($_SESSION["images"], array($comname, $flickr_cache["image_url"], $flickr_cache["title"], $flickr_cache["photos_url"], $flickr_cache["author_url"], $flickr_cache["license_url"])); $image = $_SESSION['images'][count($_SESSION['images']) - 1]; } }