コード例 #1
0
ファイル: showstream.php プロジェクト: Br3nda/laconica
 function showGroups()
 {
     $groups = $this->user->getGroups(0, GROUPS_PER_MINILIST + 1);
     $this->elementStart('div', array('id' => 'entity_groups', 'class' => 'section'));
     $this->element('h2', null, _('Groups'));
     if ($groups) {
         $gml = new GroupMiniList($groups, $this->user, $this);
         $cnt = $gml->show();
         if ($cnt == 0) {
             $this->element('p', null, _('(None)'));
         }
     }
     if ($cnt > GROUPS_PER_MINILIST) {
         $this->elementStart('p');
         $this->element('a', array('href' => common_local_url('usergroups', array('nickname' => $this->profile->nickname)), 'class' => 'more'), _('All groups'));
         $this->elementEnd('p');
     }
     $this->elementEnd('div');
 }
コード例 #2
0
ファイル: profileaction.php プロジェクト: Grasia/bolotweet
 function showGroups()
 {
     $groups = $this->profile->getGroups(0, GROUPS_PER_MINILIST + 1);
     $this->elementStart('div', array('id' => 'entity_groups', 'class' => 'section'));
     if (Event::handle('StartShowGroupsMiniList', array($this))) {
         $this->elementStart('h2');
         // TRANS: H2 text for user group membership statistics.
         $this->statsSectionLink('usergroups', _('Groups'));
         $this->text(' ');
         $this->text($this->profile->getGroups(0, null)->N);
         $this->elementEnd('h2');
         if ($groups) {
             $gml = new GroupMiniList($groups, $this->profile, $this);
             $cnt = $gml->show();
             if ($cnt == 0) {
                 // TRANS: Text for user user group membership statistics if user is not a member of any group.
                 $this->element('p', null, _('(None)'));
             }
         }
         Event::handle('EndShowGroupsMiniList', array($this));
     }
     $this->elementEnd('div');
 }