From: Cash Costello Date: Thu, 18 Jun 2009 01:54:52 +0000 (+0000) Subject: added the framework to get a list of photos tagged with a user X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=effbb14022495081f80acdc1d68ced09c1dd67c0;p=lorea%2Felgg.git added the framework to get a list of photos tagged with a user --- diff --git a/search.php b/search.php new file mode 100644 index 000000000..2899d2c3f --- /dev/null +++ b/search.php @@ -0,0 +1,24 @@ +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 . '&subtype=image&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