aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2009-06-18 01:54:52 +0000
committerCash Costello <cash.costello@gmail.com>2009-06-18 01:54:52 +0000
commiteffbb14022495081f80acdc1d68ced09c1dd67c0 (patch)
tree7112315a02ee181a45385d7270317203201b21b1
parent5b8a7460d026d91f5c2411673f3b02be2b0e724d (diff)
downloadelgg-effbb14022495081f80acdc1d68ced09c1dd67c0.tar.gz
elgg-effbb14022495081f80acdc1d68ced09c1dd67c0.tar.bz2
added the framework to get a list of photos tagged with a user
-rw-r--r--search.php24
-rw-r--r--start.php5
-rw-r--r--views/default/object/image.php4
3 files changed, 31 insertions, 2 deletions
diff --git a/search.php b/search.php
new file mode 100644
index 000000000..2899d2c3f
--- /dev/null
+++ b/search.php
@@ -0,0 +1,24 @@
+<?php
+
+ include_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
+
+ // Set context
+ set_context('search');
+
+ // Get user guid
+ $guid = get_input('guid');
+
+ $user = get_entity($guid);
+// if ($user)
+// $user->name;
+
+ $title = $user->name;
+
+
+ $body = elgg_view_title($title);
+ $body .= list_entities_from_relationship('phototag', $guid, false, 'object', 'image');
+ $body = elgg_view_layout('two_column_left_sidebar','',$body);
+
+ page_draw($title,$body);
+
+?> \ No newline at end of file
diff --git a/start.php b/start.php
index 9c59fd8e6..6318a3da1 100644
--- a/start.php
+++ b/start.php
@@ -253,6 +253,11 @@
include($CONFIG->pluginspath . "tidypics/world.php");
break;
+ case "search": //view an image individually
+ if (isset($page[1])) set_input('guid',$page[1]);
+ include($CONFIG->pluginspath . "tidypics/search.php");
+ break;
+
case "rate": //rate image
if (isset($page[1])) set_input('guid',$page[1]);
include($CONFIG->pluginspath . "tidypics/actions/rate.php");
diff --git a/views/default/object/image.php b/views/default/object/image.php
index d86f3ca46..d7b791a78 100644
--- a/views/default/object/image.php
+++ b/views/default/object/image.php
@@ -30,7 +30,7 @@ if ($photo_tags) {
$phototag_text = $photo_tag->value;
- $phototag_link = $vars['url'] . "word";
+ $phototag_link = $vars['url'] . 'search/?tag=' . $phototag_text . '&amp;subtype=image&amp;object=object';
if ($photo_tag->type === 'user') {
$user = get_entity($photo_tag->value);
if ($user)
@@ -38,7 +38,7 @@ if ($photo_tags) {
else
$phototag_text = "unknown user";
- $phototag_link = $vars['url'] . "user";
+ $phototag_link = $vars['url'] . "pg/photos/search/" . $photo_tag->value;
}
// hack to handle format of Pedro Prez's tags - ugh