add cc:license to RSS streams
darcs-hash:20080608201917-84dde-ba5c877c01c0200f379c4433799b1f752a9817df.gz
This commit is contained in:
parent
daf5b82183
commit
53ae2cc3f9
@ -76,6 +76,7 @@ class Rss10Action extends Action {
|
|||||||
common_element('title', NULL, $channel['title']);
|
common_element('title', NULL, $channel['title']);
|
||||||
common_element('link', NULL, $channel['link']);
|
common_element('link', NULL, $channel['link']);
|
||||||
common_element('description', NULL, $channel['description']);
|
common_element('description', NULL, $channel['description']);
|
||||||
|
common_element('cc:licence', NULL, $config['license']['url']);
|
||||||
|
|
||||||
if ($image) {
|
if ($image) {
|
||||||
common_element('image', array('rdf:resource' => $image));
|
common_element('image', array('rdf:resource' => $image));
|
||||||
@ -107,12 +108,14 @@ class Rss10Action extends Action {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function show_item($notice) {
|
function show_item($notice) {
|
||||||
|
global $config;
|
||||||
$nurl = common_local_url('shownotice', array('notice' => $notice->id));
|
$nurl = common_local_url('shownotice', array('notice' => $notice->id));
|
||||||
common_element_start('item', array('rdf:about' => $notice->uri));
|
common_element_start('item', array('rdf:about' => $notice->uri));
|
||||||
common_element('title', NULL, $notice->created);
|
common_element('title', NULL, $notice->created);
|
||||||
common_element('link', NULL, $nurl);
|
common_element('link', NULL, $nurl);
|
||||||
common_element('description', NULL, $notice->content);
|
common_element('description', NULL, $notice->content);
|
||||||
common_element('dc:date', NULL, common_date_w3dtf($notice->created));
|
common_element('dc:date', NULL, common_date_w3dtf($notice->created));
|
||||||
|
common_element('cc:licence', NULL, $config['license']['url']);
|
||||||
common_element_end('item');
|
common_element_end('item');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -124,6 +127,8 @@ class Rss10Action extends Action {
|
|||||||
'http://www.w3.org/1999/02/22-rdf-syntax-ns#',
|
'http://www.w3.org/1999/02/22-rdf-syntax-ns#',
|
||||||
'xmlns:dc' =>
|
'xmlns:dc' =>
|
||||||
'http://purl.org/dc/elements/1.1/',
|
'http://purl.org/dc/elements/1.1/',
|
||||||
|
'xmlns:cc' =>
|
||||||
|
'http://web.resource.org/cc/',
|
||||||
'xmlns' => 'http://purl.org/rss/1.0/'));
|
'xmlns' => 'http://purl.org/rss/1.0/'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user