From a2e4f84be4da51b7ec8fbe625b1b26dde2ad9289 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Thu, 19 Jan 2012 19:59:48 -0500 Subject: small changes before a preview 2 release --- classes/TidypicsImage.php | 45 +++++---------------------------------------- manifest.xml | 4 ++-- pages/photos/album/sort.php | 2 +- start.php | 2 +- 4 files changed, 9 insertions(+), 44 deletions(-) diff --git a/classes/TidypicsImage.php b/classes/TidypicsImage.php index 7eca2f7c3..b97a2b05e 100644 --- a/classes/TidypicsImage.php +++ b/classes/TidypicsImage.php @@ -338,55 +338,20 @@ class TidypicsImage extends ElggFile { /** * Get an array of photo tag information * - * @return array of json representations of the tags and the tag link text + * @return array */ public function getPhotoTags() { $tags = array(); - $annotations = get_annotations($this->getGUID(), 'object', 'image', 'phototag'); + $annotations = elgg_get_annotations(array( + 'guid' => $this->getGUID(), + 'annotation_name' => 'phototag', + )); foreach ($annotations as $annotation) { $tags[] = unserialize($annotation->value); } return $tags; - - /* - $photo_tags_json = "["; - foreach ($photo_tags as $p) { - $photo_tag = unserialize($p->value); - - // create link to page with other photos tagged with same tag - $phototag_text = $photo_tag->value; - $phototag_link = $CONFIG->wwwroot . 'search/?tag=' . $phototag_text . '&subtype=image&object=object'; - if ($photo_tag->type === 'user') { - $user = get_entity($photo_tag->value); - if ($user) { - $phototag_text = $user->name; - } else { - $phototag_text = "unknown user"; - } - - $phototag_link = $CONFIG->wwwroot . "pg/photos/tagged/" . $photo_tag->value; - } - - if (isset($photo_tag->x1)) { - // hack to handle format of Pedro Prez's tags - ugh - $photo_tag->coords = "\"x1\":\"{$photo_tag->x1}\",\"y1\":\"{$photo_tag->y1}\",\"width\":\"{$photo_tag->width}\",\"height\":\"{$photo_tag->height}\""; - $photo_tags_json .= '{' . $photo_tag->coords . ',"text":"' . $phototag_text . '","id":"' . $p->id . '"},'; - } else { - $photo_tags_json .= '{' . $photo_tag->coords . ',"text":"' . $phototag_text . '","id":"' . $p->id . '"},'; - } - - // prepare variable arrays for tagging view - $photo_tag_links[$p->id] = array('text' => $phototag_text, 'url' => $phototag_link); - } - - $photo_tags_json = rtrim($photo_tags_json,','); - $photo_tags_json .= ']'; - - $ret_data = array('json' => $photo_tags_json, 'links' => $photo_tag_links); - return $ret_data; - */ } /** diff --git a/manifest.xml b/manifest.xml index b955ef6bb..d3c884f2f 100644 --- a/manifest.xml +++ b/manifest.xml @@ -2,12 +2,12 @@ Tidypics Photo Gallery Cash Costello - 1.8.0-preview1 + 1.8.0-preview2 A photo gallery with albums, tagging, and a slideshow. content multimedia https://github.com/cash/Tidypics - Cash Costello 2011 + Cash Costello 2011-2012 GNU General Public License Version 2 elgg_release diff --git a/pages/photos/album/sort.php b/pages/photos/album/sort.php index 874da4777..a1d890be1 100644 --- a/pages/photos/album/sort.php +++ b/pages/photos/album/sort.php @@ -31,7 +31,7 @@ if (elgg_instanceof($owner, 'group')) { elgg_push_breadcrumb($owner->name, "photos/owner/$owner->username"); } elgg_push_breadcrumb($album->title, $album->getURL()); -elgg_push_breadcrumb($title); +elgg_push_breadcrumb(elgg_echo('album:sort')); $content = elgg_view_form('photos/album/sort', array(), array('album' => $album)); diff --git a/start.php b/start.php index 8b336d2ba..f1fdf8434 100644 --- a/start.php +++ b/start.php @@ -195,7 +195,7 @@ function tidypics_page_handler($page) { case "upload": // upload images to album set_input('guid', $page[1]); - set_input('uploader', elgg_extract(2, $page, 'ajax')); + set_input('uploader', elgg_extract(2, $page, 'basic')); require "$base/image/upload.php"; break; -- cgit v1.2.3