Add Activity Streams feeds to export data
This commit is contained in:
parent
d2c886023c
commit
e5d8fd6857
|
@ -127,7 +127,16 @@ class ShowstreamAction extends ProfileAction
|
|||
$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.
|
||||
|
|
|
@ -49,6 +49,7 @@ class Feed
|
|||
const RSS2 = 2;
|
||||
const ATOM = 3;
|
||||
const FOAF = 4;
|
||||
const JSON = 5; // Activity Streams
|
||||
|
||||
var $type = null;
|
||||
var $url = null;
|
||||
|
@ -72,6 +73,8 @@ class Feed
|
|||
return 'application/atom+xml';
|
||||
case Feed::FOAF:
|
||||
return 'application/rdf+xml';
|
||||
case Feed::JSON:
|
||||
return 'application/json';
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
@ -92,6 +95,9 @@ class Feed
|
|||
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;
|
||||
}
|
||||
|
@ -103,6 +109,7 @@ class Feed
|
|||
case Feed::RSS1:
|
||||
case Feed::RSS2:
|
||||
case Feed::ATOM:
|
||||
case Feed::JSON:
|
||||
return 'alternate';
|
||||
case Feed::FOAF:
|
||||
return 'meta';
|
||||
|
|
|
@ -93,6 +93,9 @@ class FeedList extends Widget
|
|||
case Feed::FOAF:
|
||||
$classname = 'foaf';
|
||||
break;
|
||||
case Feed::JSON:
|
||||
$classname = 'json';
|
||||
break;
|
||||
}
|
||||
|
||||
$this->out->elementStart('li');
|
||||
|
|
|
@ -2009,6 +2009,13 @@ background-position:0 -64px;
|
|||
#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,
|
||||
|
|
BIN
theme/base/images/icons/activitystreams.png
Normal file
BIN
theme/base/images/icons/activitystreams.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 823 B |
Loading…
Reference in New Issue
Block a user