X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=lib%2Faccountprofileblock.php;h=59c27776018dac7c2bfddaf27e5557bf120bf0e0;hb=7c57aab44e3fad989b85872d416d0c525dbb9de8;hp=6a4021bf04577b024eeac23d7ee6cd3d892b10a4;hpb=865c1bc27838a1b7ee41ff513d30d2c8c6f4cd10;p=quix0rs-gnu-social.git diff --git a/lib/accountprofileblock.php b/lib/accountprofileblock.php index 6a4021bf04..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 * @@ -44,7 +46,6 @@ if (!defined('STATUSNET')) { * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0 * @link http://status.net/ */ - class AccountProfileBlock extends ProfileBlock { protected $profile = null; @@ -93,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))) { @@ -131,9 +148,9 @@ class AccountProfileBlock extends ProfileBlock $this->out->elementStart('li', 'entity_edit'); $this->out->element('a', array('href' => common_local_url('profilesettings'), // TRANS: Link title for link on user profile. - 'title' => _('Edit profile settings')), + 'title' => _('Edit profile settings.')), // TRANS: Link text for link on user profile. - _('Edit')); + _m('BUTTON','Edit')); $this->out->elementEnd('li'); } else { // someone else's page @@ -160,9 +177,9 @@ class AccountProfileBlock extends ProfileBlock $this->out->elementStart('li', 'entity_send-a-message'); $this->out->element('a', array('href' => common_local_url('newmessage', array('to' => $this->user->id)), // TRANS: Link title for link on user profile. - 'title' => _('Send a direct message to this user')), + 'title' => _('Send a direct message to this user.')), // TRANS: Link text for link on user profile. - _('Message')); + _m('BUTTON','Message')); $this->out->elementEnd('li'); // nudge @@ -288,6 +305,16 @@ class AccountProfileBlock extends ProfileBlock $this->out->element('a', array('href' => $url, 'class' => 'entity_remote_subscribe'), // TRANS: Link text for link that will subscribe to a remote profile. - _('Subscribe')); + _m('BUTTON','Subscribe')); } -} \ No newline at end of file + + 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'); + } +}