@@ -40,6 +40,16 @@ class AtomFormat extends FormatAbstract{
}
+ $entryCategories = '';
+ if(isset($item['categories'])) {
+ foreach($item['categories'] as $category) {
+ $entryCategories .= '<category term="'
+ . $this->xml_encode($category)
+ . '"/>'
+ . PHP_EOL;
+ }
+
$entries .= <<<EOD
<entry>
@@ -52,6 +62,7 @@ class AtomFormat extends FormatAbstract{
<updated>{$entryTimestamp}</updated>
<content type="html">{$entryContent}</content>
{$entryEnclosures}
+ {$entryCategories}
</entry>
EOD;
@@ -47,6 +47,20 @@ class HtmlFormat extends FormatAbstract {
$entryEnclosures .= '</div>';
+ $entryCategories = '<div class="categories"><p>Categories:</p>';
+ $entryCategories .= '<li class="category">'
+ . $this->sanitizeHtml($category)
+ . '</li>';
+ $entryCategories .= '</div>';
<section class="feeditem">
@@ -55,6 +69,7 @@ class HtmlFormat extends FormatAbstract {
{$entryAuthor}
{$entryContent}
</section>
@@ -51,6 +51,16 @@ Some media files might not be shown to you. Consider using the ATOM format inste
+ $entryCategories .= '<category>'
+ . $category . '</category>'
$items .= <<<EOD
<item>
@@ -61,6 +71,7 @@ Some media files might not be shown to you. Consider using the ATOM format inste
<description>{$itemContent}{$entryEnclosuresWarning}</description>
<author>{$itemAuthor}</author>
</item>
@@ -69,12 +69,14 @@ a.backlink, a.backlink:link, a.backlink:visited, a.itemtitle, a.itemtitle:link,
+section > div.content, section > div.categories,
section > div.content, section > div.attachments {
padding: 10px;
+section > div.categories > li.category,
section > div.attachments > li.enclosure {
list-style-type: circle;
@@ -114,4 +116,4 @@ img {
max-width: 100%;
-}
+}