]> projects.mako.cc - scuttle/blob - templates/profile.tpl.php
Merge branch 'php8'
[scuttle] / templates / profile.tpl.php
1 <?php
2 $sf = new ServiceFactory();
3 $userservice =& $sf->getServiceInstance('UserService');
4 $this->includeTemplate($GLOBALS['top_include']);
5 ?>
6
7 <dl id="profile">
8 <dt><?php echo T_('Username'); ?></dt>
9     <dd><?php echo $user; ?></dd>
10 <?php
11 if ($row['name'] != "") {
12 ?>
13 <dt><?php echo T_('Name'); ?></dt>
14     <dd><?php echo $row['name']; ?></dd>
15 <?php
16 }
17 if ($row['homepage'] != "") {
18 ?>
19 <dt><?php echo T_('Homepage'); ?></dt>
20     <dd><a href="<?php echo $row['homepage']; ?>"><?php echo $row['homepage']; ?></a></dd>
21 <?php
22 }
23 ?>
24 <dt><?php echo T_('Member Since'); ?></dt>
25     <dd><?php echo date($GLOBALS['longdate'], strtotime($row['uDatetime'])); ?></dd>
26 <?php
27 if ($row['uContent'] != "") {
28 ?>
29 <dt><?php echo T_('Description'); ?></dt>
30     <dd><?php echo $row['uContent']; ?></dd>
31 <?php
32 }
33 $watching = $userservice->getWatchNames($userid);
34 if ($watching) {
35 ?>
36     <dt><?php echo T_('Watching'); ?></dt>
37         <dd>
38             <?php
39             $list = '';
40             foreach($watching as $watchuser) {
41                 $list .= '<a href="'. createURL('bookmarks', $watchuser) .'">'. $watchuser .'</a>, ';
42             }
43             echo substr($list, 0, -2);
44             ?>
45         </dd>
46 <?php
47 }
48 $watchnames = $userservice->getWatchNames($userid, true);
49 if ($watchnames) {
50 ?>
51     <dt><?php echo T_('Watched By'); ?></dt>
52         <dd>
53             <?php
54             $list = '';
55             foreach($watchnames as $watchuser) {
56                 $list .= '<a href="'. createURL('bookmarks', $watchuser) .'">'. $watchuser .'</a>, ';
57             }
58             echo substr($list, 0, -2);
59             ?>
60         </dd>
61 <?php
62 }
63 ?>
64 </dl>
65
66 <?php
67 $this->includeTemplate($GLOBALS['bottom_include']);
68 ?>

Benjamin Mako Hill || Want to submit a patch?