]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
small changes before a preview 2 release
authorCash Costello <cash.costello@gmail.com>
Fri, 20 Jan 2012 00:59:48 +0000 (19:59 -0500)
committerCash Costello <cash.costello@gmail.com>
Fri, 20 Jan 2012 00:59:48 +0000 (19:59 -0500)
classes/TidypicsImage.php
manifest.xml
pages/photos/album/sort.php
start.php

index 7eca2f7c3622b14a39e51d6fb12729220d6010b5..b97a2b05e59509c6e203bed4dd9504600c69b645 100644 (file)
@@ -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 . '&amp;subtype=image&amp;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;
-               */
        }
 
        /**
index b955ef6bb0720b88f69da58284aeb846cebc5b37..d3c884f2f51b2782543c5a400f1c616f5ef13fe0 100644 (file)
@@ -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>
index 874da47772f096b049fa1e3fc0fc9d2a00c78dfd..a1d890be1d2d12f9a55fd2a6df5c38ac72883081 100644 (file)
@@ -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));
index 8b336d2ba39df3ddc39e394b0eb5aebe247a1d18..f1fdf84342d70dd731b8c63d5441640387a629ed 100644 (file)
--- 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;