5 * Assumes $user object for displayed user is present
7 * SourceForge: Breaking Down the Barriers to Open Source Development
8 * Copyright 1999-2001 (c) VA Linux Systems
9 * http://sourceforge.net
11 * @author Drew Streib <dtype@valinux.com>
14 require_once $gfwww.'include/vote_function.php';
16 $HTML->header(array('title'=>_('Developer Profile')));
18 echo $HTML->boxTop(_('Personal Information'), _('Personal Information')); ?>
20 <div about="" typeof="sioc:UserAccount" xmlns:sioc="http://rdfs.org/sioc/ns#">
22 <table class="my-layout-table" id="user-profile-personal-info">
25 <?php echo _('User Id') ?>
30 //print '<div property ="foaf:member" content="fusionforge:ForgeCommunity" xmlns:fusionforge="http://fusionforge.org/fusionforge#">';
32 // description as a FusionForge Community member
33 //print '<div property ="dc:Identifier" content="'.$user_id.'" xmlns:dc="http://purl.org/dc/elements/1.1/">';
35 if (session_loggedin() && user_ismember(1)) {
36 echo util_make_link ('/admin/useredit.php?user_id='.$user_id,$user_id);
42 </strong><?php if(forge_get_config('use_people')) { ?>( <?php echo util_make_link ('/people/viewprofile.php?user_id='.$user_id,'<strong>'._('Skills Profile').'</strong>'); ?> )<?php } ?>
47 <td><?php echo _('Login name') ?></td>
48 <td><strong><span property="sioc:name"><?php
49 print $user->getUnixName();
50 ?></span></strong></td>
54 <td><?php echo _('Real name') ?> </td>
56 <div rev="foaf:account" xmlns:foaf="http://xmlns.com/foaf/0.1/">
57 <div about="#me" typeof="foaf:Person">
58 <strong><span property="foaf:name"><?php
59 $user_title = $user->getTitle();
60 print ($user_title ? $user_title .' ' :''). $user->getRealName();
67 <?php if(!isset($GLOBALS['sys_show_contact_info']) || $GLOBALS['sys_show_contact_info']) { ?>
69 <td><?php echo _('Your Email Address') ?>: </td>
72 //$user_mail=$user->getEmail();
73 $user_mailsha1=$user->getSha1Email();
74 // Removed for privacy reasons
75 //print '<span property="sioc:email" content="'. $user_mail .'">';
76 print '<span property="sioc:email_sha1" content="'. $user_mailsha1 .'">';
77 echo util_make_link ('/sendmessage.php?touser='.$user_id, str_replace('@',' @nospam@ ',$user_mail));
82 <?php if ($user->getJabberAddress()) { ?>
84 <td><?php echo _('Jabber Address') ?></td>
86 <a href="jabber:<?php print $user->getJabberAddress(); ?>"><strong><?php print $user->getJabberAddress(); ?></strong></a>
91 <?php if ($user->getAddress() || $user->getAddress2()) { ?>
93 <td><?php echo _('Address:'); ?></td>
94 <td><?php echo $user->getAddress().'<br/>'.$user->getAddress2(); ?></td>
98 <?php if ($user->getPhone()) { ?>
100 <td><?php echo _('Phone:'); ?></td>
102 //print '<div property="foaf:phone" content="'.$user->getPhone().'">';
103 echo $user->getPhone();
109 <?php if ($user->getFax()) { ?>
111 <td><?php echo _('FAX:'); ?></td>
112 <td><?php echo $user->getFax(); ?></td>
119 <?php echo _('Site Member Since') ?>
121 <td><strong><?php print date(_('Y-m-d H:i'), $user->getAddDate()); ?></strong>
127 if (forge_get_config('use_ratings')) {
128 echo $HTML->boxMiddle(_('Peer Rating'), _('Peer Rating'));
129 echo '<table class="my-layout-table" id="user-profile-rating">';
130 if ($user->usesRatings()) {
131 echo vote_show_user_rating($user_id);
133 echo '<tr><td colspan="2">';
134 echo _('User chose not to participate in peer rating');
137 echo '</table><!-- id="user-profile-rating" -->';
140 if ($sys_use_diary) {
141 echo $HTML->boxMiddle(_('Diary and Notes'), _('Diary and Notes'));
145 Get their diary information
149 $res = db_query_params ('SELECT count(*) from user_diary WHERE user_id=$1 AND is_public=1',
151 echo _('Diary/Note entries:').' '.db_result($res,0,0).'
153 //.'<span rel="foaf:weblog">'
154 echo util_make_link ('/developer/diary.php?diary_user='.$user_id,_('View Diary & Notes'));
158 echo util_make_link ('/developer/monitor.php?diary_user='.$user_id,
159 html_image("ic/check.png",'15','13',array(),0) ._('Monitor this Diary')
162 $hookparams['user_id'] = $user_id;
163 plugin_hook("user_personal_links",$hookparams);
170 echo $HTML->boxMiddle(_('Project Info'), _('Project Info'));
172 // now get listing of groups for that user
173 $res_cat = db_query_params ('SELECT groups.group_name,
174 groups.unix_group_name,
176 user_group.admin_flags,
179 groups,user_group,role WHERE user_group.user_id=$1 AND user_group.role_id=role.role_id AND
180 groups.group_id=user_group.group_id AND groups.is_public=$2 AND groups.status=$3',
185 // see if there were any groups
186 echo '<div xmlns:sioc="http://rdfs.org/sioc/ns#" xmlns:doap="http://usefulinc.com/ns/doap#">'."\n";
187 if (db_numrows($res_cat) < 1) {
189 <p><?php echo _('This developer is not a member of any projects.') ?></p>
191 } else { // endif no groups
192 print "<p>"._('This developer is a member of the following projects:')."<br /> ";
194 while ($row_cat = db_fetch_array($res_cat)) {
196 $project_link = util_make_link_g ($row_cat['unix_group_name'],$row_cat['group_id'],$row_cat['group_name']);
197 $project_uri = util_make_url_g ($row_cat['unix_group_name'],$row_cat['group_id']);
198 // sioc:UserGroups for all members of a project are named after /projects/A_PROJECT/members/
199 $usergroup_uri = $project_uri .'members/';
202 print '<span rel="sioc:member_of">'."\n"
203 .'<div about="'. $usergroup_uri .'" typeof="sioc:UserGroup">'."\n"
204 .'<span rel="sioc:usergroup_of">'."\n"
205 .'<div about="'. $project_uri .'" typeof="sioc:Space">';
206 //print '<div property="sioc:has_function" content= "'.$row_cat['role_name'].'" xmlns:sioc="http://rdfs.org/sioc/ns#">';
208 print ('<br />' . $project_link .' ('.$row_cat['role_name'].')');
211 if (trim($row_cat['admin_flags']) == 'A') {
212 print '<span rev="doap:maintainer" resource="#me"></span>';
215 print '<span rev="doap:developer" resource="#me"></span>';
218 echo "</div>\n"; // sioc:Space .../projects/A_PROJECT/
219 echo "</span>\n"; // sioc:usergroup_of
220 echo "</div>\n"; // sioc:UserGroup .../projects/A_PROJECT/members
221 echo "</span>\n"; // sioc:member_of
225 echo "</div>\n"; // prefixes
227 echo "</div>\n"; // end of about=""
229 $me = session_get_user();
230 if (forge_get_config('use_ratings')) {
231 if ($user->usesRatings() && (!$me || $me->usesRatings())) {
232 printf(_('<p>If you are familiar with this user, please take a moment to rate him/her on the following criteria. Keep in mind, that your rating will be visible to the user and others.</p><p>The %1$s Peer Rating system is based on concepts from <a href="http://www.advogato.com/">Advogato.</a> The system has been re-implemented and expanded in a few ways.</p>'), forge_get_config ('forge_name'));
235 <div class="align-center">
236 <?php echo vote_show_user_rate_box ($user_id, $me?$me->getID():0); ?>
239 <?php printf(_('<p>The Peer rating box shows all rating averages (and response levels) for each individual criteria. Due to the math and processing required to do otherwise, these numbers incoporate responses from both "trusted" and "non-trusted" users.</p><ul><li>The "Sitewide Rank" field shows the user\'s rank compared to all ranked %1$s users.</li><li>The "Aggregate Score" shows an average, weighted overall score, based on trusted-responses only.</li><li>The "Personal Importance" field shows the weight that users ratings of other developers will be given (between 1 and 1.5) -- higher rated user\'s responses are given more weight.</li></ul><p>If you would like to opt-out from peer rating system (this will affect your ability to both rate and be rated), refer to <a href="%2$s">your account maintenance page</a>. If you choose not to participate, your ratings of other users will be permanently deleted and the \'Peer Rating\' box will disappear from your user page.</p>'),
240 forge_get_config ('forge_name'),
241 util_make_url ("/account/"));
243 } else if ($me && !$me->usesRatings()) { ?>
246 <?php printf (_('You opted-out from peer rating system, otherwise you would have a chance to rate the user. Refer to <a href="%1$s">your account maintenance page</a> for more information.'),
247 util_make_url ("/account")); ?>
253 echo $HTML->boxBottom();
255 $HTML->footer(array());
259 // c-file-style: "bsd"