diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2012-08-16 00:33:52 +0200 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2012-08-16 00:33:52 +0200 |
commit | f99e9475a6e9537acbc7be716ca5d8a2b3278f41 (patch) | |
tree | be737f8201ab4bc1ed7d7b30b0e2f11a8e457ddd | |
parent | 4c866d889fa214f9186206d33f98f008779ab137 (diff) |
show author if the item has one
-rw-r--r-- | templates/part.items.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/templates/part.items.php b/templates/part.items.php index 399274e30..da4855dc4 100644 --- a/templates/part.items.php +++ b/templates/part.items.php @@ -42,7 +42,12 @@ foreach($items as $item) { echo '<h1 class="item_title"><a target="_blank" href="' . $item->getUrl() . '">' . $item->getTitle() . '</a></h1>'; - echo '<h2 class="item_author">' . $l->t('from') . ' ' . parse_url($item->getUrl(), PHP_URL_HOST) . '</h2>'; + if(trim($item->getAuthor()) == ''){ + $from = $l->t('from') . ' ' . parse_url($item->getUrl(), PHP_URL_HOST); + } else { + $from = $l->t('from') . ' ' . $item->getAuthor(); + } + echo '<h2 class="item_author">' . $from . '</h2>'; echo '<div class="body">' . $item->getBody() . '</div>'; |