From 5d26276359a4448f0aebc66c3a87b332338e7027 Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 3 Dec 2011 16:46:50 -0500 Subject: better image display code - using elgg_view_entity_icon() now --- classes/TidypicsAlbum.php | 16 ---------------- classes/TidypicsImage.php | 5 ++++- 2 files changed, 4 insertions(+), 17 deletions(-) (limited to 'classes') diff --git a/classes/TidypicsAlbum.php b/classes/TidypicsAlbum.php index 028811e55..e5a8e2c0c 100644 --- a/classes/TidypicsAlbum.php +++ b/classes/TidypicsAlbum.php @@ -126,22 +126,6 @@ class TidypicsAlbum extends ElggObject { return get_entity($this->getCoverImageGuid()); } - /** - * Get the URL for the album cover image - * - * @param string $size - * @return string - */ - public function getCoverImageURL($size = 'small') { - $coverGuid = $this->getCoverImageGuid(); - if ($coverGuid) { - $url = "pg/photos/thumbnail/$coverGuid/$size/"; - } else { - $url = "mod/tidypics/graphics/empty_album.png"; - } - return elgg_normalize_url($url); - } - /** * Get the GUID of the album cover * diff --git a/classes/TidypicsImage.php b/classes/TidypicsImage.php index a37e0dc38..1f6812760 100644 --- a/classes/TidypicsImage.php +++ b/classes/TidypicsImage.php @@ -67,7 +67,10 @@ class TidypicsImage extends ElggFile { * * @return string */ - public function getSrcUrl($size = 'small') { + public function getIconURL($size = 'small') { + if ($size == 'tiny') { + $size = 'thumb'; + } return elgg_normalize_url("photos/thumbnail/$this->guid/$size/"); } -- cgit v1.2.3