]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/accountprofileblock.php
Fix i18n issues
[quix0rs-gnu-social.git] / lib / accountprofileblock.php
index 1c3a8dc536267e757552fae89d6b9eb14d795937..59c27776018dac7c2bfddaf27e5557bf120bf0e0 100644 (file)
@@ -34,6 +34,8 @@ if (!defined('STATUSNET')) {
     exit(1);
 }
 
+require_once INSTALLDIR.'/lib/peopletags.php';
+
 /**
  * Profile block to show for an account
  *
@@ -92,6 +94,22 @@ class AccountProfileBlock extends ProfileBlock
         return $this->profile->bio;
     }
 
+    function showTags()
+    {
+        $cur = common_current_user();
+
+        $self_tags = new SelftagsWidget($this->out, $this->profile, $this->profile);
+        $self_tags->show();
+
+        if ($cur) {
+            // don't show self-tags again
+            if ($cur->id != $this->profile->id && $cur->getProfile()->canTag($this->profile)) {
+                $tags = new PeopletagsWidget($this->out, $cur, $this->profile);
+                $tags->show();
+            }
+        }
+    }
+
     function showActions()
     {
         if (Event::handle('StartProfilePageActionsSection', array($this->out, $this->profile))) {
@@ -289,4 +307,14 @@ class AccountProfileBlock extends ProfileBlock
                        // TRANS: Link text for link that will subscribe to a remote profile.
                        _m('BUTTON','Subscribe'));
     }
+
+    function show()
+    {
+        $this->out->elementStart('div', 'profile_block account_profile_block section');
+        if (Event::handle('StartShowAccountProfileBlock', array($this->out, $this->profile))) {
+            parent::show();
+            Event::handle('EndShowAccountProfileBlock', array($this->out, $this->profile));
+        }
+        $this->out->elementEnd('div');
+    }
 }