From 1d8bd89fece18e861760eeed40ded146e01a0abb Mon Sep 17 00:00:00 2001 From: fabrixxm Date: Mon, 18 Apr 2011 20:38:48 +0200 Subject: [PATCH] translate "like"/"dislike"/"friends with" messages at print time --- include/conversation.php | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/include/conversation.php b/include/conversation.php index a1ce19a7ab..3ec0706e9d 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -8,12 +8,18 @@ function localize_item(&$item){ if ($item['verb']=="http://activitystrea.ms/schema/1.0/like" || $item['verb']=="http://activitystrea.ms/schema/1.0/dislike"){ + $r = q("SELECT * from `item`,`contact` WHERE + `item`.`contact-id`=`contact`.`id` AND `item`.`uri`='%s';", + dbesc($item['parent-uri'])); + if(count($r)==0) return; + $obj=$r[0]; $author = '[url=' . $item['author-link'] . ']' . $item['author-name'] . '[/url]'; - #$objauthor = '[url=' . $obj['author-link'] . ']' . $obj['author-name'] . '[/url]'; - #$objlink = preg_grep("|