diff options
author | cash <cash.costello@gmail.com> | 2011-11-19 12:10:46 -0500 |
---|---|---|
committer | cash <cash.costello@gmail.com> | 2011-11-19 12:10:46 -0500 |
commit | 4562cfbb1a630b14fd194271f99f1f8c098dc38d (patch) | |
tree | 926e9e22cca553f48583ff25d782a092795ceb7c /classes | |
parent | eb9b13e1bfd861cba9b7a812d929b565d5775175 (diff) | |
download | elgg-4562cfbb1a630b14fd194271f99f1f8c098dc38d.tar.gz elgg-4562cfbb1a630b14fd194271f99f1f8c098dc38d.tar.bz2 |
basic pages for viewing all/mine/friends and viewing an album
Diffstat (limited to 'classes')
-rw-r--r-- | classes/TidypicsAlbum.php | 18 | ||||
-rw-r--r-- | classes/TidypicsImage.php | 13 |
2 files changed, 31 insertions, 0 deletions
diff --git a/classes/TidypicsAlbum.php b/classes/TidypicsAlbum.php index e178acd5d..1fbdb8ad8 100644 --- a/classes/TidypicsAlbum.php +++ b/classes/TidypicsAlbum.php @@ -18,6 +18,15 @@ class TidypicsAlbum extends ElggObject { } /** + * Get the title of the photo album + * + * @return string + */ + public function getTitle() { + return $this->title; + } + + /** * Delete album * * @return bool @@ -70,6 +79,15 @@ class TidypicsAlbum extends ElggObject { return elgg_view_entity_list($images, $count, $offset, $limit, false, false, true); } + public function getCoverImageURL($size = 'small') { + if ($this->cover) { + $url = "pg/photos/thumbnail/$this->cover/$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 531d54912..652cc9e9b 100644 --- a/classes/TidypicsImage.php +++ b/classes/TidypicsImage.php @@ -18,6 +18,19 @@ class TidypicsImage extends ElggFile { } /** + * Get the title of the image + * + * @return string + */ + public function getTitle() { + return $this->title; + } + + public function getSrcUrl() { + return "pg/photos/thumbnail/$this->guid/small/"; + } + + /** * delete image * * @return bool |