diff options
author | Cash Costello <cash.costello@gmail.com> | 2011-11-23 16:50:04 -0500 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2011-11-23 16:50:04 -0500 |
commit | 0aa823656bf92ae472cb6780afb24f5a0390b880 (patch) | |
tree | d73409d132fac52dc44f06831c88556de090e273 /classes | |
parent | 4bfbb194ec1f9fc2647d1cb4e946fb95492076d6 (diff) | |
download | elgg-0aa823656bf92ae472cb6780afb24f5a0390b880.tar.gz elgg-0aa823656bf92ae472cb6780afb24f5a0390b880.tar.bz2 |
added editing of images
Diffstat (limited to 'classes')
-rw-r--r-- | classes/TidypicsAlbum.php | 11 | ||||
-rw-r--r-- | classes/TidypicsImage.php | 17 |
2 files changed, 25 insertions, 3 deletions
diff --git a/classes/TidypicsAlbum.php b/classes/TidypicsAlbum.php index f1fd20669..f85b66d72 100644 --- a/classes/TidypicsAlbum.php +++ b/classes/TidypicsAlbum.php @@ -72,6 +72,17 @@ class TidypicsAlbum extends ElggObject { } /** + * Get the URL for this album + * + * @return string + */ + public function getURL() { + $title = elgg_get_friendly_title($this->getTitle()); + $url = "photos/album/$this->guid/$title"; + return elgg_normalize_url($url); + } + + /** * Get an array of image objects * * @param int $limit diff --git a/classes/TidypicsImage.php b/classes/TidypicsImage.php index c604d869e..926bc386b 100644 --- a/classes/TidypicsImage.php +++ b/classes/TidypicsImage.php @@ -9,8 +9,8 @@ class TidypicsImage extends ElggFile { - protected function initialise_attributes() { - parent::initialise_attributes(); + protected function initializeAttributes() { + parent::initializeAttributes(); $this->attributes['subtype'] = "image"; } @@ -52,6 +52,17 @@ class TidypicsImage extends ElggFile { } /** + * Get the URL for the web page of this image + * + * @return string + */ + public function getURL() { + $title = elgg_get_friendly_title($this->getTitle()); + $url = "photos/image/$this->guid/$title"; + return elgg_normalize_url($url); + } + + /** * Get the src URL for the image * * @return string @@ -312,7 +323,7 @@ class TidypicsImage extends ElggFile { * @param $viewer_guid the guid of the viewer (0 if not logged in) * @return array with number of views, number of unique viewers, and number of views for this viewer */ - public function getViews($viewer_guid) { + public function getViewCount($viewer_guid) { $views = get_annotations($this->getGUID(), "object", "image", "tp_view", "", 0, 99999); if ($views) { $total_views = count($views); |