common_config('site', 'name'),
$profile->getBestName()));
- $nl = new NoticeList($notice, $out);
- // Outputs to the string
+ $out->elementStart('table', array('width' => '541px', 'style' => 'border: none'));
- $nl->show();
+ while ($notice->fetch()) {
+
+ $profile = Profile::staticGet('id', $notice->profile_id);
+
+ if (empty($profile)) {
+ continue;
+ }
+
+ $avatar = $profile->getAvatar(AVATAR_STREAM_SIZE);
+
+ $out->elementStart('tr');
+ $out->elementStart('td', array('width' => AVATAR_STREAM_SIZE,
+ 'height' => AVATAR_STREAM_SIZE,
+ 'align' => 'left',
+ 'valign' => 'top'));
+ $out->element('img', array('src' => ($avatar) ?
+ $avatar->displayUrl() :
+ Avatar::defaultImage($avatar_size),
+ 'class' => 'avatar photo',
+ 'width' => AVATAR_STREAM_SIZE,
+ 'height' => AVATAR_STREAM_SIZE,
+ 'alt' => $profile->getBestName()));
+ $out->elementEnd('td');
+ $out->elementStart('td', array('align' => 'left',
+ 'valign' => 'top'));
+ $out->element('a', array('href' => $profile->profileurl),
+ $profile->nickname);
+ $out->text(' ');
+ $out->raw($notice->rendered);
+ $out->element('br'); // yeah, you know it. I just wrote a <br> in the middle of my table layout.
+ $noticeurl = $notice->bestUrl();
+ // above should always return an URL
+ assert(!empty($noticeurl));
+ $out->elementStart('a', array('rel' => 'bookmark',
+ 'class' => 'timestamp',
+ 'href' => $noticeurl));
+ $dt = common_date_iso8601($notice->created);
+ $out->element('abbr', array('class' => 'published',
+ 'title' => $dt),
+ common_date_string($notice->created));
+ $out->elementEnd('a');
+ if ($notice->hasConversation()) {
+ $conv = Conversation::staticGet('id', $notice->conversation);
+ $convurl = $conv->uri;
+ if (!empty($convurl)) {
+ $out->text(' ');
+ $out->element('a',
+ array('href' => $convurl.'#notice-'.$notice->id,
+ 'class' => 'response'),
+ _('in context'));
+ }
+ }
+ $out->elementEnd('td');
+ $out->elementEnd('tr');
+ }
+
+ $out->elementEnd('table');
$out->raw(sprintf(_('<p><a href="%1s">change your email settings for %2s</a></p>'),
common_local_url('emailsettings'),
// FIXME: do something for people who don't like HTML email
mail_to_user($user, _('Updates from your network'), $body,
- array('Content-Type', 'text/html; charset=UTF-8'));
+ array('Content-Type' => 'text/html; charset=UTF-8'));
if (empty($ess)) {
$ess->last_summary_id = $new_top;
$ess->modified = common_sql_now();
- $ess->update();
+ $ess->update($orig);
}
return true;
}
}
-