aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--classes/TidypicsImage.php45
-rw-r--r--manifest.xml4
-rw-r--r--pages/photos/album/sort.php2
-rw-r--r--start.php2
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 @@
<plugin_manifest xmlns="http://www.elgg.org/plugin_manifest/1.8">
<name>Tidypics Photo Gallery</name>
<author>Cash Costello</author>
- <version>1.8.0-preview1</version>
+ <version>1.8.0-preview2</version>
<description>A photo gallery with albums, tagging, and a slideshow.</description>
<category>content</category>
<category>multimedia</category>
<website>https://github.com/cash/Tidypics</website>
- <copyright>Cash Costello 2011</copyright>
+ <copyright>Cash Costello 2011-2012</copyright>
<license>GNU General Public License Version 2</license>
<requires>
<type>elgg_release</type>
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;