1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- <?php
- if (!defined('STATUSNET') && !defined('LACONICA')) {
- exit(1);
- }
- require_once INSTALLDIR.'/lib/grouplist.php';
- class GroupMiniList extends GroupList
- {
- function show()
- {
- $this->out->elementStart('ul', 'entities groups xoxo');
- $cnt = 0;
- while ($this->group->fetch()) {
- $cnt++;
- if($cnt > GROUPS_PER_MINILIST) {
- break;
- }
- $this->showGroup();
- }
- $this->out->elementEnd('ul');
- return $cnt;
- }
- function showGroup()
- {
- $this->out->elementStart('li', 'h-card');
- $this->out->elementStart('a', array('title' => $this->group->getBestName(),
- 'href' => $this->group->homeUrl(),
- 'rel' => 'contact group',
- 'class' => 'p-name u-url org'));
- $logo = ($this->group->mini_logo) ?
- $this->group->mini_logo : User_group::defaultLogo(AVATAR_MINI_SIZE);
- $this->out->element('img', array('src' => $logo,
- 'width' => AVATAR_MINI_SIZE,
- 'height' => AVATAR_MINI_SIZE,
- 'class' => 'avatar photo',
- 'alt' => $this->group->getBestName()));
- $this->out->elementEnd('a');
- $this->out->elementEnd('li');
- }
- }
|