- $author = '[url=' . $item['author-link'] . ']' . $item['author-name'] . '[/url]';
- $objauthor = '[url=' . $obj['author-link'] . ']' . $obj['author-name'] . '[/url]';
-
- switch ($obj['verb']) {
- case ACTIVITY_POST:
- switch ($obj['object-type']) {
- case ACTIVITY_OBJ_EVENT:
- $post_type = L10n::t('event');
- break;
- default:
- $post_type = L10n::t('status');
- }
- break;
- default:
- if ($obj['resource-id']) {
- $post_type = L10n::t('photo');
- $m = [];
- preg_match("/\[url=([^]]*)\]/", $obj['body'], $m);
- $rr['plink'] = $m[1];
- } else {
- $post_type = L10n::t('status');
- }
- }
-
- $plink = '[url=' . $obj['plink'] . ']' . $post_type . '[/url]';
-
- $bodyverb = '';
- if (activity_match($item['verb'], ACTIVITY_LIKE)) {
- $bodyverb = L10n::t('%1$s likes %2$s\'s %3$s');
- } elseif (activity_match($item['verb'], ACTIVITY_DISLIKE)) {
- $bodyverb = L10n::t('%1$s doesn\'t like %2$s\'s %3$s');
- } elseif (activity_match($item['verb'], ACTIVITY_ATTEND)) {
- $bodyverb = L10n::t('%1$s attends %2$s\'s %3$s');
- } elseif (activity_match($item['verb'], ACTIVITY_ATTENDNO)) {
- $bodyverb = L10n::t('%1$s doesn\'t attend %2$s\'s %3$s');
- } elseif (activity_match($item['verb'], ACTIVITY_ATTENDMAYBE)) {
- $bodyverb = L10n::t('%1$s attends maybe %2$s\'s %3$s');
- }
-
- $item['body'] = sprintf($bodyverb, $author, $objauthor, $plink);
- }
-
- if (activity_match($item['verb'], ACTIVITY_FRIEND)) {
-
- if ($item['object-type']=="" || $item['object-type']!== ACTIVITY_OBJ_PERSON) return;
-
- $Aname = $item['author-name'];
- $Alink = $item['author-link'];
-
- $xmlhead="<"."?xml version='1.0' encoding='UTF-8' ?".">";
-
- $obj = XML::parseString($xmlhead.$item['object']);
- $links = XML::parseString($xmlhead."<links>".XML::unescape($obj->link)."</links>");