Пример #1
0
     if ($p->post_type == 'private') {
         $title .= ' » ' . $p->post_to_user->username;
     }
 }
 $title .= ': ' . $p->post_message;
 $title = preg_replace('/\\s+/s', ' ', $title);
 $content = '<div style="line-height:1.3; padding:5px;">';
 if ($p->post_user->id == 0 && $p->post_group) {
     $content .= '<img src="' . $C->IMG_URL . '/avatars/thumbs2/' . $p->post_group->avatar . '" width="16" height="16" alt="" border="0" /> <strong>' . $p->post_group->title . '</strong>';
 } else {
     $content .= '<img src="' . $C->IMG_URL . '/avatars/thumbs2/' . $p->post_user->avatar . '" width="16" height="16" alt="" border="0" /> <strong>' . $p->post_user->username . '</strong>';
 }
 if ($p->post_type == 'private') {
     $content .= '<img src="' . $C->IMG_URL . '/avatars/thumbs2/' . $p->post_to_user->avatar . '" width="16" height="16" alt="" border="0" /> <strong>' . $p->post_to_user->username . '</strong>';
 }
 $content .= ':<br />' . $p->parse_text() . '<br />';
 if (isset($p->post_attached['link'])) {
     $content .= '<a href="' . htmlspecialchars($p->post_attached['link']->link) . '" target="_blank">' . htmlspecialchars($p->post_attached['link']->link) . '</a><br />';
 }
 if (isset($p->post_attached['file'])) {
     $content .= '<a href="' . $C->SITE_URL . 'getfile/pid:' . $p->post_tmp_id . '/' . htmlspecialchars($p->post_attached['file']->title) . '" target="_blank">' . htmlspecialchars($p->post_attached['file']->title) . '</a><br />';
 }
 if (isset($p->post_attached['image'])) {
     $content .= '<a href="' . $C->IMG_URL . 'attachments/' . $this->network->id . '/' . $p->post_attached['image']->file_preview . '" target="_blank"><img src="' . $C->IMG_URL . 'attachments/' . $this->network->id . '/' . $p->post_attached['image']->file_thumbnail . '" width="60" height="60" alt="' . htmlspecialchars($p->post_attached['image']->title) . '" border="0" /></a><br />';
 }
 if (isset($p->post_attached['videoembed'])) {
     $content .= '<a href="' . $p->post_attached['videoembed']->orig_url . '" target="_blank"><img src="' . $C->IMG_URL . 'attachments/' . $this->network->id . '/' . $p->post_attached['videoembed']->file_thumbnail . '" width="60" height="60" alt="' . htmlspecialchars($p->post_attached['videoembed']->orig_url) . '" border="0" /></a><br />';
 }
 $content .= '</div>';
 $content = preg_replace('/\\s+/s', ' ', $content);
 echo "\t<entry>\n";