- $datarray['owner-avatar'] = $contact['thumb'];
- $datarray['author-name'] = $person['name']; // Let reshared messages look like wall-to-wall posts
- $datarray['author-link'] = $person['url']; // we have to set an additional value in the item in the future
- // $datarray['author-avatar'] = $person['thumb']; // to distinct the wall-to-wall-posts from reshared/repeated messages
- $datarray['author-avatar'] = ((x($person,'thumb')) ? $person['thumb'] : $person['photo']);
- // $datarray['body'] = $prefix . $body;
- $datarray['body'] = $body;
+ $datarray['owner-avatar'] = ((x($contact,'thumb')) ? $contact['thumb'] : $contact['photo']);
+ if (intval(get_config('system','new_share'))) {
+ $prefix = "[share author='".str_replace("'", "'",$person['name']).
+ "' profile='".$person['url'].
+ "' avatar='".((x($person,'thumb')) ? $person['thumb'] : $person['photo']).
+ "' link='".$orig_url."']";
+ $datarray['author-name'] = $contact['name'];
+ $datarray['author-link'] = $contact['url'];
+ $datarray['author-avatar'] = $contact['thumb'];
+ $datarray['body'] = $prefix.$body."[/share]";
+ } else {
+ // Let reshared messages look like wall-to-wall posts
+ $datarray['author-name'] = $person['name'];
+ $datarray['author-link'] = $person['url'];
+ $datarray['author-avatar'] = ((x($person,'thumb')) ? $person['thumb'] : $person['photo']);
+ $datarray['body'] = $body;
+ }
+