aboutsummaryrefslogtreecommitdiff
path: root/classes/TidypicsImage.php
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2011-11-23 16:50:04 -0500
committerCash Costello <cash.costello@gmail.com>2011-11-23 16:50:04 -0500
commit0aa823656bf92ae472cb6780afb24f5a0390b880 (patch)
treed73409d132fac52dc44f06831c88556de090e273 /classes/TidypicsImage.php
parent4bfbb194ec1f9fc2647d1cb4e946fb95492076d6 (diff)
downloadelgg-0aa823656bf92ae472cb6780afb24f5a0390b880.tar.gz
elgg-0aa823656bf92ae472cb6780afb24f5a0390b880.tar.bz2
added editing of images
Diffstat (limited to 'classes/TidypicsImage.php')
-rw-r--r--classes/TidypicsImage.php17
1 files changed, 14 insertions, 3 deletions
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);