- $this->out->raw($notice->rendered);
-
- $notice_link_cfg = common_config('site', 'notice_link');
- if ('direct' === $notice_link_cfg) {
- $this->out->text(' (');
- $this->out->element('a', array('href' => $notice->uri), 'see');
- $this->out->text(')');
- } elseif ('attachment' === $notice_link_cfg) {
- if ($count = $notice->hasAttachments()) {
- // link to attachment(s) pages
- if (1 === $count) {
- $f2p = File_to_post::staticGet('post_id', $notice->id);
- $href = common_local_url('attachment', array('attachment' => $f2p->file_id));
- $att_class = 'attachment';
- } else {
- $href = common_local_url('attachments', array('notice' => $notice->id));
- $att_class = 'attachments';
- }
+ $this->out->text(mb_strlen($notice->content) > $this->maxchars
+ ? mb_substr($notice->content, 0, $this->maxchars) . '[…]'
+ : $notice->content);
+ $this->out->elementEnd('p');