X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Faccountprofileblock.php;h=59c27776018dac7c2bfddaf27e5557bf120bf0e0;hb=650af0a27102e5e9067850c88e5b8a446b44f045;hp=1c3a8dc536267e757552fae89d6b9eb14d795937;hpb=9f1603462dce7a24d432698c4f46d7dcf1bf7c4f;p=quix0rs-gnu-social.git diff --git a/lib/accountprofileblock.php b/lib/accountprofileblock.php index 1c3a8dc536..59c2777601 100644 --- a/lib/accountprofileblock.php +++ b/lib/accountprofileblock.php @@ -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'); + } }