Extension BlogThis: Added translation support
[vanilla-miry.git] / themes / account_profile.php
blob95493df20806dbb17b8b060c53f07d229989ce6c
1 <?php
2 // Note: This file is included from the library/Vanilla/Vanilla.Control.Account.php class.
4 echo '<div id="AccountProfile">';
6 if (ForceIncomingBool('Success',0)) echo '<div id="Success">'.$this->Context->GetDefinition('ChangesSaved').'</div>';
7 $this->Render_Warnings();
9 echo '<ul class="vcard">';
11 $this->CallDelegate('PreUsernameRender');
13 if ($this->User->DisplayIcon != '') {
14 echo '<li class="ProfileTitle WithIcon clearfix">
15 <div class="ProfileIcon" style="background-image:url(\''.$this->User->DisplayIcon.'\')">&nbsp;</div>';
16 } else {
17 echo '<li class="ProfileTitle clearfix">';
19 echo '<h2>'.$this->User->Name.'</h2>
20 <p>'.$this->User->Role.'</p>
21 </li>';
22 if ($this->User->RoleDescription != '') echo('<li class="Tagline">'.$this->User->RoleDescription.'</li>');
23 if ($this->User->Picture != "" && $this->User->Permission('PERMISSION_HTML_ALLOWED')) echo "<li class=\"Picture\" style=\"background-image: url('".$this->User->Picture."');\">&nbsp;</li>";
25 $this->CallDelegate('PostPictureRender');
27 if ($this->Context->Configuration['USE_REAL_NAMES'] && ($this->User->ShowName || $this->Context->Session->User->Permission('PERMISSION_EDIT_USERS'))) {
28 echo '<li>
29 <h3>'.$this->Context->GetDefinition('RealName').'</h3>
30 <p class="fn">'.ReturnNonEmpty($this->User->FullName).'</p>
31 </li>';
33 echo '<li>
34 <h3>'.$this->Context->GetDefinition('Email').'</h3>
35 <p class="email">'
36 .(($this->Context->Session->UserID > 0 && $this->User->UtilizeEmail) ?
37 GetEmail($this->User->Email) : $this->Context->GetDefinition('NA')).'</p>
38 </li>
39 <li>
40 <h3>'.$this->Context->GetDefinition('AccountCreated').'</h3>
41 <p>'.TimeDiff($this->Context, $this->User->DateFirstVisit, mktime()).'</p>
42 </li>
43 <li>
44 <h3>'.$this->Context->GetDefinition('LastActive').'</h3>
45 <p>'.TimeDiff($this->Context, $this->User->DateLastActive, mktime()).'</p>
46 </li>
47 <li>
48 <h3>'.$this->Context->GetDefinition('VisitCount').'</h3>
49 <p>'.$this->User->CountVisit.'</p>
50 </li>
51 <li>
52 <h3>'.$this->Context->GetDefinition('DiscussionsStarted').'</h3>
53 <p>'.$this->User->CountDiscussions.'</p>
54 </li>
55 <li>
56 <h3>'.$this->Context->GetDefinition('CommentsAdded').'</h3>
57 <p>'.$this->User->CountComments.'</p>
58 </li>';
60 $this->CallDelegate('PostBasicPropertiesRender');
62 if ($this->Context->Session->User->Permission('PERMISSION_IP_ADDRESSES_VISIBLE')) {
63 echo '<li>
64 <h3>'.$this->Context->GetDefinition('LastKnownIp').'</h3>
65 <p>'.$this->User->RemoteIp.'</p>
66 </li>';
69 if (count($this->User->Attributes) > 0) {
70 $AttributeCount = count($this->User->Attributes);
71 for ($i = 0; $i < $AttributeCount; $i++) {
72 $CssClass = (strpos($this->User->Attributes[$i]['Value'], 'http://') == 0 && strpos($this->User->Attributes[$i]['Value'], 'http://') !== false) ? 'url' : '';
73 echo '<li>
74 <h3>'.htmlspecialchars($this->User->Attributes[$i]['Label']).'</h3>
75 <p>'.FormatHyperlink(htmlspecialchars($this->User->Attributes[$i]['Value']), 1, '', $CssClass).'</p>
76 </li>';
80 $this->CallDelegate('PostAttributesRender');
82 echo '</ul>
83 </div>
84 <div id="AccountHistory">';
86 $this->CallDelegate('PostProfileRender');