X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FBlog%2Fblogentrylistitem.php;h=a89a562b77d003d9d3feaec831c2371ff08bd7c3;hb=7dcb27672fa3f234f1fdfab5024752614e805341;hp=374c4560284be4f6d9955a8084472dd9d864e299;hpb=25198a8d4cee5b2182f1ecb99192a4108a01afa4;p=quix0rs-gnu-social.git diff --git a/plugins/Blog/blogentrylistitem.php b/plugins/Blog/blogentrylistitem.php index 374c456028..a89a562b77 100644 --- a/plugins/Blog/blogentrylistitem.php +++ b/plugins/Blog/blogentrylistitem.php @@ -71,15 +71,31 @@ class BlogEntryListItem extends NoticeListItemAdapter $out->element('a', array('href' => $notice->bestUrl()), $entry->title); $out->elementEnd('h4'); - if (!empty($entry->summary)) { - $out->elementStart('div', 'blog-entry-summary'); - $out->raw($entry->summary); - $out->elementEnd('div'); - } else { - // XXX: hide content initially; click More... for full text. + // XXX: kind of a hack + + $actionName = $out->trimmed('action'); + + if ($actionName == 'shownotice' || + $actionName == 'showblogentry' || + $actionName == 'conversation') { + $out->elementStart('div', 'blog-entry-content'); $out->raw($entry->content); $out->elementEnd('div'); + + } else { + + if (!empty($entry->summary)) { + $out->elementStart('div', 'blog-entry-summary'); + $out->raw($entry->summary); + $out->elementEnd('div'); + } + + $url = ($entry->url) ? $entry->url : $notice->bestUrl(); + $out->element('a', + array('href' => $url, + 'class' => 'blog-entry-link'), + _('More...')); } } }