Fixed issue 71, add atom feeds.
The basic building block is here with the feed of the timeline, it is rather easy to add the feed other elements based on this work. This will require iterations and polishing.
This commit is contained in:
@@ -198,4 +198,31 @@ class IDF_WikiPage extends Pluf_Model
|
||||
<div class="helptext right">'.sprintf(__('Creation of <a href="%s">page %s</a>'), $url, Pluf_esc($this->title)).', '.__('by').' '.Pluf_esc($submitter).'</div></td></tr>';
|
||||
return Pluf_Template::markSafe($out);
|
||||
}
|
||||
|
||||
public function feedFragment($request)
|
||||
{
|
||||
$base = '<entry>
|
||||
<title>%%title%%</title>
|
||||
<link href="%%url%%"/>
|
||||
<id>%%url%%</id>
|
||||
<updated>%%date%%</updated>
|
||||
<content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">
|
||||
%%content%%
|
||||
</div></content>
|
||||
</entry>';
|
||||
$url = Pluf_HTTP_URL_urlForView('IDF_Views_Wiki::view',
|
||||
array($request->project->shortname,
|
||||
$this->title));
|
||||
$title = sprintf(__('%s: Documentation page %s added - %s'),
|
||||
Pluf_esc($request->project->name),
|
||||
Pluf_esc($this->title), Pluf_esc($this->summary));
|
||||
$content = Pluf_esc($this->summary);
|
||||
$date = Pluf_Date::gmDateToGmString($this->creation_dtime);
|
||||
return Pluf_Translation::sprintf($base,
|
||||
array('url' => $url,
|
||||
'title' => $title,
|
||||
'content' => $content,
|
||||
'date' => $date));
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user