aboutsummaryrefslogtreecommitdiff
path: root/search.php
blob: b7b67295d1a7b0ae13c7a759170eb05ba3ddc9cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php

	include_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
	
	set_context('search');
	
	// Get user guid
	$guid = get_input('guid');
	
	$user = get_entity($guid);

	if ($user)
		$title = sprintf(elgg_echo('tidypics:usertag'), $user->name);
	else
		$title = "User does not exist";
		
	
	
	// create main column
	$body = elgg_view_title($title); 
	$body .= list_entities_from_relationship('phototag', $guid, false, 'object', 'image'); 

	// Set up submenus
	if (isloggedin()) {
		add_submenu_item(	elgg_echo("album:yours"), 
							$CONFIG->wwwroot . "pg/photos/owned/" . $_SESSION['user']->username, 
							'tidypics-b' );
	}
	add_submenu_item(	elgg_echo('album:all'), 
						$CONFIG->wwwroot . "pg/photos/world/", 
						'tidypics-z');
	add_submenu_item(	elgg_echo('tidypics:mostrecent'),
						$CONFIG->wwwroot . 'pg/photos/mostrecent',
						'tidypics-z');

	
	
	$body = elgg_view_layout('two_column_left_sidebar','',$body);
	

	page_draw($title,$body);

?>