aboutsummaryrefslogtreecommitdiff
path: root/mod/profile/views/default/user/user.php
blob: d2411c3d9a7a730a6d925d4d3d91f1b804f2c3cb (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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?php

	/**
	 * Elgg user display
	 * 
	 * @package ElggProfile
	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
	 * @author Ben Werdmuller <ben@curverider.co.uk>
	 * @copyright Curverider Ltd 2008
	 * @link http://elgg.com/
	 * 
	 * @uses $vars['entity'] The user entity
	 */

?>

	<h2><a href="<?php echo $vars['entity']->getUrl(); ?>"><?php echo $vars['entity']->name; ?></a></h2>
	<p>
		*** USER ICON TO COME ***
	</p>
	<?php 

		if ($vars['full'] == true) {
	
	?>
	<p><b><?php echo elgg_echo("profile:aboutme"); ?></b></p>
	<p><?php echo nl2br($vars['entity']->description); ?></p>
	<?php

		}
		if (is_array($vars['profile']) && sizeof($vars['profile']) > 0)
			foreach($vars['profile'] as $shortname => $valtype) {
				if ($shortname != "description") {
					$value = $vars['entity']->$shortname;
					if (!empty($value)) {
					
	?>

	<p>
		<b><?php

			echo elgg_echo("profile:{$shortname}");
		
		?>: </b>
		<?php

			echo elgg_view("output/{$valtype}",array('value' => $vars['entity']->$shortname));
		
		?>
		
	</p>

	<?php
					}
				}
			}
	
		if ($vars['entity']->canEdit()) {
	
	?>
	<p>
		<a href="<?php echo $vars['url']; ?>mod/profile/edit.php"><?php echo elgg_echo("edit"); ?></a>
	</p>
	<?php

		}
	
	?>