aboutsummaryrefslogtreecommitdiff
path: root/app/views/index
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/index')
-rw-r--r--app/views/index/global.phtml5
-rw-r--r--app/views/index/normal.phtml24
-rw-r--r--app/views/index/reader.phtml21
-rwxr-xr-xapp/views/index/rss.phtml18
4 files changed, 56 insertions, 12 deletions
diff --git a/app/views/index/global.phtml b/app/views/index/global.phtml
index 2f25b6dc2..3566abe7e 100644
--- a/app/views/index/global.phtml
+++ b/app/views/index/global.phtml
@@ -1,6 +1,11 @@
<?php
$this->partial('nav_menu');
+ flush();
+ if (isset($this->callbackBeforeEntries)) {
+ call_user_func($this->callbackBeforeEntries, $this);
+ }
+
$class = '';
if (FreshRSS_Context::$user_conf->hide_read_feeds &&
FreshRSS_Context::isStateEnabled(FreshRSS_Entry::STATE_NOT_READ) &&
diff --git a/app/views/index/normal.phtml b/app/views/index/normal.phtml
index c7cab2d3f..d5ae8e2f9 100644
--- a/app/views/index/normal.phtml
+++ b/app/views/index/normal.phtml
@@ -3,6 +3,11 @@
$this->partial('aside_feed');
$this->partial('nav_menu');
+flush();
+if (isset($this->callbackBeforeEntries)) {
+ call_user_func($this->callbackBeforeEntries, $this);
+}
+
if (!empty($this->entries)) {
$display_today = true;
$display_yesterday = true;
@@ -20,7 +25,7 @@ if (!empty($this->entries)) {
</div><?php
foreach ($this->entries as $item) {
$this->entry = Minz_ExtensionManager::callHook('entry_before_display', $item);
- if (is_null($this->entry)) {
+ if ($this->entry == null) {
continue;
}
@@ -67,10 +72,19 @@ if (!empty($this->entries)) {
?><div class="flux_content">
<div class="content <?php echo $content_width; ?>">
<h1 class="title"><a target="_blank" rel="noreferrer" class="go_website" href="<?php echo $this->entry->link(); ?>"><?php echo $this->entry->title(); ?></a></h1>
- <?php
- $author = $this->entry->author();
- echo $author != '' ? '<div class="author">' . _t('gen.short.by_author', $author) . '</div>' : '',
- $lazyload && $hidePosts ? lazyimg($this->entry->content()) : $this->entry->content();
+ <div class="author"><?php
+ $authors = $this->entry->authors();
+ if (is_array($authors)):
+ $first = true;
+ foreach ($authors as $author):
+ echo $first ? _t('gen.short.by_author') . ' ' : '· ';
+ $first = false;
+ ?>
+<em><a href="<?php echo _url('index', 'index', 'search', 'author:' . str_replace(' ', '+', htmlspecialchars_decode($author, ENT_QUOTES))); ?>"><?php echo $author; ?></a></em>
+ <?php endforeach; ?>
+ </div><?php
+ endif;
+ echo $lazyload && $hidePosts ? lazyimg($this->entry->content()) : $this->entry->content();
?>
</div><?php
diff --git a/app/views/index/reader.phtml b/app/views/index/reader.phtml
index eb6613b28..c15b936ee 100644
--- a/app/views/index/reader.phtml
+++ b/app/views/index/reader.phtml
@@ -1,6 +1,11 @@
<?php
$this->partial('nav_menu');
+flush();
+if (isset($this->callbackBeforeEntries)) {
+ call_user_func($this->callbackBeforeEntries, $this);
+}
+
if (!empty($this->entries)) {
$lazyload = FreshRSS_Context::$user_conf->lazyload;
$content_width = FreshRSS_Context::$user_conf->content_width;
@@ -39,9 +44,19 @@ if (!empty($this->entries)) {
<h1 class="title"><a target="_blank" rel="noreferrer" class="go_website" href="<?php echo $item->link(); ?>"><?php echo $item->title(); ?></a></h1>
<div class="author"><?php
- $author = $item->author();
- echo $author != '' ? _t('gen.short.by_author', $author) . ' — ' : '',
- $item->date();
+ $authors = $item->authors();
+ if (is_array($authors)):
+ $first = true;
+ foreach ($authors as $author):
+ echo $first ? _t('gen.short.by_author') . ' ' : '· ';
+ $first = false;
+ ?>
+<em><a href="<?php echo _url('index', 'index', 'search', 'author:' . str_replace(' ', '+', htmlspecialchars_decode($author, ENT_QUOTES))); ?>"><?php echo $author; ?></a></em>
+ <?php
+ endforeach;
+ echo ' — ';
+ endif;
+ echo $item->date();
?></div>
<?php echo $item->content(); ?>
diff --git a/app/views/index/rss.phtml b/app/views/index/rss.phtml
index 86074517c..104e03d15 100755
--- a/app/views/index/rss.phtml
+++ b/app/views/index/rss.phtml
@@ -13,10 +13,20 @@ foreach ($this->entries as $item) {
<item>
<title><?php echo $item->title(); ?></title>
<link><?php echo $item->link(); ?></link>
- <?php $author = $item->author(); ?>
- <?php if ($author != '') { ?>
- <dc:creator><?php echo $author; ?></dc:creator>
- <?php } ?>
+ <?php
+ $authors = $item->authors();
+ if (is_array($authors)) {
+ foreach ($authors as $author) {
+ echo "\t\t\t" , '<author>', $author, '</author>', "\n";
+ }
+ }
+ $categories = $item->tags();
+ if (is_array($categories)) {
+ foreach ($categories as $category) {
+ echo "\t\t\t" , '<category>', $category, '</category>', "\n";
+ }
+ }
+ ?>
<description><![CDATA[<?php
echo $item->content();
?>]]></description>