From ef192a3c14111bb144f338f43ed7ed9479d74f22 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 14 Nov 2012 23:09:25 -0800 Subject: start on item feed structures --- include/items.php | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/items.php b/include/items.php index 77c2c2aa2..94554252c 100755 --- a/include/items.php +++ b/include/items.php @@ -470,11 +470,33 @@ function get_item_elements($j) { function encode_item($item) { - - - - - return json_encode($item); + $x = array(); + + $x['message_id'] = $item['uri']; + $x['message_top'] = $item['parent_uri']; + $x['message_parent'] = $item['thr_parent']; + $x['created'] = $item['created']; + $x['edited'] = $item['edited']; + $x['title'] = $item['title']; + $x['body'] = $item['body']; + $x['app'] = $item['app']; + $x['verb'] = $item['verb']; + $x['object_type'] = $item['obj_type']; + $x['target_type'] = $item['tgt_type']; + $x['permalink'] = $item['plink']; + $x['location'] = $item['location']; + $x['longlat'] = $item['coord']; + + $x['owner'] = array(); + $x['author'] = array(); + $x['object'] = array(); + $x['target'] = array(); + $x['attach'] = array(); + $x['restrictions'] = array(); + $x['flags'] = array(); + $x['tags'] = array(); + + return $x; } -- cgit v1.2.3