$this->user->nickname, $this->tag)));
}
- return array(new Feed(Feed::RSS1,
+ return array(new Feed(Feed::JSON,
+ common_local_url('ApiTimelineUser',
+ array(
+ 'id' => $this->user->id,
+ 'format' => 'as')),
+ // TRANS: Title for link to notice feed.
+ // TRANS: %s is a user nickname.
+ sprintf(_('Notice feed for %s (Activity Streams JSON)'),
+ $this->user->nickname)),
+ new Feed(Feed::RSS1,
common_local_url('userrss',
array('nickname' => $this->user->nickname)),
// TRANS: Title for link to notice feed.
const RSS2 = 2;
const ATOM = 3;
const FOAF = 4;
+ const JSON = 5; // Activity Streams
var $type = null;
var $url = null;
return 'application/atom+xml';
case Feed::FOAF:
return 'application/rdf+xml';
+ case Feed::JSON:
+ return 'application/json';
default:
return null;
}
case Feed::FOAF:
// TRANS: Feed type name. FOAF stands for Friend of a Friend.
return _('FOAF');
+ case Feed::JSON:
+ // TRANS: Feed type name. See http://activitystrea.ms/
+ return _('Activity Streams');
default:
return null;
}
case Feed::RSS1:
case Feed::RSS2:
case Feed::ATOM:
+ case Feed::JSON:
return 'alternate';
case Feed::FOAF:
return 'meta';
case Feed::FOAF:
$classname = 'foaf';
break;
+ case Feed::JSON:
+ $classname = 'json';
+ break;
}
$this->out->elementStart('li');
#export_data li a.foaf {
background-position:0 1px;
}
+
+#export_data li a.json {
+background-image:url(../images/icons/activitystreams.png);
+background-repeat:no-repeat;
+background-color:transparent;
+}
+
.form_group_leave input.submit,
.form_user_unsubscribe input.submit,
.form_user_remove_peopletag input.submit,