123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- <?php
- if (!defined('STATUSNET'))
- {
- exit(1);
- }
- class AtomUserNoticeFeed extends AtomNoticeFeed
- {
- protected $user;
-
- function __construct($user, $cur = null, $indent = true) {
- parent::__construct($cur, $indent);
- $this->user = $user;
- if (!empty($user)) {
- $profile = $user->getProfile();
- $ao = $profile->asActivityObject();
-
- array_push($ao->extra, $profile->profileInfo($this->scoped));
- $this->addAuthorRaw($ao->asString('author'));
- }
-
- $title = sprintf(_("%s timeline"), $user->nickname);
- $this->setTitle($title);
- $sitename = common_config('site', 'name');
- $subtitle = sprintf(
-
-
- _('Updates from %1$s on %2$s!'),
- $user->nickname, $sitename
- );
- $this->setSubtitle($subtitle);
- $this->setLogo($profile->avatarUrl(AVATAR_PROFILE_SIZE));
- $this->setUpdated('now');
- $this->addLink(
- common_local_url(
- 'showstream',
- array('nickname' => $user->nickname)
- )
- );
- $self = common_local_url('ApiTimelineUser',
- array('id' => $user->id,
- 'format' => 'atom'));
- $this->setId($self);
- $this->setSelfLink($self);
- $this->addLink(
- common_local_url('sup', null, null, $user->id),
- array(
- 'rel' => 'http://api.friendfeed.com/2008/03#sup',
- 'type' => 'application/json'
- )
- );
- }
- function getUser()
- {
- return $this->user;
- }
- function showSource()
- {
- return false;
- }
- function showAuthor()
- {
- return false;
- }
- }
|