}
require_once INSTALLDIR.'/lib/widget.php';
+require_once INSTALLDIR.'/lib/peopletags.php';
/**
* Widget to show a list of profiles
$this->showBio();
Event::handle('EndProfileListItemBio', array($this));
}
+ if (Event::handle('StartProfileListItemTags', array($this))) {
+ $this->showTags();
+ Event::handle('EndProfileListItemTags', array($this));
+ }
Event::handle('EndProfileListItemProfileElements', array($this));
}
$this->endProfile();
}
}
+ function showTags()
+ {
+ $user = common_current_user();
+ if (!empty($user)) {
+ if ($user->id == $this->profile->id) {
+ $tags = new SelftagsWidget($this->out, $user, $this->profile);
+ $tags->show();
+ } else if ($user->getProfile()->canTag($this->profile)) {
+ $tags = new PeopletagsWidget($this->out, $user, $this->profile);
+ $tags->show();
+ }
+ }
+ }
+
function endProfile()
{
$this->out->elementEnd('div');