当前位置: 首页>>代码示例>>PHP>>正文


PHP User_group::defaultLogo方法代码示例

本文整理汇总了PHP中User_group::defaultLogo方法的典型用法代码示例。如果您正苦于以下问题:PHP User_group::defaultLogo方法的具体用法?PHP User_group::defaultLogo怎么用?PHP User_group::defaultLogo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在User_group的用法示例。


在下文中一共展示了User_group::defaultLogo方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * Constructor
  *
  * @param Group   $group   the group for the feed
  * @param User    $cur     the current authenticated user, if any
  * @param boolean $indent  flag to turn indenting on or off
  *
  * @return void
  */
 function __construct($group, $cur = null, $indent = true)
 {
     parent::__construct($cur, $indent);
     $this->group = $group;
     // TRANS: Title in atom group notice feed. %s is a group name.
     $title = sprintf(_("%s timeline"), $group->nickname);
     $this->setTitle($title);
     $sitename = common_config('site', 'name');
     $subtitle = sprintf(_('Updates from %1$s on %2$s!'), $group->nickname, $sitename);
     $this->setSubtitle($subtitle);
     $avatar = $group->homepage_logo;
     $logo = $avatar ? $avatar : User_group::defaultLogo(AVATAR_PROFILE_SIZE);
     $this->setLogo($logo);
     $this->setUpdated('now');
     $self = common_local_url('ApiTimelineGroup', array('id' => $group->id, 'format' => 'atom'));
     $this->setId($self);
     $this->setSelfLink($self);
     // For groups, we generate an author _AND_ an <activity:subject>
     // Versions of StatusNet under 0.9.7 treat <author> as a person
     // XXX: remove this workaround in future versions
     $ao = ActivityObject::fromGroup($group);
     $this->addAuthorRaw($ao->asString('author'));
     $depMsg = 'Deprecation warning: activity:subject is present ' . 'only for backward compatibility. It will be ' . 'removed in the next version of StatusNet.';
     $this->addAuthorRaw("<!--{$depMsg}-->\n" . $ao->asString('activity:subject'));
     $this->addLink($group->homeUrl());
 }
开发者ID:microcosmx,项目名称:experiments,代码行数:35,代码来源:atomgroupnoticefeed.php

示例2: showGroup

 function showGroup()
 {
     $this->out->elementStart('li', array('class' => 'profile h-card', 'id' => 'group-' . $this->group->id));
     $user = common_current_user();
     $this->out->elementStart('div', 'entity_profile');
     $logo = $this->group->stream_logo ?: User_group::defaultLogo(AVATAR_STREAM_SIZE);
     $this->out->elementStart('a', array('href' => $this->group->homeUrl(), 'class' => 'u-url p-nickname', 'rel' => 'contact group'));
     $this->out->element('img', array('src' => $logo, 'class' => 'avatar u-photo', 'width' => AVATAR_STREAM_SIZE, 'height' => AVATAR_STREAM_SIZE, 'alt' => $this->group->getBestName()));
     $this->out->text($this->group->getNickname());
     $this->out->elementEnd('a');
     if ($this->group->fullname) {
         $this->out->text(' ');
         $this->out->elementStart('span', 'p-name');
         $this->out->raw($this->highlight($this->group->fullname));
         $this->out->elementEnd('span');
     }
     if ($this->group->location) {
         $this->out->text(' ');
         $this->out->elementStart('span', 'label');
         $this->out->raw($this->highlight($this->group->location));
         $this->out->elementEnd('span');
     }
     if ($this->group->homepage) {
         $this->out->text(' ');
         $this->out->elementStart('a', array('href' => $this->group->homepage, 'class' => 'u-url'));
         $this->out->raw($this->highlight($this->group->homepage));
         $this->out->elementEnd('a');
     }
     if ($this->group->description) {
         $this->out->elementStart('p', 'note');
         $this->out->raw($this->highlight($this->group->description));
         $this->out->elementEnd('p');
     }
     // If we're on a list with an owner (subscriptions or subscribers)...
     if (!empty($user) && !empty($this->owner) && $user->id == $this->owner->id) {
         $this->showOwnerControls();
     }
     $this->out->elementEnd('div');
     if ($user) {
         $this->out->elementStart('div', 'entity_actions');
         $this->out->elementStart('ul');
         $this->out->elementStart('li', 'entity_subscribe');
         // XXX: special-case for user looking at own
         // subscriptions page
         if ($user->isMember($this->group)) {
             $lf = new LeaveForm($this->out, $this->group);
             $lf->show();
         } else {
             if (!Group_block::isBlocked($this->group, $user->getProfile())) {
                 $jf = new JoinForm($this->out, $this->group);
                 $jf->show();
             }
         }
         $this->out->elementEnd('li');
         $this->out->elementEnd('ul');
         $this->out->elementEnd('div');
     }
     $this->out->elementEnd('li');
 }
开发者ID:bashrc,项目名称:gnusocial-debian,代码行数:59,代码来源:grouplist.php

示例3: showGroup

 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');
 }
开发者ID:bashrc,项目名称:gnusocial-debian,代码行数:9,代码来源:groupminilist.php

示例4: showGroup

 function showGroup()
 {
     $this->out->elementStart('li', 'vcard');
     $this->out->elementStart('a', array('title' => $this->group->fullname ? $this->group->fullname : $this->group->nickname, 'href' => $this->group->homeUrl(), 'rel' => 'contact group', 'class' => 'url'));
     $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->fullname ? $this->group->fullname : $this->group->nickname));
     $this->out->element('span', 'fn org nickname', $this->group->nickname);
     $this->out->elementEnd('a');
     $this->out->elementEnd('li');
 }
开发者ID:Grasia,项目名称:bolotweet,代码行数:10,代码来源:groupminilist.php

示例5: fromFilename

 static function fromFilename($filename, $size)
 {
     $alink = new AvatarLink();
     $alink->url = $filename;
     $alink->height = $size;
     $alink->width = $size;
     if (!empty($filename)) {
         $alink->type = self::mediatype($filename);
     } else {
         $alink->url = User_group::defaultLogo($size);
         $alink->type = 'image/png';
     }
     return $alink;
 }
开发者ID:microcosmx,项目名称:experiments,代码行数:14,代码来源:avatarlink.php

示例6: showGroup

 function showGroup($group)
 {
     $this->out->elementStart('tr');
     $this->out->elementStart('td');
     $this->out->elementStart('a', array('title' => $group->getBestName(), 'href' => $group->homeUrl(), 'rel' => 'contact group', 'class' => 'h-card org nickname'));
     $logo = $group->stream_logo ?: User_group::defaultLogo(AVATAR_STREAM_SIZE);
     $this->out->element('img', array('src' => $logo, 'width' => AVATAR_MINI_SIZE, 'height' => AVATAR_MINI_SIZE, 'class' => 'avatar u-photo', 'alt' => $group->getBestName()));
     $this->out->text($group->nickname);
     $this->out->elementEnd('a');
     $this->out->elementEnd('td');
     if ($group->value) {
         $this->out->element('td', 'value', $group->value);
     }
     $this->out->elementEnd('tr');
 }
开发者ID:bashrc,项目名称:gnusocial-debian,代码行数:15,代码来源:groupsection.php

示例7: showGroup

 function showGroup($group)
 {
     $this->out->elementStart('tr');
     $this->out->elementStart('td');
     $this->out->elementStart('span', 'vcard');
     $this->out->elementStart('a', array('title' => $group->fullname ? $group->fullname : $group->nickname, 'href' => $group->homeUrl(), 'rel' => 'contact group', 'class' => 'url'));
     $logo = $group->stream_logo ? $group->stream_logo : User_group::defaultLogo(AVATAR_STREAM_SIZE);
     $this->out->element('img', array('src' => $logo, 'width' => AVATAR_MINI_SIZE, 'height' => AVATAR_MINI_SIZE, 'class' => 'avatar photo', 'alt' => $group->fullname ? $group->fullname : $group->nickname));
     $this->out->element('span', 'fn org nickname', $group->nickname);
     $this->out->elementEnd('a');
     $this->out->elementEnd('span');
     $this->out->elementEnd('td');
     if ($group->value) {
         $this->out->element('td', 'value', $group->value);
     }
     $this->out->elementEnd('tr');
 }
开发者ID:Br3nda,项目名称:laconica,代码行数:17,代码来源:groupsection.php

示例8: __construct

 /**
  * Constructor
  *
  * @param Group   $group   the group for the feed
  * @param boolean $indent  flag to turn indenting on or off
  *
  * @return void
  */
 function __construct($group, $indent = true)
 {
     parent::__construct($indent);
     $this->group = $group;
     $title = sprintf(_("%s timeline"), $group->nickname);
     $this->setTitle($title);
     $sitename = common_config('site', 'name');
     $subtitle = sprintf(_('Updates from %1$s on %2$s!'), $group->nickname, $sitename);
     $this->setSubtitle($subtitle);
     $avatar = $group->homepage_logo;
     $logo = $avatar ? $avatar : User_group::defaultLogo(AVATAR_PROFILE_SIZE);
     $this->setLogo($logo);
     $this->setUpdated('now');
     $self = common_local_url('ApiTimelineGroup', array('id' => $group->id, 'format' => 'atom'));
     $this->setId($self);
     $this->setSelfLink($self);
     $this->addAuthorRaw($group->asAtomAuthor());
     $this->setActivitySubject($group->asActivitySubject());
     $this->addLink($group->homeUrl());
 }
开发者ID:himmelex,项目名称:NTW,代码行数:28,代码来源:atomgroupnoticefeed.php

示例9: __construct

 /**
  * Constructor
  *
  * @param Group   $group   the group for the feed
  * @param User    $cur     the current authenticated user, if any
  * @param boolean $indent  flag to turn indenting on or off
  *
  * @return void
  */
 function __construct($group, $cur = null, $indent = true)
 {
     parent::__construct($cur, $indent);
     $this->group = $group;
     // TRANS: Title in atom group notice feed. %s is a group name.
     $title = sprintf(_("%s timeline"), $group->nickname);
     $this->setTitle($title);
     $sitename = common_config('site', 'name');
     $subtitle = sprintf(_('Updates from %1$s on %2$s!'), $group->nickname, $sitename);
     $this->setSubtitle($subtitle);
     $avatar = $group->homepage_logo;
     $logo = $avatar ? $avatar : User_group::defaultLogo(AVATAR_PROFILE_SIZE);
     $this->setLogo($logo);
     $this->setUpdated('now');
     $self = common_local_url('ApiTimelineGroup', array('id' => $group->id, 'format' => 'atom'));
     $this->setId($self);
     $this->setSelfLink($self);
     $ao = ActivityObject::fromGroup($group);
     $this->addAuthorRaw($ao->asString('author'));
     $this->addLink($group->homeUrl());
 }
开发者ID:bashrc,项目名称:gnusocial-debian,代码行数:30,代码来源:atomgroupnoticefeed.php

示例10: getAvatar

 function getAvatar()
 {
     return empty($this->homepage_logo) ? User_group::defaultLogo(AVATAR_PROFILE_SIZE) : $this->homepage_logo;
 }
开发者ID:stevertiqo,项目名称:StatusNet,代码行数:4,代码来源:User_group.php

示例11: handle

 protected function handle()
 {
     parent::handle();
     $results = array();
     foreach ($this->profiles as $profile) {
         $avatarUrl = $profile->avatarUrl(AVATAR_MINI_SIZE);
         $results[] = array('value' => '@' . $profile->nickname, 'nickname' => $profile->nickname, 'label' => $profile->getFancyName(), 'avatar' => $avatarUrl, 'type' => 'user');
     }
     foreach ($this->groups as $group) {
         // sigh.... encapsulate this upstream!
         if ($group->mini_logo) {
             $avatarUrl = $group->mini_logo;
         } else {
             $avatarUrl = User_group::defaultLogo(AVATAR_MINI_SIZE);
         }
         $results[] = array('value' => '!' . $group->nickname, 'nickname' => $group->nickname, 'label' => $group->getFancyName(), 'avatar' => $avatarUrl, 'type' => 'group');
     }
     print json_encode($results);
 }
开发者ID:phpsource,项目名称:gnu-social,代码行数:19,代码来源:autocomplete.php

示例12: handle

 function handle($args)
 {
     parent::handle($args);
     $results = array();
     foreach ($this->users as $user) {
         $profile = $user->getProfile();
         $avatar = $profile->getAvatar(AVATAR_MINI_SIZE);
         // sigh.... encapsulate this upstream!
         if ($avatar) {
             $avatar = $avatar->displayUrl();
         } else {
             $avatar = Avatar::defaultImage(AVATAR_MINI_SIZE);
         }
         $results[] = array('nickname' => $user->nickname, 'fullname' => $profile->fullname, 'avatar' => $avatar, 'type' => 'user');
     }
     foreach ($this->groups as $group) {
         // sigh.... encapsulate this upstream!
         if ($group->mini_logo) {
             $avatar = $group->mini_logo;
         } else {
             $avatar = User_group::defaultLogo(AVATAR_MINI_SIZE);
         }
         $results[] = array('nickname' => $group->nickname, 'fullname' => $group->fullname, 'avatar' => $avatar, 'type' => 'group');
     }
     foreach ($results as $result) {
         print json_encode($result) . "\n";
     }
 }
开发者ID:microcosmx,项目名称:experiments,代码行数:28,代码来源:autocomplete.php

示例13: showAvatar

 function showAvatar()
 {
     $logo = $this->profile->stream_logo ? $this->profile->stream_logo : User_group::defaultLogo(AVATAR_STREAM_SIZE);
     $this->out->elementStart('a', array('href' => $this->profile->homeUrl(), 'class' => 'url entry-title', 'rel' => 'contact group'));
     $this->out->element('img', array('src' => $logo, 'class' => 'photo avatar', 'width' => AVATAR_STREAM_SIZE, 'height' => AVATAR_STREAM_SIZE, 'alt' => $this->profile->fullname ? $this->profile->fullname : $this->profile->nickname));
     $this->out->text(' ');
     $hasFN = $this->profile->fullname ? 'nickname' : 'fn org nickname';
     $this->out->elementStart('span', $hasFN);
     $this->out->raw($this->highlight($this->profile->nickname));
     $this->out->elementEnd('span');
     $this->out->elementEnd('a');
 }
开发者ID:Grasia,项目名称:bolotweet,代码行数:12,代码来源:sortablegrouplist.php

示例14: handle

 protected function handle()
 {
     parent::handle();
     $results = array();
     foreach ($this->profiles as $profile) {
         $avatarUrl = $profile->avatarUrl(AVATAR_MINI_SIZE);
         $acct = $profile->getAcctUri();
         $identifier = explode(':', $profile->getAcctUri(), 2)[1];
         $results[] = array('value' => '@' . $identifier, 'nickname' => $profile->getNickname(), 'acct_uri' => $acct, 'label' => "{$identifier} (" . $profile->getFullname() . ")", 'avatar' => $avatarUrl, 'type' => 'user');
     }
     foreach ($this->groups as $group) {
         $profile = $group->getProfile();
         // sigh.... encapsulate this upstream!
         if ($group->mini_logo) {
             $avatarUrl = $group->mini_logo;
         } else {
             $avatarUrl = User_group::defaultLogo(AVATAR_MINI_SIZE);
         }
         $acct = $profile->getAcctUri();
         $identifier = explode(':', $profile->getAcctUri(), 2)[1];
         $results[] = array('value' => '!' . $group->getNickname(), 'nickname' => $group->getNickname(), 'acct_uri' => $acct, 'label' => "{$identifier} (" . $group->getFullname() . ")", 'avatar' => $avatarUrl, 'type' => 'group');
     }
     print json_encode($results);
 }
开发者ID:bashrc,项目名称:gnusocial-debian,代码行数:24,代码来源:autocomplete.php

示例15: showAvatar

 function showAvatar(Profile $profile, $size = null)
 {
     $logo = $profile->getGroup()->stream_logo ?: User_group::defaultLogo($size ?: $this->avatarSize());
     $this->out->element('img', array('src' => $logo, 'class' => 'avatar u-photo', 'width' => AVATAR_STREAM_SIZE, 'height' => AVATAR_STREAM_SIZE, 'alt' => $profile->getBestName()));
 }
开发者ID:bashrc,项目名称:gnusocial-debian,代码行数:5,代码来源:sortablegrouplist.php


注:本文中的User_group::defaultLogo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。